generated-configure.sh revision 1791:358fb90ae6e6
1228753Smm#!/bin/bash
2228753Smm#
3228753Smm# ##########################################################
4228753Smm# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5228753Smm# ##########################################################
6228753Smm#
7228753Smm#! /bin/sh
8228753Smm# Guess values for system-dependent variables and create Makefiles.
9228753Smm# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10228753Smm#
11228753Smm# Report bugs to <build-dev@openjdk.java.net>.
12228753Smm#
13228753Smm#
14228753Smm# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15228753Smm#
16228753Smm#
17228753Smm# This configure script is free software; the Free Software Foundation
18228753Smm# gives unlimited permission to copy, distribute and modify it.
19228753Smm## -------------------- ##
20228753Smm## M4sh Initialization. ##
21228753Smm## -------------------- ##
22228753Smm
23228753Smm# Be more Bourne compatible
24228753SmmDUALCASE=1; export DUALCASE # for MKS sh
25228753Smmif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26228763Smm  emulate sh
27228753Smm  NULLCMD=:
28228753Smm  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29228753Smm  # is contrary to our usage.  Disable this feature.
30228753Smm  alias -g '${1+"$@"}'='"$@"'
31228753Smm  setopt NO_GLOB_SUBST
32228753Smmelse
33228753Smm  case `(set -o) 2>/dev/null` in #(
34228753Smm  *posix*) :
35228753Smm    set -o posix ;; #(
36228753Smm  *) :
37228753Smm     ;;
38228753Smmesac
39228753Smmfi
40228753Smm
41228753Smm
42228753Smmas_nl='
43232153Smm'
44228753Smmexport as_nl
45228753Smm# Printing a long string crashes Solaris 7 /usr/bin/printf.
46228753Smmas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47232153Smmas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48228753Smmas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49228753Smm# Prefer a ksh shell builtin over an external printf program on Solaris,
50232153Smm# but without wasting forks for bash or zsh.
51228753Smmif test -z "$BASH_VERSION$ZSH_VERSION" \
52228753Smm    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53228753Smm  as_echo='print -r --'
54228753Smm  as_echo_n='print -rn --'
55228753Smmelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56228753Smm  as_echo='printf %s\n'
57228753Smm  as_echo_n='printf %s'
58228753Smmelse
59228753Smm  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60228753Smm    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61228753Smm    as_echo_n='/usr/ucb/echo -n'
62232153Smm  else
63232153Smm    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64232153Smm    as_echo_n_body='eval
65228753Smm      arg=$1;
66228753Smm      case $arg in #(
67228753Smm      *"$as_nl"*)
68228753Smm	expr "X$arg" : "X\\(.*\\)$as_nl";
69228753Smm	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70228753Smm      esac;
71228753Smm      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72228753Smm    '
73228753Smm    export as_echo_n_body
74228753Smm    as_echo_n='sh -c $as_echo_n_body as_echo'
75228753Smm  fi
76228753Smm  export as_echo_body
77228753Smm  as_echo='sh -c $as_echo_body as_echo'
78228753Smmfi
79228753Smm
80248616Smm# The user is always right.
81299529Smmif test "${PATH_SEPARATOR+set}" != set; then
82299529Smm  PATH_SEPARATOR=:
83299529Smm  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84228753Smm    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85228753Smm      PATH_SEPARATOR=';'
86228753Smm  }
87228753Smmfi
88228753Smm
89228753Smm
90228753Smm# IFS
91228753Smm# We need space, tab and new line, in precisely that order.  Quoting is
92228753Smm# there to prevent editors from complaining about space-tab.
93228753Smm# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94228753Smm# splitting by setting IFS to empty value.)
95228753SmmIFS=" ""	$as_nl"
96228753Smm
97232153Smm# Find who we are.  Look in the path if we contain no directory separator.
98228753Smmas_myself=
99232153Smmcase $0 in #((
100232153Smm  *[\\/]* ) as_myself=$0 ;;
101232153Smm  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102228753Smmfor as_dir in $PATH
103228753Smmdo
104228753Smm  IFS=$as_save_IFS
105228753Smm  test -z "$as_dir" && as_dir=.
106228753Smm    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107228753Smm  done
108228753SmmIFS=$as_save_IFS
109228753Smm
110228753Smm     ;;
111228753Smmesac
112228753Smm# We did not find ourselves, most probably we were run as `sh COMMAND'
113228753Smm# in which case we are not to be found in the path.
114228753Smmif test "x$as_myself" = x; then
115228753Smm  as_myself=$0
116228753Smmfi
117228753Smmif test ! -f "$as_myself"; then
118232153Smm  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119228753Smm  exit 1
120232153Smmfi
121232153Smm
122228753Smm# Unset variables that we do not need and which cause bugs (e.g. in
123348607Smm# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124348607Smm# suppresses any "Segmentation fault" message there.  '((' could
125348607Smm# trigger a bug in pdksh 5.2.14.
126228753Smmfor as_var in BASH_ENV ENV MAIL MAILPATH
127228753Smmdo eval test x\${$as_var+set} = xset \
128228753Smm  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129228753Smmdone
130232153SmmPS1='$ '
131228753SmmPS2='> '
132228753SmmPS4='+ '
133228753Smm
134228753Smm# NLS nuisances.
135228753SmmLC_ALL=C
136232153Smmexport LC_ALL
137232153SmmLANGUAGE=C
138232153Smmexport LANGUAGE
139232153Smm
140232153Smm# CDPATH.
141232153Smm(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142232153Smm
143228753Smm# Use a proper internal environment variable to ensure we don't fall
144228753Smm  # into an infinite loop, continuously re-executing ourselves.
145228753Smm  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146228753Smm    _as_can_reexec=no; export _as_can_reexec;
147228753Smm    # We cannot yet assume a decent shell, so we have to provide a
148228753Smm# neutralization value for shells without unset; and this also
149232153Smm# works around shells that cannot unset nonexistent variables.
150228753Smm# Preserve -v and -x to the replacement shell.
151228753SmmBASH_ENV=/dev/null
152228753SmmENV=/dev/null
153232153Smm(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154228753Smmcase $- in # ((((
155228753Smm  *v*x* | *x*v* ) as_opts=-vx ;;
156228753Smm  *v* ) as_opts=-v ;;
157228753Smm  *x* ) as_opts=-x ;;
158228753Smm  * ) as_opts= ;;
159228753Smmesac
160228753Smmexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161228753Smm# Admittedly, this is quite paranoid, since all the known shells bail
162228753Smm# out after a failed `exec'.
163228753Smm$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164228753Smmas_fn_exit 255
165248616Smm  fi
166228753Smm  # We don't want this to propagate to other subprocesses.
167228753Smm          { _as_can_reexec=; unset _as_can_reexec;}
168228753Smmif test "x$CONFIG_SHELL" = x; then
169228753Smm  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170228753Smm  emulate sh
171228753Smm  NULLCMD=:
172232153Smm  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173228753Smm  # is contrary to our usage.  Disable this feature.
174232153Smm  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175232153Smm  setopt NO_GLOB_SUBST
176232153Smmelse
177232153Smm  case \`(set -o) 2>/dev/null\` in #(
178232153Smm  *posix*) :
179228753Smm    set -o posix ;; #(
180232153Smm  *) :
181228753Smm     ;;
182228753Smmesac
183228753Smmfi
184228753Smm"
185228753Smm  as_required="as_fn_return () { (exit \$1); }
186228753Smmas_fn_success () { as_fn_return 0; }
187228753Smmas_fn_failure () { as_fn_return 1; }
188228753Smmas_fn_ret_success () { return 0; }
189228753Smmas_fn_ret_failure () { return 1; }
190228753Smm
191228753Smmexitcode=0
192228753Smmas_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
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
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649JOBS
650MEMORY_SIZE
651NUM_CORES
652ENABLE_INTREE_EC
653SALIB_NAME
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693CFLAGS_WARNINGS_ARE_ERRORS
694DISABLE_WARNING_PREFIX
695HOTSPOT_SET_WARNINGS_AS_ERRORS
696WARNINGS_AS_ERRORS
697COMPILER_SUPPORTS_TARGET_BITS_FLAG
698ZERO_ARCHFLAG
699LDFLAGS_TESTEXE
700LDFLAGS_TESTLIB
701LDFLAGS_CXX_JDK
702JDKEXE_LIBS
703JDKLIB_LIBS
704LDFLAGS_JDKEXE
705LDFLAGS_JDKLIB
706CXXFLAGS_TESTEXE
707CXXFLAGS_TESTLIB
708CFLAGS_TESTEXE
709CFLAGS_TESTLIB
710CXXFLAGS_JDKEXE
711CXXFLAGS_JDKLIB
712CFLAGS_JDKEXE
713CFLAGS_JDKLIB
714MACOSX_VERSION_MIN
715CXX_O_FLAG_NONE
716CXX_O_FLAG_DEBUG
717CXX_O_FLAG_NORM
718CXX_O_FLAG_HI
719CXX_O_FLAG_HIGHEST
720C_O_FLAG_NONE
721C_O_FLAG_DEBUG
722C_O_FLAG_NORM
723C_O_FLAG_HI
724C_O_FLAG_HIGHEST
725CXXFLAGS_DEBUG_SYMBOLS
726CFLAGS_DEBUG_SYMBOLS
727CXX_FLAG_DEPS
728C_FLAG_DEPS
729SET_SHARED_LIBRARY_MAPFILE
730SET_SHARED_LIBRARY_NAME
731SET_SHARED_LIBRARY_ORIGIN
732SET_EXECUTABLE_ORIGIN
733CXX_FLAG_REORDER
734C_FLAG_REORDER
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740STRIPFLAGS
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_AS
753BUILD_LD
754BUILD_AR
755BUILD_NM
756BUILD_CXX
757BUILD_CC
758BUILD_SYSROOT_LDFLAGS
759BUILD_SYSROOT_CFLAGS
760ac_ct_OBJDUMP
761OBJDUMP
762ac_ct_OBJCOPY
763OBJCOPY
764ac_ct_NM
765ac_ct_STRIP
766GNM
767NM
768STRIP
769MSBUILD
770DUMPBIN
771RC
772MT
773LIPO
774ac_ct_AR
775AR
776AS
777LDCXX
778LD
779CXXCPP
780CPP
781ac_ct_CXX
782CXXFLAGS
783CXX
784ac_ct_PROPER_COMPILER_CXX
785PROPER_COMPILER_CXX
786TOOLCHAIN_PATH_CXX
787POTENTIAL_CXX
788OBJEXT
789EXEEXT
790ac_ct_CC
791CPPFLAGS
792LDFLAGS
793CFLAGS
794CC
795ac_ct_PROPER_COMPILER_CC
796PROPER_COMPILER_CC
797TOOLCHAIN_PATH_CC
798POTENTIAL_CC
799VS_LIB
800VS_INCLUDE
801VS_PATH
802CYGWIN_LINK
803SYSROOT_LDFLAGS
804SYSROOT_CFLAGS
805LEGACY_EXTRA_LDFLAGS
806LEGACY_EXTRA_CXXFLAGS
807LEGACY_EXTRA_CFLAGS
808EXE_SUFFIX
809OBJ_SUFFIX
810STATIC_LIBRARY
811SHARED_LIBRARY
812STATIC_LIBRARY_SUFFIX
813SHARED_LIBRARY_SUFFIX
814LIBRARY_PREFIX
815TOOLCHAIN_TYPE
816STATIC_BUILD
817BUILD_HOTSPOT
818HOTSPOT_DIST
819BUILD_OUTPUT
820JDK_TOPDIR
821NASHORN_TOPDIR
822HOTSPOT_TOPDIR
823JAXWS_TOPDIR
824JAXP_TOPDIR
825CORBA_TOPDIR
826LANGTOOLS_TOPDIR
827BOOT_JDK_BITS
828JAVAC_FLAGS
829BOOT_JDK_SOURCETARGET
830JARSIGNER
831JAR
832JAVAH
833JAVAC
834JAVA
835BOOT_JDK
836JAVA_CHECK
837JAVAC_CHECK
838COOKED_BUILD_NUMBER
839JDK_VERSION
840COPYRIGHT_YEAR
841MACOSX_BUNDLE_ID_BASE
842MACOSX_BUNDLE_NAME_BASE
843COMPANY_NAME
844JDK_RC_PLATFORM_NAME
845PRODUCT_SUFFIX
846PRODUCT_NAME
847LAUNCHER_NAME
848MILESTONE
849JDK_BUILD_NUMBER
850JDK_UPDATE_VERSION
851JDK_MICRO_VERSION
852JDK_MINOR_VERSION
853JDK_MAJOR_VERSION
854USER_RELEASE_SUFFIX
855COMPRESS_JARS
856UNLIMITED_CRYPTO
857CACERTS_FILE
858TEST_IN_BUILD
859BUILD_HEADLESS
860SUPPORT_HEADFUL
861SUPPORT_HEADLESS
862OS_VERSION_MICRO
863OS_VERSION_MINOR
864OS_VERSION_MAJOR
865PKG_CONFIG
866BASH_ARGS
867SETFILE
868CODESIGN
869XATTR
870DSYMUTIL
871IS_GNU_TIME
872PATCH
873TIME
874STAT
875HG
876READELF
877OTOOL
878LDD
879ZIP
880UNZIP
881FIND_DELETE
882OUTPUT_SYNC
883OUTPUT_SYNC_SUPPORTED
884CHECK_TOOLSDIR_MAKE
885CHECK_TOOLSDIR_GMAKE
886CHECK_MAKE
887CHECK_GMAKE
888MAKE
889PKGHANDLER
890CONFIGURESUPPORT_OUTPUTDIR
891OUTPUT_ROOT
892CONF_NAME
893SPEC
894SDKROOT
895XCODEBUILD
896BUILD_VARIANT_RELEASE
897DEBUG_CLASSFILES
898FASTDEBUG
899VARIANT
900DEBUG_LEVEL
901MACOSX_UNIVERSAL
902INCLUDE_SA
903JVM_VARIANT_CORE
904JVM_VARIANT_ZEROSHARK
905JVM_VARIANT_ZERO
906JVM_VARIANT_KERNEL
907JVM_VARIANT_MINIMAL1
908JVM_VARIANT_CLIENT
909JVM_VARIANT_SERVER
910JVM_VARIANTS
911JVM_INTERPRETER
912JDK_VARIANT
913SET_OPENJDK
914CANONICAL_TOPDIR
915ORIGINAL_TOPDIR
916TOPDIR
917PATH_SEP
918ZERO_ARCHDEF
919DEFINE_CROSS_COMPILE_ARCH
920LP64
921OPENJDK_TARGET_OS_EXPORT_DIR
922OPENJDK_TARGET_CPU_JLI_CFLAGS
923OPENJDK_TARGET_CPU_OSARCH
924OPENJDK_TARGET_CPU_ISADIR
925OPENJDK_TARGET_CPU_LIBDIR
926OPENJDK_TARGET_CPU_LEGACY_LIB
927OPENJDK_TARGET_CPU_LEGACY
928REQUIRED_OS_VERSION
929REQUIRED_OS_NAME
930COMPILE_TYPE
931OPENJDK_TARGET_CPU_ENDIAN
932OPENJDK_TARGET_CPU_BITS
933OPENJDK_TARGET_CPU_ARCH
934OPENJDK_TARGET_CPU
935OPENJDK_TARGET_OS_ENV
936OPENJDK_TARGET_OS_TYPE
937OPENJDK_TARGET_OS
938OPENJDK_BUILD_CPU_ENDIAN
939OPENJDK_BUILD_CPU_BITS
940OPENJDK_BUILD_CPU_ARCH
941OPENJDK_BUILD_CPU
942OPENJDK_BUILD_OS_ENV
943OPENJDK_BUILD_OS_TYPE
944OPENJDK_BUILD_OS
945OPENJDK_BUILD_AUTOCONF_NAME
946OPENJDK_TARGET_AUTOCONF_NAME
947target_os
948target_vendor
949target_cpu
950target
951host_os
952host_vendor
953host_cpu
954host
955build_os
956build_vendor
957build_cpu
958build
959NICE
960CPIO
961DF
962READLINK
963CYGPATH
964SED
965FGREP
966EGREP
967GREP
968AWK
969XARGS
970WHICH
971WC
972UNIQ
973UNAME
974TR
975TOUCH
976TEE
977TAR
978TAIL
979SORT
980SH
981RMDIR
982RM
983PRINTF
984NAWK
985MV
986MKTEMP
987MKDIR
988LS
989LN
990HEAD
991FIND
992FILE
993EXPR
994ECHO
995DIRNAME
996DIFF
997DATE
998CUT
999CP
1000COMM
1001CMP
1002CHMOD
1003CAT
1004BASH
1005BASENAME
1006DATE_WHEN_CONFIGURED
1007ORIGINAL_PATH
1008CONFIGURE_COMMAND_LINE
1009target_alias
1010host_alias
1011build_alias
1012LIBS
1013ECHO_T
1014ECHO_N
1015ECHO_C
1016DEFS
1017mandir
1018localedir
1019libdir
1020psdir
1021pdfdir
1022dvidir
1023htmldir
1024infodir
1025docdir
1026oldincludedir
1027includedir
1028localstatedir
1029sharedstatedir
1030sysconfdir
1031datadir
1032datarootdir
1033libexecdir
1034sbindir
1035bindir
1036program_transform_name
1037prefix
1038exec_prefix
1039PACKAGE_URL
1040PACKAGE_BUGREPORT
1041PACKAGE_STRING
1042PACKAGE_VERSION
1043PACKAGE_TARNAME
1044PACKAGE_NAME
1045PATH_SEPARATOR
1046SHELL'
1047ac_subst_files=''
1048ac_user_opts='
1049enable_option_checking
1050with_target_bits
1051enable_openjdk_only
1052with_custom_make_dir
1053with_jdk_variant
1054with_jvm_interpreter
1055with_jvm_variants
1056enable_debug
1057with_debug_level
1058with_devkit
1059with_sys_root
1060with_sysroot
1061with_tools_dir
1062with_toolchain_path
1063with_extra_path
1064with_sdk_name
1065with_conf_name
1066with_output_sync
1067enable_headful
1068enable_hotspot_test_in_build
1069with_cacerts_file
1070enable_unlimited_crypto
1071with_milestone
1072with_update_version
1073with_user_release_suffix
1074with_build_number
1075with_copyright_year
1076with_boot_jdk
1077with_add_source_root
1078with_override_source_root
1079with_adds_and_overrides
1080with_override_langtools
1081with_override_corba
1082with_override_jaxp
1083with_override_jaxws
1084with_override_hotspot
1085with_override_nashorn
1086with_override_jdk
1087with_import_hotspot
1088enable_static_build
1089with_toolchain_type
1090with_extra_cflags
1091with_extra_cxxflags
1092with_extra_ldflags
1093with_toolchain_version
1094with_build_devkit
1095with_jtreg
1096enable_warnings_as_errors
1097enable_debug_symbols
1098enable_zip_debug_info
1099enable_native_coverage
1100with_stdc__lib
1101with_msvcr_dll
1102with_msvcp_dll
1103with_x
1104with_cups
1105with_cups_include
1106with_freetype
1107with_freetype_include
1108with_freetype_lib
1109with_freetype_src
1110enable_freetype_bundling
1111with_alsa
1112with_alsa_include
1113with_alsa_lib
1114with_libffi
1115with_libffi_include
1116with_libffi_lib
1117with_libjpeg
1118with_giflib
1119with_libpng
1120with_zlib
1121with_lcms
1122with_dxsdk
1123with_dxsdk_lib
1124with_dxsdk_include
1125with_num_cores
1126with_memory_size
1127with_jobs
1128with_boot_jdk_jvmargs
1129with_sjavac_server_java
1130enable_sjavac
1131enable_javac_server
1132enable_icecc
1133enable_precompiled_headers
1134enable_ccache
1135with_ccache_dir
1136'
1137      ac_precious_vars='build_alias
1138host_alias
1139target_alias
1140BASENAME
1141BASH
1142CAT
1143CHMOD
1144CMP
1145COMM
1146CP
1147CUT
1148DATE
1149DIFF
1150DIRNAME
1151ECHO
1152EXPR
1153FILE
1154FIND
1155HEAD
1156LN
1157LS
1158MKDIR
1159MKTEMP
1160MV
1161NAWK
1162PRINTF
1163RM
1164RMDIR
1165SH
1166SORT
1167TAIL
1168TAR
1169TEE
1170TOUCH
1171TR
1172UNAME
1173UNIQ
1174WC
1175WHICH
1176XARGS
1177AWK
1178GREP
1179EGREP
1180FGREP
1181SED
1182CYGPATH
1183READLINK
1184DF
1185CPIO
1186NICE
1187MAKE
1188UNZIP
1189ZIP
1190LDD
1191OTOOL
1192READELF
1193HG
1194STAT
1195TIME
1196PATCH
1197DSYMUTIL
1198XATTR
1199CODESIGN
1200SETFILE
1201PKG_CONFIG
1202JAVA
1203JAVAC
1204JAVAH
1205JAR
1206JARSIGNER
1207CC
1208CFLAGS
1209LDFLAGS
1210LIBS
1211CPPFLAGS
1212CXX
1213CXXFLAGS
1214CCC
1215CPP
1216CXXCPP
1217AS
1218AR
1219LIPO
1220STRIP
1221NM
1222GNM
1223OBJCOPY
1224OBJDUMP
1225BUILD_CC
1226BUILD_CXX
1227BUILD_NM
1228BUILD_AR
1229JTREGEXE
1230XMKMF
1231FREETYPE_CFLAGS
1232FREETYPE_LIBS
1233ALSA_CFLAGS
1234ALSA_LIBS
1235LIBFFI_CFLAGS
1236LIBFFI_LIBS
1237PNG_CFLAGS
1238PNG_LIBS
1239LCMS_CFLAGS
1240LCMS_LIBS
1241ICECC_CMD
1242ICECC_CREATE_ENV
1243ICECC_WRAPPER
1244CCACHE'
1245
1246
1247# Initialize some variables set by options.
1248ac_init_help=
1249ac_init_version=false
1250ac_unrecognized_opts=
1251ac_unrecognized_sep=
1252# The variables have the same names as the options, with
1253# dashes changed to underlines.
1254cache_file=/dev/null
1255exec_prefix=NONE
1256no_create=
1257no_recursion=
1258prefix=NONE
1259program_prefix=NONE
1260program_suffix=NONE
1261program_transform_name=s,x,x,
1262silent=
1263site=
1264srcdir=
1265verbose=
1266x_includes=NONE
1267x_libraries=NONE
1268
1269# Installation directory options.
1270# These are left unexpanded so users can "make install exec_prefix=/foo"
1271# and all the variables that are supposed to be based on exec_prefix
1272# by default will actually change.
1273# Use braces instead of parens because sh, perl, etc. also accept them.
1274# (The list follows the same order as the GNU Coding Standards.)
1275bindir='${exec_prefix}/bin'
1276sbindir='${exec_prefix}/sbin'
1277libexecdir='${exec_prefix}/libexec'
1278datarootdir='${prefix}/share'
1279datadir='${datarootdir}'
1280sysconfdir='${prefix}/etc'
1281sharedstatedir='${prefix}/com'
1282localstatedir='${prefix}/var'
1283includedir='${prefix}/include'
1284oldincludedir='/usr/include'
1285docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1286infodir='${datarootdir}/info'
1287htmldir='${docdir}'
1288dvidir='${docdir}'
1289pdfdir='${docdir}'
1290psdir='${docdir}'
1291libdir='${exec_prefix}/lib'
1292localedir='${datarootdir}/locale'
1293mandir='${datarootdir}/man'
1294
1295ac_prev=
1296ac_dashdash=
1297for ac_option
1298do
1299  # If the previous option needs an argument, assign it.
1300  if test -n "$ac_prev"; then
1301    eval $ac_prev=\$ac_option
1302    ac_prev=
1303    continue
1304  fi
1305
1306  case $ac_option in
1307  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1308  *=)   ac_optarg= ;;
1309  *)    ac_optarg=yes ;;
1310  esac
1311
1312  # Accept the important Cygnus configure options, so we can diagnose typos.
1313
1314  case $ac_dashdash$ac_option in
1315  --)
1316    ac_dashdash=yes ;;
1317
1318  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1319    ac_prev=bindir ;;
1320  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1321    bindir=$ac_optarg ;;
1322
1323  -build | --build | --buil | --bui | --bu)
1324    ac_prev=build_alias ;;
1325  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1326    build_alias=$ac_optarg ;;
1327
1328  -cache-file | --cache-file | --cache-fil | --cache-fi \
1329  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1330    ac_prev=cache_file ;;
1331  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1332  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1333    cache_file=$ac_optarg ;;
1334
1335  --config-cache | -C)
1336    cache_file=config.cache ;;
1337
1338  -datadir | --datadir | --datadi | --datad)
1339    ac_prev=datadir ;;
1340  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1341    datadir=$ac_optarg ;;
1342
1343  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1344  | --dataroo | --dataro | --datar)
1345    ac_prev=datarootdir ;;
1346  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1347  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1348    datarootdir=$ac_optarg ;;
1349
1350  -disable-* | --disable-*)
1351    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1352    # Reject names that are not valid shell variable names.
1353    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1354      as_fn_error $? "invalid feature name: $ac_useropt"
1355    ac_useropt_orig=$ac_useropt
1356    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1357    case $ac_user_opts in
1358      *"
1359"enable_$ac_useropt"
1360"*) ;;
1361      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1362	 ac_unrecognized_sep=', ';;
1363    esac
1364    eval enable_$ac_useropt=no ;;
1365
1366  -docdir | --docdir | --docdi | --doc | --do)
1367    ac_prev=docdir ;;
1368  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1369    docdir=$ac_optarg ;;
1370
1371  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1372    ac_prev=dvidir ;;
1373  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1374    dvidir=$ac_optarg ;;
1375
1376  -enable-* | --enable-*)
1377    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1378    # Reject names that are not valid shell variable names.
1379    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1380      as_fn_error $? "invalid feature name: $ac_useropt"
1381    ac_useropt_orig=$ac_useropt
1382    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1383    case $ac_user_opts in
1384      *"
1385"enable_$ac_useropt"
1386"*) ;;
1387      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1388	 ac_unrecognized_sep=', ';;
1389    esac
1390    eval enable_$ac_useropt=\$ac_optarg ;;
1391
1392  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1393  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1394  | --exec | --exe | --ex)
1395    ac_prev=exec_prefix ;;
1396  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1397  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1398  | --exec=* | --exe=* | --ex=*)
1399    exec_prefix=$ac_optarg ;;
1400
1401  -gas | --gas | --ga | --g)
1402    # Obsolete; use --with-gas.
1403    with_gas=yes ;;
1404
1405  -help | --help | --hel | --he | -h)
1406    ac_init_help=long ;;
1407  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1408    ac_init_help=recursive ;;
1409  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1410    ac_init_help=short ;;
1411
1412  -host | --host | --hos | --ho)
1413    ac_prev=host_alias ;;
1414  -host=* | --host=* | --hos=* | --ho=*)
1415    host_alias=$ac_optarg ;;
1416
1417  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1418    ac_prev=htmldir ;;
1419  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1420  | --ht=*)
1421    htmldir=$ac_optarg ;;
1422
1423  -includedir | --includedir | --includedi | --included | --include \
1424  | --includ | --inclu | --incl | --inc)
1425    ac_prev=includedir ;;
1426  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1427  | --includ=* | --inclu=* | --incl=* | --inc=*)
1428    includedir=$ac_optarg ;;
1429
1430  -infodir | --infodir | --infodi | --infod | --info | --inf)
1431    ac_prev=infodir ;;
1432  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1433    infodir=$ac_optarg ;;
1434
1435  -libdir | --libdir | --libdi | --libd)
1436    ac_prev=libdir ;;
1437  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1438    libdir=$ac_optarg ;;
1439
1440  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1441  | --libexe | --libex | --libe)
1442    ac_prev=libexecdir ;;
1443  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1444  | --libexe=* | --libex=* | --libe=*)
1445    libexecdir=$ac_optarg ;;
1446
1447  -localedir | --localedir | --localedi | --localed | --locale)
1448    ac_prev=localedir ;;
1449  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1450    localedir=$ac_optarg ;;
1451
1452  -localstatedir | --localstatedir | --localstatedi | --localstated \
1453  | --localstate | --localstat | --localsta | --localst | --locals)
1454    ac_prev=localstatedir ;;
1455  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1456  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1457    localstatedir=$ac_optarg ;;
1458
1459  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1460    ac_prev=mandir ;;
1461  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1462    mandir=$ac_optarg ;;
1463
1464  -nfp | --nfp | --nf)
1465    # Obsolete; use --without-fp.
1466    with_fp=no ;;
1467
1468  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1469  | --no-cr | --no-c | -n)
1470    no_create=yes ;;
1471
1472  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1473  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1474    no_recursion=yes ;;
1475
1476  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1477  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1478  | --oldin | --oldi | --old | --ol | --o)
1479    ac_prev=oldincludedir ;;
1480  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1481  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1482  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1483    oldincludedir=$ac_optarg ;;
1484
1485  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1486    ac_prev=prefix ;;
1487  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1488    prefix=$ac_optarg ;;
1489
1490  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1491  | --program-pre | --program-pr | --program-p)
1492    ac_prev=program_prefix ;;
1493  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1494  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1495    program_prefix=$ac_optarg ;;
1496
1497  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1498  | --program-suf | --program-su | --program-s)
1499    ac_prev=program_suffix ;;
1500  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1501  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1502    program_suffix=$ac_optarg ;;
1503
1504  -program-transform-name | --program-transform-name \
1505  | --program-transform-nam | --program-transform-na \
1506  | --program-transform-n | --program-transform- \
1507  | --program-transform | --program-transfor \
1508  | --program-transfo | --program-transf \
1509  | --program-trans | --program-tran \
1510  | --progr-tra | --program-tr | --program-t)
1511    ac_prev=program_transform_name ;;
1512  -program-transform-name=* | --program-transform-name=* \
1513  | --program-transform-nam=* | --program-transform-na=* \
1514  | --program-transform-n=* | --program-transform-=* \
1515  | --program-transform=* | --program-transfor=* \
1516  | --program-transfo=* | --program-transf=* \
1517  | --program-trans=* | --program-tran=* \
1518  | --progr-tra=* | --program-tr=* | --program-t=*)
1519    program_transform_name=$ac_optarg ;;
1520
1521  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1522    ac_prev=pdfdir ;;
1523  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1524    pdfdir=$ac_optarg ;;
1525
1526  -psdir | --psdir | --psdi | --psd | --ps)
1527    ac_prev=psdir ;;
1528  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1529    psdir=$ac_optarg ;;
1530
1531  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1532  | -silent | --silent | --silen | --sile | --sil)
1533    silent=yes ;;
1534
1535  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1536    ac_prev=sbindir ;;
1537  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1538  | --sbi=* | --sb=*)
1539    sbindir=$ac_optarg ;;
1540
1541  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1542  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1543  | --sharedst | --shareds | --shared | --share | --shar \
1544  | --sha | --sh)
1545    ac_prev=sharedstatedir ;;
1546  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1547  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1548  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1549  | --sha=* | --sh=*)
1550    sharedstatedir=$ac_optarg ;;
1551
1552  -site | --site | --sit)
1553    ac_prev=site ;;
1554  -site=* | --site=* | --sit=*)
1555    site=$ac_optarg ;;
1556
1557  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1558    ac_prev=srcdir ;;
1559  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1560    srcdir=$ac_optarg ;;
1561
1562  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1563  | --syscon | --sysco | --sysc | --sys | --sy)
1564    ac_prev=sysconfdir ;;
1565  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1566  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1567    sysconfdir=$ac_optarg ;;
1568
1569  -target | --target | --targe | --targ | --tar | --ta | --t)
1570    ac_prev=target_alias ;;
1571  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1572    target_alias=$ac_optarg ;;
1573
1574  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1575    verbose=yes ;;
1576
1577  -version | --version | --versio | --versi | --vers | -V)
1578    ac_init_version=: ;;
1579
1580  -with-* | --with-*)
1581    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1582    # Reject names that are not valid shell variable names.
1583    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1584      as_fn_error $? "invalid package name: $ac_useropt"
1585    ac_useropt_orig=$ac_useropt
1586    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1587    case $ac_user_opts in
1588      *"
1589"with_$ac_useropt"
1590"*) ;;
1591      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1592	 ac_unrecognized_sep=', ';;
1593    esac
1594    eval with_$ac_useropt=\$ac_optarg ;;
1595
1596  -without-* | --without-*)
1597    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1598    # Reject names that are not valid shell variable names.
1599    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1600      as_fn_error $? "invalid package name: $ac_useropt"
1601    ac_useropt_orig=$ac_useropt
1602    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1603    case $ac_user_opts in
1604      *"
1605"with_$ac_useropt"
1606"*) ;;
1607      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1608	 ac_unrecognized_sep=', ';;
1609    esac
1610    eval with_$ac_useropt=no ;;
1611
1612  --x)
1613    # Obsolete; use --with-x.
1614    with_x=yes ;;
1615
1616  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1617  | --x-incl | --x-inc | --x-in | --x-i)
1618    ac_prev=x_includes ;;
1619  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1620  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1621    x_includes=$ac_optarg ;;
1622
1623  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1624  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1625    ac_prev=x_libraries ;;
1626  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1627  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1628    x_libraries=$ac_optarg ;;
1629
1630  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1631Try \`$0 --help' for more information"
1632    ;;
1633
1634  *=*)
1635    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1636    # Reject names that are not valid shell variable names.
1637    case $ac_envvar in #(
1638      '' | [0-9]* | *[!_$as_cr_alnum]* )
1639      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1640    esac
1641    eval $ac_envvar=\$ac_optarg
1642    export $ac_envvar ;;
1643
1644  *)
1645    # FIXME: should be removed in autoconf 3.0.
1646    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1647    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1648      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1649    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1650    ;;
1651
1652  esac
1653done
1654
1655if test -n "$ac_prev"; then
1656  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1657  as_fn_error $? "missing argument to $ac_option"
1658fi
1659
1660if test -n "$ac_unrecognized_opts"; then
1661  case $enable_option_checking in
1662    no) ;;
1663    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1664    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1665  esac
1666fi
1667
1668# Check all directory arguments for consistency.
1669for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1670		datadir sysconfdir sharedstatedir localstatedir includedir \
1671		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1672		libdir localedir mandir
1673do
1674  eval ac_val=\$$ac_var
1675  # Remove trailing slashes.
1676  case $ac_val in
1677    */ )
1678      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1679      eval $ac_var=\$ac_val;;
1680  esac
1681  # Be sure to have absolute directory names.
1682  case $ac_val in
1683    [\\/$]* | ?:[\\/]* )  continue;;
1684    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1685  esac
1686  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1687done
1688
1689# There might be people who depend on the old broken behavior: `$host'
1690# used to hold the argument of --host etc.
1691# FIXME: To remove some day.
1692build=$build_alias
1693host=$host_alias
1694target=$target_alias
1695
1696# FIXME: To remove some day.
1697if test "x$host_alias" != x; then
1698  if test "x$build_alias" = x; then
1699    cross_compiling=maybe
1700  elif test "x$build_alias" != "x$host_alias"; then
1701    cross_compiling=yes
1702  fi
1703fi
1704
1705ac_tool_prefix=
1706test -n "$host_alias" && ac_tool_prefix=$host_alias-
1707
1708test "$silent" = yes && exec 6>/dev/null
1709
1710
1711ac_pwd=`pwd` && test -n "$ac_pwd" &&
1712ac_ls_di=`ls -di .` &&
1713ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1714  as_fn_error $? "working directory cannot be determined"
1715test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1716  as_fn_error $? "pwd does not report name of working directory"
1717
1718
1719# Find the source files, if location was not specified.
1720if test -z "$srcdir"; then
1721  ac_srcdir_defaulted=yes
1722  # Try the directory containing this script, then the parent directory.
1723  ac_confdir=`$as_dirname -- "$as_myself" ||
1724$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1725	 X"$as_myself" : 'X\(//\)[^/]' \| \
1726	 X"$as_myself" : 'X\(//\)$' \| \
1727	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1728$as_echo X"$as_myself" |
1729    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1730	    s//\1/
1731	    q
1732	  }
1733	  /^X\(\/\/\)[^/].*/{
1734	    s//\1/
1735	    q
1736	  }
1737	  /^X\(\/\/\)$/{
1738	    s//\1/
1739	    q
1740	  }
1741	  /^X\(\/\).*/{
1742	    s//\1/
1743	    q
1744	  }
1745	  s/.*/./; q'`
1746  srcdir=$ac_confdir
1747  if test ! -r "$srcdir/$ac_unique_file"; then
1748    srcdir=..
1749  fi
1750else
1751  ac_srcdir_defaulted=no
1752fi
1753if test ! -r "$srcdir/$ac_unique_file"; then
1754  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1755  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1756fi
1757ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1758ac_abs_confdir=`(
1759	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1760	pwd)`
1761# When building in place, set srcdir=.
1762if test "$ac_abs_confdir" = "$ac_pwd"; then
1763  srcdir=.
1764fi
1765# Remove unnecessary trailing slashes from srcdir.
1766# Double slashes in file names in object file debugging info
1767# mess up M-x gdb in Emacs.
1768case $srcdir in
1769*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1770esac
1771for ac_var in $ac_precious_vars; do
1772  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1773  eval ac_env_${ac_var}_value=\$${ac_var}
1774  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1775  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1776done
1777
1778#
1779# Report the --help message.
1780#
1781if test "$ac_init_help" = "long"; then
1782  # Omit some internal or obsolete options to make the list less imposing.
1783  # This message is too long to be a string in the A/UX 3.1 sh.
1784  cat <<_ACEOF
1785\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1786
1787Usage: $0 [OPTION]... [VAR=VALUE]...
1788
1789To assign environment variables (e.g., CC, CFLAGS...), specify them as
1790VAR=VALUE.  See below for descriptions of some of the useful variables.
1791
1792Defaults for the options are specified in brackets.
1793
1794Configuration:
1795  -h, --help              display this help and exit
1796      --help=short        display options specific to this package
1797      --help=recursive    display the short help of all the included packages
1798  -V, --version           display version information and exit
1799  -q, --quiet, --silent   do not print \`checking ...' messages
1800      --cache-file=FILE   cache test results in FILE [disabled]
1801  -C, --config-cache      alias for \`--cache-file=config.cache'
1802  -n, --no-create         do not create output files
1803      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1804
1805Installation directories:
1806  --prefix=PREFIX         install architecture-independent files in PREFIX
1807                          [$ac_default_prefix]
1808  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1809                          [PREFIX]
1810
1811By default, \`make install' will install all the files in
1812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1814for instance \`--prefix=\$HOME'.
1815
1816For better control, use the options below.
1817
1818Fine tuning of the installation directories:
1819  --bindir=DIR            user executables [EPREFIX/bin]
1820  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1821  --libexecdir=DIR        program executables [EPREFIX/libexec]
1822  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1823  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1824  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1825  --libdir=DIR            object code libraries [EPREFIX/lib]
1826  --includedir=DIR        C header files [PREFIX/include]
1827  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1828  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1829  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1830  --infodir=DIR           info documentation [DATAROOTDIR/info]
1831  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1832  --mandir=DIR            man documentation [DATAROOTDIR/man]
1833  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1834  --htmldir=DIR           html documentation [DOCDIR]
1835  --dvidir=DIR            dvi documentation [DOCDIR]
1836  --pdfdir=DIR            pdf documentation [DOCDIR]
1837  --psdir=DIR             ps documentation [DOCDIR]
1838_ACEOF
1839
1840  cat <<\_ACEOF
1841
1842X features:
1843  --x-includes=DIR    X include files are in DIR
1844  --x-libraries=DIR   X library files are in DIR
1845
1846System types:
1847  --build=BUILD     configure for building on BUILD [guessed]
1848  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1849  --target=TARGET   configure for building compilers for TARGET [HOST]
1850_ACEOF
1851fi
1852
1853if test -n "$ac_init_help"; then
1854  case $ac_init_help in
1855     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1856   esac
1857  cat <<\_ACEOF
1858
1859Optional Features:
1860  --disable-option-checking  ignore unrecognized --enable/--with options
1861  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1862  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1863  --enable-openjdk-only   suppress building custom source even if present
1864                          [disabled]
1865  --enable-debug          set the debug level to fastdebug (shorthand for
1866                          --with-debug-level=fastdebug) [disabled]
1867  --disable-headful       disable building headful support (graphical UI
1868                          support) [enabled]
1869  --enable-hotspot-test-in-build
1870                          run the Queens test after Hotspot build [disabled]
1871  --enable-unlimited-crypto
1872                          Enable unlimited crypto policy [disabled]
1873  --enable-static-build   enable static library build [disabled]
1874  --disable-warnings-as-errors
1875                          do not consider native warnings to be an error
1876                          [enabled]
1877  --disable-debug-symbols disable generation of debug symbols [enabled]
1878  --disable-zip-debug-info
1879                          disable zipping of debug-info files [enabled]
1880  --enable-native-coverage
1881                          enable native compilation with code coverage
1882                          data[disabled]
1883  --disable-freetype-bundling
1884                          disable bundling of the freetype library with the
1885                          build result [enabled on Windows or when using
1886                          --with-freetype, disabled otherwise]
1887  --enable-sjavac         use sjavac to do fast incremental compiles
1888                          [disabled]
1889  --enable-javac-server   use only the server part of sjavac for faster javac
1890                          compiles [disabled]
1891  --enable-icecc          enable distribted compilation of native code using
1892                          icecc/icecream [disabled]
1893  --disable-precompiled-headers
1894                          disable using precompiled headers when compiling C++
1895                          [enabled]
1896  --enable-ccache         enable using ccache to speed up recompilations
1897                          [disabled]
1898
1899Optional Packages:
1900  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1901  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1902  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1903                          support it), e.g. --with-target-bits=32 [guessed]
1904  --with-custom-make-dir  Deprecated. Option is kept for backwards
1905                          compatibility and is ignored
1906  --with-jdk-variant      JDK variant to build (normal) [normal]
1907  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1908  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1909                          client, minimal1, kernel, zero, zeroshark, core)
1910                          [server]
1911  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1912                          optimized (HotSpot build only)) [release]
1913  --with-devkit           use this devkit for compilers, tools and resources
1914  --with-sys-root         alias for --with-sysroot for backwards compatability
1915  --with-sysroot          use this directory as sysroot
1916  --with-tools-dir        alias for --with-toolchain-path for backwards
1917                          compatibility
1918  --with-toolchain-path   prepend these directories when searching for
1919                          toolchain binaries (compilers etc)
1920  --with-extra-path       prepend these directories to the default path
1921  --with-sdk-name         use the platform SDK of the given name. [macosx]
1922  --with-conf-name        use this as the name of the configuration [generated
1923                          from important configuration options]
1924  --with-output-sync      set make output sync type if supported by make.
1925                          [recurse]
1926  --with-cacerts-file     specify alternative cacerts file
1927  --with-milestone        Set milestone value for build [internal]
1928  --with-update-version   Set update version value for build [b00]
1929  --with-user-release-suffix
1930                          Add a custom string to the version string if build
1931                          number is not set.[username_builddateb00]
1932  --with-build-number     Set build number value for build [b00]
1933  --with-copyright-year   Set copyright year value for build [current year]
1934  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1935  --with-add-source-root  Deprecated. Option is kept for backwards
1936                          compatibility and is ignored
1937  --with-override-source-root
1938                          Deprecated. Option is kept for backwards
1939                          compatibility and is ignored
1940  --with-adds-and-overrides
1941                          Deprecated. Option is kept for backwards
1942                          compatibility and is ignored
1943  --with-override-langtools
1944                          Deprecated. Option is kept for backwards
1945                          compatibility and is ignored
1946  --with-override-corba   Deprecated. Option is kept for backwards
1947                          compatibility and is ignored
1948  --with-override-jaxp    Deprecated. Option is kept for backwards
1949                          compatibility and is ignored
1950  --with-override-jaxws   Deprecated. Option is kept for backwards
1951                          compatibility and is ignored
1952  --with-override-hotspot Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-override-nashorn Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-override-jdk     Deprecated. Option is kept for backwards
1957                          compatibility and is ignored
1958  --with-import-hotspot   import hotspot binaries from this jdk image or
1959                          hotspot build dist dir instead of building from
1960                          source
1961  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1962                          to show possible values [platform dependent]
1963  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1964  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1965  --with-extra-ldflags    extra flags to be used when linking jdk
1966  --with-toolchain-version
1967                          the version of the toolchain to look for, use
1968                          '--help' to show possible values [platform
1969                          dependent]
1970  --with-build-devkit     Devkit to use for the build platform toolchain
1971  --with-jtreg            Regression Test Harness [probed]
1972  --with-stdc++lib=<static>,<dynamic>,<default>
1973                          force linking of the C++ runtime on Linux to either
1974                          static or dynamic, default is static with dynamic as
1975                          fallback
1976  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1977                          (Windows only) [probed]
1978  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1979                          (Windows only) [probed]
1980  --with-x                use the X Window System
1981  --with-cups             specify prefix directory for the cups package
1982                          (expecting the headers under PATH/include)
1983  --with-cups-include     specify directory for the cups include files
1984  --with-freetype         specify prefix directory for the freetype package
1985                          (expecting the libraries under PATH/lib and the
1986                          headers under PATH/include)
1987  --with-freetype-include specify directory for the freetype include files
1988  --with-freetype-lib     specify directory for the freetype library
1989  --with-freetype-src     specify directory with freetype sources to
1990                          automatically build the library (experimental,
1991                          Windows-only)
1992  --with-alsa             specify prefix directory for the alsa package
1993                          (expecting the libraries under PATH/lib and the
1994                          headers under PATH/include)
1995  --with-alsa-include     specify directory for the alsa include files
1996  --with-alsa-lib         specify directory for the alsa library
1997  --with-libffi           specify prefix directory for the libffi package
1998                          (expecting the libraries under PATH/lib and the
1999                          headers under PATH/include)
2000  --with-libffi-include   specify directory for the libffi include files
2001  --with-libffi-lib       specify directory for the libffi library
2002  --with-libjpeg          use libjpeg from build system or OpenJDK source
2003                          (system, bundled) [bundled]
2004  --with-giflib           use giflib from build system or OpenJDK source
2005                          (system, bundled) [bundled]
2006  --with-libpng           use libpng from build system or OpenJDK source
2007                          (system, bundled) [bundled]
2008  --with-zlib             use zlib from build system or OpenJDK source
2009                          (system, bundled) [bundled]
2010  --with-lcms             use lcms2 from build system or OpenJDK source
2011                          (system, bundled) [bundled]
2012  --with-dxsdk            Deprecated. Option is kept for backwards
2013                          compatibility and is ignored
2014  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2015                          compatibility and is ignored
2016  --with-dxsdk-include    Deprecated. Option is kept for backwards
2017                          compatibility and is ignored
2018  --with-num-cores        number of cores in the build system, e.g.
2019                          --with-num-cores=8 [probed]
2020  --with-memory-size      memory (in MB) available in the build system, e.g.
2021                          --with-memory-size=1024 [probed]
2022  --with-jobs             number of parallel jobs to let make run [calculated
2023                          based on cores and memory]
2024  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2025                          invocations of boot JDK, overriding the default
2026                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2027                          -enableassertions"
2028  --with-sjavac-server-java
2029                          use this java binary for running the sjavac
2030                          background server [Boot JDK java]
2031  --with-ccache-dir       where to store ccache files [~/.ccache]
2032
2033Some influential environment variables:
2034  BASENAME    Override default value for BASENAME
2035  BASH        Override default value for BASH
2036  CAT         Override default value for CAT
2037  CHMOD       Override default value for CHMOD
2038  CMP         Override default value for CMP
2039  COMM        Override default value for COMM
2040  CP          Override default value for CP
2041  CUT         Override default value for CUT
2042  DATE        Override default value for DATE
2043  DIFF        Override default value for DIFF
2044  DIRNAME     Override default value for DIRNAME
2045  ECHO        Override default value for ECHO
2046  EXPR        Override default value for EXPR
2047  FILE        Override default value for FILE
2048  FIND        Override default value for FIND
2049  HEAD        Override default value for HEAD
2050  LN          Override default value for LN
2051  LS          Override default value for LS
2052  MKDIR       Override default value for MKDIR
2053  MKTEMP      Override default value for MKTEMP
2054  MV          Override default value for MV
2055  NAWK        Override default value for NAWK
2056  PRINTF      Override default value for PRINTF
2057  RM          Override default value for RM
2058  RMDIR       Override default value for RMDIR
2059  SH          Override default value for SH
2060  SORT        Override default value for SORT
2061  TAIL        Override default value for TAIL
2062  TAR         Override default value for TAR
2063  TEE         Override default value for TEE
2064  TOUCH       Override default value for TOUCH
2065  TR          Override default value for TR
2066  UNAME       Override default value for UNAME
2067  UNIQ        Override default value for UNIQ
2068  WC          Override default value for WC
2069  WHICH       Override default value for WHICH
2070  XARGS       Override default value for XARGS
2071  AWK         Override default value for AWK
2072  GREP        Override default value for GREP
2073  EGREP       Override default value for EGREP
2074  FGREP       Override default value for FGREP
2075  SED         Override default value for SED
2076  CYGPATH     Override default value for CYGPATH
2077  READLINK    Override default value for READLINK
2078  DF          Override default value for DF
2079  CPIO        Override default value for CPIO
2080  NICE        Override default value for NICE
2081  MAKE        Override default value for MAKE
2082  UNZIP       Override default value for UNZIP
2083  ZIP         Override default value for ZIP
2084  LDD         Override default value for LDD
2085  OTOOL       Override default value for OTOOL
2086  READELF     Override default value for READELF
2087  HG          Override default value for HG
2088  STAT        Override default value for STAT
2089  TIME        Override default value for TIME
2090  PATCH       Override default value for PATCH
2091  DSYMUTIL    Override default value for DSYMUTIL
2092  XATTR       Override default value for XATTR
2093  CODESIGN    Override default value for CODESIGN
2094  SETFILE     Override default value for SETFILE
2095  PKG_CONFIG  path to pkg-config utility
2096  JAVA        Override default value for JAVA
2097  JAVAC       Override default value for JAVAC
2098  JAVAH       Override default value for JAVAH
2099  JAR         Override default value for JAR
2100  JARSIGNER   Override default value for JARSIGNER
2101  CC          C compiler command
2102  CFLAGS      C compiler flags
2103  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2104              nonstandard directory <lib dir>
2105  LIBS        libraries to pass to the linker, e.g. -l<library>
2106  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2107              you have headers in a nonstandard directory <include dir>
2108  CXX         C++ compiler command
2109  CXXFLAGS    C++ compiler flags
2110  CPP         C preprocessor
2111  CXXCPP      C++ preprocessor
2112  AS          Override default value for AS
2113  AR          Override default value for AR
2114  LIPO        Override default value for LIPO
2115  STRIP       Override default value for STRIP
2116  NM          Override default value for NM
2117  GNM         Override default value for GNM
2118  OBJCOPY     Override default value for OBJCOPY
2119  OBJDUMP     Override default value for OBJDUMP
2120  BUILD_CC    Override default value for BUILD_CC
2121  BUILD_CXX   Override default value for BUILD_CXX
2122  BUILD_NM    Override default value for BUILD_NM
2123  BUILD_AR    Override default value for BUILD_AR
2124  JTREGEXE    Override default value for JTREGEXE
2125  XMKMF       Path to xmkmf, Makefile generator for X Window System
2126  FREETYPE_CFLAGS
2127              C compiler flags for FREETYPE, overriding pkg-config
2128  FREETYPE_LIBS
2129              linker flags for FREETYPE, overriding pkg-config
2130  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2131  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2132  LIBFFI_CFLAGS
2133              C compiler flags for LIBFFI, overriding pkg-config
2134  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2135  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2136  PNG_LIBS    linker flags for PNG, overriding pkg-config
2137  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2138  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2139  ICECC_CMD   Override default value for ICECC_CMD
2140  ICECC_CREATE_ENV
2141              Override default value for ICECC_CREATE_ENV
2142  ICECC_WRAPPER
2143              Override default value for ICECC_WRAPPER
2144  CCACHE      Override default value for CCACHE
2145
2146Use these variables to override the choices made by `configure' or to help
2147it to find libraries and programs with nonstandard names/locations.
2148
2149Report bugs to <build-dev@openjdk.java.net>.
2150OpenJDK home page: <http://openjdk.java.net>.
2151_ACEOF
2152ac_status=$?
2153fi
2154
2155if test "$ac_init_help" = "recursive"; then
2156  # If there are subdirs, report their specific --help.
2157  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2158    test -d "$ac_dir" ||
2159      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2160      continue
2161    ac_builddir=.
2162
2163case "$ac_dir" in
2164.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2165*)
2166  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2167  # A ".." for each directory in $ac_dir_suffix.
2168  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2169  case $ac_top_builddir_sub in
2170  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2171  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2172  esac ;;
2173esac
2174ac_abs_top_builddir=$ac_pwd
2175ac_abs_builddir=$ac_pwd$ac_dir_suffix
2176# for backward compatibility:
2177ac_top_builddir=$ac_top_build_prefix
2178
2179case $srcdir in
2180  .)  # We are building in place.
2181    ac_srcdir=.
2182    ac_top_srcdir=$ac_top_builddir_sub
2183    ac_abs_top_srcdir=$ac_pwd ;;
2184  [\\/]* | ?:[\\/]* )  # Absolute name.
2185    ac_srcdir=$srcdir$ac_dir_suffix;
2186    ac_top_srcdir=$srcdir
2187    ac_abs_top_srcdir=$srcdir ;;
2188  *) # Relative name.
2189    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2190    ac_top_srcdir=$ac_top_build_prefix$srcdir
2191    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2192esac
2193ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2194
2195    cd "$ac_dir" || { ac_status=$?; continue; }
2196    # Check for guested configure.
2197    if test -f "$ac_srcdir/configure.gnu"; then
2198      echo &&
2199      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2200    elif test -f "$ac_srcdir/configure"; then
2201      echo &&
2202      $SHELL "$ac_srcdir/configure" --help=recursive
2203    else
2204      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2205    fi || ac_status=$?
2206    cd "$ac_pwd" || { ac_status=$?; break; }
2207  done
2208fi
2209
2210test -n "$ac_init_help" && exit $ac_status
2211if $ac_init_version; then
2212  cat <<\_ACEOF
2213OpenJDK configure jdk9
2214generated by GNU Autoconf 2.69
2215
2216Copyright (C) 2012 Free Software Foundation, Inc.
2217This configure script is free software; the Free Software Foundation
2218gives unlimited permission to copy, distribute and modify it.
2219_ACEOF
2220  exit
2221fi
2222
2223## ------------------------ ##
2224## Autoconf initialization. ##
2225## ------------------------ ##
2226
2227# ac_fn_c_try_compile LINENO
2228# --------------------------
2229# Try to compile conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_c_try_compile ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  rm -f conftest.$ac_objext
2234  if { { ac_try="$ac_compile"
2235case "(($ac_try" in
2236  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2237  *) ac_try_echo=$ac_try;;
2238esac
2239eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2240$as_echo "$ac_try_echo"; } >&5
2241  (eval "$ac_compile") 2>conftest.err
2242  ac_status=$?
2243  if test -s conftest.err; then
2244    grep -v '^ *+' conftest.err >conftest.er1
2245    cat conftest.er1 >&5
2246    mv -f conftest.er1 conftest.err
2247  fi
2248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2249  test $ac_status = 0; } && {
2250	 test -z "$ac_c_werror_flag" ||
2251	 test ! -s conftest.err
2252       } && test -s conftest.$ac_objext; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258	ac_retval=1
2259fi
2260  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261  as_fn_set_status $ac_retval
2262
2263} # ac_fn_c_try_compile
2264
2265# ac_fn_cxx_try_compile LINENO
2266# ----------------------------
2267# Try to compile conftest.$ac_ext, and return whether this succeeded.
2268ac_fn_cxx_try_compile ()
2269{
2270  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271  rm -f conftest.$ac_objext
2272  if { { ac_try="$ac_compile"
2273case "(($ac_try" in
2274  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275  *) ac_try_echo=$ac_try;;
2276esac
2277eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2278$as_echo "$ac_try_echo"; } >&5
2279  (eval "$ac_compile") 2>conftest.err
2280  ac_status=$?
2281  if test -s conftest.err; then
2282    grep -v '^ *+' conftest.err >conftest.er1
2283    cat conftest.er1 >&5
2284    mv -f conftest.er1 conftest.err
2285  fi
2286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2287  test $ac_status = 0; } && {
2288	 test -z "$ac_cxx_werror_flag" ||
2289	 test ! -s conftest.err
2290       } && test -s conftest.$ac_objext; then :
2291  ac_retval=0
2292else
2293  $as_echo "$as_me: failed program was:" >&5
2294sed 's/^/| /' conftest.$ac_ext >&5
2295
2296	ac_retval=1
2297fi
2298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299  as_fn_set_status $ac_retval
2300
2301} # ac_fn_cxx_try_compile
2302
2303# ac_fn_c_try_cpp LINENO
2304# ----------------------
2305# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2306ac_fn_c_try_cpp ()
2307{
2308  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309  if { { ac_try="$ac_cpp conftest.$ac_ext"
2310case "(($ac_try" in
2311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2312  *) ac_try_echo=$ac_try;;
2313esac
2314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2315$as_echo "$ac_try_echo"; } >&5
2316  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2317  ac_status=$?
2318  if test -s conftest.err; then
2319    grep -v '^ *+' conftest.err >conftest.er1
2320    cat conftest.er1 >&5
2321    mv -f conftest.er1 conftest.err
2322  fi
2323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2324  test $ac_status = 0; } > conftest.i && {
2325	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2326	 test ! -s conftest.err
2327       }; then :
2328  ac_retval=0
2329else
2330  $as_echo "$as_me: failed program was:" >&5
2331sed 's/^/| /' conftest.$ac_ext >&5
2332
2333    ac_retval=1
2334fi
2335  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336  as_fn_set_status $ac_retval
2337
2338} # ac_fn_c_try_cpp
2339
2340# ac_fn_cxx_try_cpp LINENO
2341# ------------------------
2342# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2343ac_fn_cxx_try_cpp ()
2344{
2345  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346  if { { ac_try="$ac_cpp conftest.$ac_ext"
2347case "(($ac_try" in
2348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349  *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2354  ac_status=$?
2355  if test -s conftest.err; then
2356    grep -v '^ *+' conftest.err >conftest.er1
2357    cat conftest.er1 >&5
2358    mv -f conftest.er1 conftest.err
2359  fi
2360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361  test $ac_status = 0; } > conftest.i && {
2362	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2363	 test ! -s conftest.err
2364       }; then :
2365  ac_retval=0
2366else
2367  $as_echo "$as_me: failed program was:" >&5
2368sed 's/^/| /' conftest.$ac_ext >&5
2369
2370    ac_retval=1
2371fi
2372  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2373  as_fn_set_status $ac_retval
2374
2375} # ac_fn_cxx_try_cpp
2376
2377# ac_fn_c_try_link LINENO
2378# -----------------------
2379# Try to link conftest.$ac_ext, and return whether this succeeded.
2380ac_fn_c_try_link ()
2381{
2382  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2383  rm -f conftest.$ac_objext conftest$ac_exeext
2384  if { { ac_try="$ac_link"
2385case "(($ac_try" in
2386  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2387  *) ac_try_echo=$ac_try;;
2388esac
2389eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2390$as_echo "$ac_try_echo"; } >&5
2391  (eval "$ac_link") 2>conftest.err
2392  ac_status=$?
2393  if test -s conftest.err; then
2394    grep -v '^ *+' conftest.err >conftest.er1
2395    cat conftest.er1 >&5
2396    mv -f conftest.er1 conftest.err
2397  fi
2398  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2399  test $ac_status = 0; } && {
2400	 test -z "$ac_c_werror_flag" ||
2401	 test ! -s conftest.err
2402       } && test -s conftest$ac_exeext && {
2403	 test "$cross_compiling" = yes ||
2404	 test -x conftest$ac_exeext
2405       }; then :
2406  ac_retval=0
2407else
2408  $as_echo "$as_me: failed program was:" >&5
2409sed 's/^/| /' conftest.$ac_ext >&5
2410
2411	ac_retval=1
2412fi
2413  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2414  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2415  # interfere with the next link command; also delete a directory that is
2416  # left behind by Apple's compiler.  We do this before executing the actions.
2417  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2418  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419  as_fn_set_status $ac_retval
2420
2421} # ac_fn_c_try_link
2422
2423# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2424# ---------------------------------------------------------
2425# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2426# the include files in INCLUDES and setting the cache variable VAR
2427# accordingly.
2428ac_fn_cxx_check_header_mongrel ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  if eval \${$3+:} false; then :
2432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2433$as_echo_n "checking for $2... " >&6; }
2434if eval \${$3+:} false; then :
2435  $as_echo_n "(cached) " >&6
2436fi
2437eval ac_res=\$$3
2438	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439$as_echo "$ac_res" >&6; }
2440else
2441  # Is the header compilable?
2442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2443$as_echo_n "checking $2 usability... " >&6; }
2444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445/* end confdefs.h.  */
2446$4
2447#include <$2>
2448_ACEOF
2449if ac_fn_cxx_try_compile "$LINENO"; then :
2450  ac_header_compiler=yes
2451else
2452  ac_header_compiler=no
2453fi
2454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2456$as_echo "$ac_header_compiler" >&6; }
2457
2458# Is the header present?
2459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2460$as_echo_n "checking $2 presence... " >&6; }
2461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463#include <$2>
2464_ACEOF
2465if ac_fn_cxx_try_cpp "$LINENO"; then :
2466  ac_header_preproc=yes
2467else
2468  ac_header_preproc=no
2469fi
2470rm -f conftest.err conftest.i conftest.$ac_ext
2471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2472$as_echo "$ac_header_preproc" >&6; }
2473
2474# So?  What about this header?
2475case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2476  yes:no: )
2477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2478$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2479    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2480$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2481    ;;
2482  no:yes:* )
2483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2484$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2485    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2486$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2487    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2488$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2489    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2490$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2491    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2492$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2493( $as_echo "## ----------------------------------------- ##
2494## Report this to build-dev@openjdk.java.net ##
2495## ----------------------------------------- ##"
2496     ) | sed "s/^/$as_me: WARNING:     /" >&2
2497    ;;
2498esac
2499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2500$as_echo_n "checking for $2... " >&6; }
2501if eval \${$3+:} false; then :
2502  $as_echo_n "(cached) " >&6
2503else
2504  eval "$3=\$ac_header_compiler"
2505fi
2506eval ac_res=\$$3
2507	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2508$as_echo "$ac_res" >&6; }
2509fi
2510  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2511
2512} # ac_fn_cxx_check_header_mongrel
2513
2514# ac_fn_cxx_try_run LINENO
2515# ------------------------
2516# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2517# that executables *can* be run.
2518ac_fn_cxx_try_run ()
2519{
2520  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2521  if { { ac_try="$ac_link"
2522case "(($ac_try" in
2523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2524  *) ac_try_echo=$ac_try;;
2525esac
2526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2527$as_echo "$ac_try_echo"; } >&5
2528  (eval "$ac_link") 2>&5
2529  ac_status=$?
2530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2531  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2532  { { case "(($ac_try" in
2533  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2534  *) ac_try_echo=$ac_try;;
2535esac
2536eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2537$as_echo "$ac_try_echo"; } >&5
2538  (eval "$ac_try") 2>&5
2539  ac_status=$?
2540  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2541  test $ac_status = 0; }; }; then :
2542  ac_retval=0
2543else
2544  $as_echo "$as_me: program exited with status $ac_status" >&5
2545       $as_echo "$as_me: failed program was:" >&5
2546sed 's/^/| /' conftest.$ac_ext >&5
2547
2548       ac_retval=$ac_status
2549fi
2550  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2551  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2552  as_fn_set_status $ac_retval
2553
2554} # ac_fn_cxx_try_run
2555
2556# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2557# ---------------------------------------------------------
2558# Tests whether HEADER exists and can be compiled using the include files in
2559# INCLUDES, setting the cache variable VAR accordingly.
2560ac_fn_cxx_check_header_compile ()
2561{
2562  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2564$as_echo_n "checking for $2... " >&6; }
2565if eval \${$3+:} false; then :
2566  $as_echo_n "(cached) " >&6
2567else
2568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2569/* end confdefs.h.  */
2570$4
2571#include <$2>
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  eval "$3=yes"
2575else
2576  eval "$3=no"
2577fi
2578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2579fi
2580eval ac_res=\$$3
2581	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582$as_echo "$ac_res" >&6; }
2583  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2584
2585} # ac_fn_cxx_check_header_compile
2586
2587# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2588# ----------------------------------------------
2589# Tries to find the compile-time value of EXPR in a program that includes
2590# INCLUDES, setting VAR accordingly. Returns whether the value could be
2591# computed
2592ac_fn_cxx_compute_int ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if test "$cross_compiling" = yes; then
2596    # Depending upon the size, compute the lo and hi bounds.
2597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2598/* end confdefs.h.  */
2599$4
2600int
2601main ()
2602{
2603static int test_array [1 - 2 * !(($2) >= 0)];
2604test_array [0] = 0;
2605return test_array [0];
2606
2607  ;
2608  return 0;
2609}
2610_ACEOF
2611if ac_fn_cxx_try_compile "$LINENO"; then :
2612  ac_lo=0 ac_mid=0
2613  while :; do
2614    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616$4
2617int
2618main ()
2619{
2620static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2621test_array [0] = 0;
2622return test_array [0];
2623
2624  ;
2625  return 0;
2626}
2627_ACEOF
2628if ac_fn_cxx_try_compile "$LINENO"; then :
2629  ac_hi=$ac_mid; break
2630else
2631  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2632			if test $ac_lo -le $ac_mid; then
2633			  ac_lo= ac_hi=
2634			  break
2635			fi
2636			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2637fi
2638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2639  done
2640else
2641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2642/* end confdefs.h.  */
2643$4
2644int
2645main ()
2646{
2647static int test_array [1 - 2 * !(($2) < 0)];
2648test_array [0] = 0;
2649return test_array [0];
2650
2651  ;
2652  return 0;
2653}
2654_ACEOF
2655if ac_fn_cxx_try_compile "$LINENO"; then :
2656  ac_hi=-1 ac_mid=-1
2657  while :; do
2658    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2659/* end confdefs.h.  */
2660$4
2661int
2662main ()
2663{
2664static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2665test_array [0] = 0;
2666return test_array [0];
2667
2668  ;
2669  return 0;
2670}
2671_ACEOF
2672if ac_fn_cxx_try_compile "$LINENO"; then :
2673  ac_lo=$ac_mid; break
2674else
2675  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2676			if test $ac_mid -le $ac_hi; then
2677			  ac_lo= ac_hi=
2678			  break
2679			fi
2680			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2681fi
2682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2683  done
2684else
2685  ac_lo= ac_hi=
2686fi
2687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2688fi
2689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2690# Binary search between lo and hi bounds.
2691while test "x$ac_lo" != "x$ac_hi"; do
2692  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2694/* end confdefs.h.  */
2695$4
2696int
2697main ()
2698{
2699static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2700test_array [0] = 0;
2701return test_array [0];
2702
2703  ;
2704  return 0;
2705}
2706_ACEOF
2707if ac_fn_cxx_try_compile "$LINENO"; then :
2708  ac_hi=$ac_mid
2709else
2710  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2711fi
2712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2713done
2714case $ac_lo in #((
2715?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2716'') ac_retval=1 ;;
2717esac
2718  else
2719    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720/* end confdefs.h.  */
2721$4
2722static long int longval () { return $2; }
2723static unsigned long int ulongval () { return $2; }
2724#include <stdio.h>
2725#include <stdlib.h>
2726int
2727main ()
2728{
2729
2730  FILE *f = fopen ("conftest.val", "w");
2731  if (! f)
2732    return 1;
2733  if (($2) < 0)
2734    {
2735      long int i = longval ();
2736      if (i != ($2))
2737	return 1;
2738      fprintf (f, "%ld", i);
2739    }
2740  else
2741    {
2742      unsigned long int i = ulongval ();
2743      if (i != ($2))
2744	return 1;
2745      fprintf (f, "%lu", i);
2746    }
2747  /* Do not output a trailing newline, as this causes \r\n confusion
2748     on some platforms.  */
2749  return ferror (f) || fclose (f) != 0;
2750
2751  ;
2752  return 0;
2753}
2754_ACEOF
2755if ac_fn_cxx_try_run "$LINENO"; then :
2756  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2757else
2758  ac_retval=1
2759fi
2760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2761  conftest.$ac_objext conftest.beam conftest.$ac_ext
2762rm -f conftest.val
2763
2764  fi
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766  as_fn_set_status $ac_retval
2767
2768} # ac_fn_cxx_compute_int
2769
2770# ac_fn_cxx_try_link LINENO
2771# -------------------------
2772# Try to link conftest.$ac_ext, and return whether this succeeded.
2773ac_fn_cxx_try_link ()
2774{
2775  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2776  rm -f conftest.$ac_objext conftest$ac_exeext
2777  if { { ac_try="$ac_link"
2778case "(($ac_try" in
2779  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2780  *) ac_try_echo=$ac_try;;
2781esac
2782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2783$as_echo "$ac_try_echo"; } >&5
2784  (eval "$ac_link") 2>conftest.err
2785  ac_status=$?
2786  if test -s conftest.err; then
2787    grep -v '^ *+' conftest.err >conftest.er1
2788    cat conftest.er1 >&5
2789    mv -f conftest.er1 conftest.err
2790  fi
2791  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2792  test $ac_status = 0; } && {
2793	 test -z "$ac_cxx_werror_flag" ||
2794	 test ! -s conftest.err
2795       } && test -s conftest$ac_exeext && {
2796	 test "$cross_compiling" = yes ||
2797	 test -x conftest$ac_exeext
2798       }; then :
2799  ac_retval=0
2800else
2801  $as_echo "$as_me: failed program was:" >&5
2802sed 's/^/| /' conftest.$ac_ext >&5
2803
2804	ac_retval=1
2805fi
2806  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2807  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2808  # interfere with the next link command; also delete a directory that is
2809  # left behind by Apple's compiler.  We do this before executing the actions.
2810  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2811  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2812  as_fn_set_status $ac_retval
2813
2814} # ac_fn_cxx_try_link
2815
2816# ac_fn_cxx_check_func LINENO FUNC VAR
2817# ------------------------------------
2818# Tests whether FUNC exists, setting the cache variable VAR accordingly
2819ac_fn_cxx_check_func ()
2820{
2821  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2823$as_echo_n "checking for $2... " >&6; }
2824if eval \${$3+:} false; then :
2825  $as_echo_n "(cached) " >&6
2826else
2827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2828/* end confdefs.h.  */
2829/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2830   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2831#define $2 innocuous_$2
2832
2833/* System header to define __stub macros and hopefully few prototypes,
2834    which can conflict with char $2 (); below.
2835    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2836    <limits.h> exists even on freestanding compilers.  */
2837
2838#ifdef __STDC__
2839# include <limits.h>
2840#else
2841# include <assert.h>
2842#endif
2843
2844#undef $2
2845
2846/* Override any GCC internal prototype to avoid an error.
2847   Use char because int might match the return type of a GCC
2848   builtin and then its argument prototype would still apply.  */
2849#ifdef __cplusplus
2850extern "C"
2851#endif
2852char $2 ();
2853/* The GNU C library defines this for functions which it implements
2854    to always fail with ENOSYS.  Some functions are actually named
2855    something starting with __ and the normal name is an alias.  */
2856#if defined __stub_$2 || defined __stub___$2
2857choke me
2858#endif
2859
2860int
2861main ()
2862{
2863return $2 ();
2864  ;
2865  return 0;
2866}
2867_ACEOF
2868if ac_fn_cxx_try_link "$LINENO"; then :
2869  eval "$3=yes"
2870else
2871  eval "$3=no"
2872fi
2873rm -f core conftest.err conftest.$ac_objext \
2874    conftest$ac_exeext conftest.$ac_ext
2875fi
2876eval ac_res=\$$3
2877	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2878$as_echo "$ac_res" >&6; }
2879  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2880
2881} # ac_fn_cxx_check_func
2882
2883# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2884# -------------------------------------------------------
2885# Tests whether HEADER exists and can be compiled using the include files in
2886# INCLUDES, setting the cache variable VAR accordingly.
2887ac_fn_c_check_header_compile ()
2888{
2889  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2890  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2891$as_echo_n "checking for $2... " >&6; }
2892if eval \${$3+:} false; then :
2893  $as_echo_n "(cached) " >&6
2894else
2895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2896/* end confdefs.h.  */
2897$4
2898#include <$2>
2899_ACEOF
2900if ac_fn_c_try_compile "$LINENO"; then :
2901  eval "$3=yes"
2902else
2903  eval "$3=no"
2904fi
2905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2906fi
2907eval ac_res=\$$3
2908	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2909$as_echo "$ac_res" >&6; }
2910  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2911
2912} # ac_fn_c_check_header_compile
2913cat >config.log <<_ACEOF
2914This file contains any messages produced by compilers while
2915running configure, to aid debugging if configure makes a mistake.
2916
2917It was created by OpenJDK $as_me jdk9, which was
2918generated by GNU Autoconf 2.69.  Invocation command line was
2919
2920  $ $0 $@
2921
2922_ACEOF
2923exec 5>>config.log
2924{
2925cat <<_ASUNAME
2926## --------- ##
2927## Platform. ##
2928## --------- ##
2929
2930hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2931uname -m = `(uname -m) 2>/dev/null || echo unknown`
2932uname -r = `(uname -r) 2>/dev/null || echo unknown`
2933uname -s = `(uname -s) 2>/dev/null || echo unknown`
2934uname -v = `(uname -v) 2>/dev/null || echo unknown`
2935
2936/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2937/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2938
2939/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2940/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2941/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2942/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2943/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2944/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2945/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2946
2947_ASUNAME
2948
2949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2950for as_dir in $PATH
2951do
2952  IFS=$as_save_IFS
2953  test -z "$as_dir" && as_dir=.
2954    $as_echo "PATH: $as_dir"
2955  done
2956IFS=$as_save_IFS
2957
2958} >&5
2959
2960cat >&5 <<_ACEOF
2961
2962
2963## ----------- ##
2964## Core tests. ##
2965## ----------- ##
2966
2967_ACEOF
2968
2969
2970# Keep a trace of the command line.
2971# Strip out --no-create and --no-recursion so they do not pile up.
2972# Strip out --silent because we don't want to record it for future runs.
2973# Also quote any args containing shell meta-characters.
2974# Make two passes to allow for proper duplicate-argument suppression.
2975ac_configure_args=
2976ac_configure_args0=
2977ac_configure_args1=
2978ac_must_keep_next=false
2979for ac_pass in 1 2
2980do
2981  for ac_arg
2982  do
2983    case $ac_arg in
2984    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2985    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2986    | -silent | --silent | --silen | --sile | --sil)
2987      continue ;;
2988    *\'*)
2989      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2990    esac
2991    case $ac_pass in
2992    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2993    2)
2994      as_fn_append ac_configure_args1 " '$ac_arg'"
2995      if test $ac_must_keep_next = true; then
2996	ac_must_keep_next=false # Got value, back to normal.
2997      else
2998	case $ac_arg in
2999	  *=* | --config-cache | -C | -disable-* | --disable-* \
3000	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3001	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3002	  | -with-* | --with-* | -without-* | --without-* | --x)
3003	    case "$ac_configure_args0 " in
3004	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3005	    esac
3006	    ;;
3007	  -* ) ac_must_keep_next=true ;;
3008	esac
3009      fi
3010      as_fn_append ac_configure_args " '$ac_arg'"
3011      ;;
3012    esac
3013  done
3014done
3015{ ac_configure_args0=; unset ac_configure_args0;}
3016{ ac_configure_args1=; unset ac_configure_args1;}
3017
3018# When interrupted or exit'd, cleanup temporary files, and complete
3019# config.log.  We remove comments because anyway the quotes in there
3020# would cause problems or look ugly.
3021# WARNING: Use '\'' to represent an apostrophe within the trap.
3022# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3023trap 'exit_status=$?
3024  # Save into config.log some information that might help in debugging.
3025  {
3026    echo
3027
3028    $as_echo "## ---------------- ##
3029## Cache variables. ##
3030## ---------------- ##"
3031    echo
3032    # The following way of writing the cache mishandles newlines in values,
3033(
3034  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3035    eval ac_val=\$$ac_var
3036    case $ac_val in #(
3037    *${as_nl}*)
3038      case $ac_var in #(
3039      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3040$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3041      esac
3042      case $ac_var in #(
3043      _ | IFS | as_nl) ;; #(
3044      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3045      *) { eval $ac_var=; unset $ac_var;} ;;
3046      esac ;;
3047    esac
3048  done
3049  (set) 2>&1 |
3050    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3051    *${as_nl}ac_space=\ *)
3052      sed -n \
3053	"s/'\''/'\''\\\\'\'''\''/g;
3054	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3055      ;; #(
3056    *)
3057      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3058      ;;
3059    esac |
3060    sort
3061)
3062    echo
3063
3064    $as_echo "## ----------------- ##
3065## Output variables. ##
3066## ----------------- ##"
3067    echo
3068    for ac_var in $ac_subst_vars
3069    do
3070      eval ac_val=\$$ac_var
3071      case $ac_val in
3072      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3073      esac
3074      $as_echo "$ac_var='\''$ac_val'\''"
3075    done | sort
3076    echo
3077
3078    if test -n "$ac_subst_files"; then
3079      $as_echo "## ------------------- ##
3080## File substitutions. ##
3081## ------------------- ##"
3082      echo
3083      for ac_var in $ac_subst_files
3084      do
3085	eval ac_val=\$$ac_var
3086	case $ac_val in
3087	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3088	esac
3089	$as_echo "$ac_var='\''$ac_val'\''"
3090      done | sort
3091      echo
3092    fi
3093
3094    if test -s confdefs.h; then
3095      $as_echo "## ----------- ##
3096## confdefs.h. ##
3097## ----------- ##"
3098      echo
3099      cat confdefs.h
3100      echo
3101    fi
3102    test "$ac_signal" != 0 &&
3103      $as_echo "$as_me: caught signal $ac_signal"
3104    $as_echo "$as_me: exit $exit_status"
3105  } >&5
3106  rm -f core *.core core.conftest.* &&
3107    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3108    exit $exit_status
3109' 0
3110for ac_signal in 1 2 13 15; do
3111  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3112done
3113ac_signal=0
3114
3115# confdefs.h avoids OS command line length limits that DEFS can exceed.
3116rm -f -r conftest* confdefs.h
3117
3118$as_echo "/* confdefs.h */" > confdefs.h
3119
3120# Predefined preprocessor variables.
3121
3122cat >>confdefs.h <<_ACEOF
3123#define PACKAGE_NAME "$PACKAGE_NAME"
3124_ACEOF
3125
3126cat >>confdefs.h <<_ACEOF
3127#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3128_ACEOF
3129
3130cat >>confdefs.h <<_ACEOF
3131#define PACKAGE_VERSION "$PACKAGE_VERSION"
3132_ACEOF
3133
3134cat >>confdefs.h <<_ACEOF
3135#define PACKAGE_STRING "$PACKAGE_STRING"
3136_ACEOF
3137
3138cat >>confdefs.h <<_ACEOF
3139#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3140_ACEOF
3141
3142cat >>confdefs.h <<_ACEOF
3143#define PACKAGE_URL "$PACKAGE_URL"
3144_ACEOF
3145
3146
3147# Let the site file select an alternate cache file if it wants to.
3148# Prefer an explicitly selected file to automatically selected ones.
3149ac_site_file1=NONE
3150ac_site_file2=NONE
3151if test -n "$CONFIG_SITE"; then
3152  # We do not want a PATH search for config.site.
3153  case $CONFIG_SITE in #((
3154    -*)  ac_site_file1=./$CONFIG_SITE;;
3155    */*) ac_site_file1=$CONFIG_SITE;;
3156    *)   ac_site_file1=./$CONFIG_SITE;;
3157  esac
3158elif test "x$prefix" != xNONE; then
3159  ac_site_file1=$prefix/share/config.site
3160  ac_site_file2=$prefix/etc/config.site
3161else
3162  ac_site_file1=$ac_default_prefix/share/config.site
3163  ac_site_file2=$ac_default_prefix/etc/config.site
3164fi
3165for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3166do
3167  test "x$ac_site_file" = xNONE && continue
3168  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3169    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3170$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3171    sed 's/^/| /' "$ac_site_file" >&5
3172    . "$ac_site_file" \
3173      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3175as_fn_error $? "failed to load site script $ac_site_file
3176See \`config.log' for more details" "$LINENO" 5; }
3177  fi
3178done
3179
3180if test -r "$cache_file"; then
3181  # Some versions of bash will fail to source /dev/null (special files
3182  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3183  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3184    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3185$as_echo "$as_me: loading cache $cache_file" >&6;}
3186    case $cache_file in
3187      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3188      *)                      . "./$cache_file";;
3189    esac
3190  fi
3191else
3192  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3193$as_echo "$as_me: creating cache $cache_file" >&6;}
3194  >$cache_file
3195fi
3196
3197# Check that the precious variables saved in the cache have kept the same
3198# value.
3199ac_cache_corrupted=false
3200for ac_var in $ac_precious_vars; do
3201  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3202  eval ac_new_set=\$ac_env_${ac_var}_set
3203  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3204  eval ac_new_val=\$ac_env_${ac_var}_value
3205  case $ac_old_set,$ac_new_set in
3206    set,)
3207      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3208$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3209      ac_cache_corrupted=: ;;
3210    ,set)
3211      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3212$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3213      ac_cache_corrupted=: ;;
3214    ,);;
3215    *)
3216      if test "x$ac_old_val" != "x$ac_new_val"; then
3217	# differences in whitespace do not lead to failure.
3218	ac_old_val_w=`echo x $ac_old_val`
3219	ac_new_val_w=`echo x $ac_new_val`
3220	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3221	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3222$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3223	  ac_cache_corrupted=:
3224	else
3225	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3226$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3227	  eval $ac_var=\$ac_old_val
3228	fi
3229	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3230$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3231	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3232$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3233      fi;;
3234  esac
3235  # Pass precious variables to config.status.
3236  if test "$ac_new_set" = set; then
3237    case $ac_new_val in
3238    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3239    *) ac_arg=$ac_var=$ac_new_val ;;
3240    esac
3241    case " $ac_configure_args " in
3242      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3243      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3244    esac
3245  fi
3246done
3247if $ac_cache_corrupted; then
3248  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3250  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3251$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3252  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3253fi
3254## -------------------- ##
3255## Main body of script. ##
3256## -------------------- ##
3257
3258ac_ext=c
3259ac_cpp='$CPP $CPPFLAGS'
3260ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3261ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3262ac_compiler_gnu=$ac_cv_c_compiler_gnu
3263
3264
3265
3266ac_aux_dir=
3267for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3268  if test -f "$ac_dir/install-sh"; then
3269    ac_aux_dir=$ac_dir
3270    ac_install_sh="$ac_aux_dir/install-sh -c"
3271    break
3272  elif test -f "$ac_dir/install.sh"; then
3273    ac_aux_dir=$ac_dir
3274    ac_install_sh="$ac_aux_dir/install.sh -c"
3275    break
3276  elif test -f "$ac_dir/shtool"; then
3277    ac_aux_dir=$ac_dir
3278    ac_install_sh="$ac_aux_dir/shtool install -c"
3279    break
3280  fi
3281done
3282if test -z "$ac_aux_dir"; then
3283  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
3284fi
3285
3286# These three variables are undocumented and unsupported,
3287# and are intended to be withdrawn in a future Autoconf release.
3288# They can cause serious problems if a builder's source tree is in a directory
3289# whose full name contains unusual characters.
3290ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3291ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3292ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3293
3294
3295# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3296
3297#
3298# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3300#
3301# This code is free software; you can redistribute it and/or modify it
3302# under the terms of the GNU General Public License version 2 only, as
3303# published by the Free Software Foundation.  Oracle designates this
3304# particular file as subject to the "Classpath" exception as provided
3305# by Oracle in the LICENSE file that accompanied this code.
3306#
3307# This code is distributed in the hope that it will be useful, but WITHOUT
3308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3310# version 2 for more details (a copy is included in the LICENSE file that
3311# accompanied this code).
3312#
3313# You should have received a copy of the GNU General Public License version
3314# 2 along with this work; if not, write to the Free Software Foundation,
3315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3316#
3317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3318# or visit www.oracle.com if you need additional information or have any
3319# questions.
3320#
3321
3322#
3323# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3324#
3325# This program is free software; you can redistribute it and/or modify
3326# it under the terms of the GNU General Public License as published by
3327# the Free Software Foundation; either version 2 of the License, or
3328# (at your option) any later version.
3329#
3330# This program is distributed in the hope that it will be useful, but
3331# WITHOUT ANY WARRANTY; without even the implied warranty of
3332# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3333# General Public License for more details.
3334#
3335# You should have received a copy of the GNU General Public License
3336# along with this program; if not, write to the Free Software
3337# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3338#
3339# As a special exception to the GNU General Public License, if you
3340# distribute this file as part of a program that contains a
3341# configuration script generated by Autoconf, you may include it under
3342# the same distribution terms that you use for the rest of that program.
3343
3344# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3345# ----------------------------------
3346# PKG_PROG_PKG_CONFIG
3347
3348# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3349#
3350# Check to see whether a particular set of modules exists.  Similar
3351# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3352#
3353#
3354# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3355# this or PKG_CHECK_MODULES is called, or make sure to call
3356# PKG_CHECK_EXISTS manually
3357# --------------------------------------------------------------
3358
3359
3360
3361# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3362# ---------------------------------------------
3363# _PKG_CONFIG
3364
3365# _PKG_SHORT_ERRORS_SUPPORTED
3366# -----------------------------
3367# _PKG_SHORT_ERRORS_SUPPORTED
3368
3369
3370# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3371# [ACTION-IF-NOT-FOUND])
3372#
3373#
3374# Note that if there is a possibility the first call to
3375# PKG_CHECK_MODULES might not happen, you should be sure to include an
3376# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3377#
3378#
3379# --------------------------------------------------------------
3380# PKG_CHECK_MODULES
3381
3382
3383# Include these first...
3384#
3385# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3386# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3387#
3388# This code is free software; you can redistribute it and/or modify it
3389# under the terms of the GNU General Public License version 2 only, as
3390# published by the Free Software Foundation.  Oracle designates this
3391# particular file as subject to the "Classpath" exception as provided
3392# by Oracle in the LICENSE file that accompanied this code.
3393#
3394# This code is distributed in the hope that it will be useful, but WITHOUT
3395# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3396# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3397# version 2 for more details (a copy is included in the LICENSE file that
3398# accompanied this code).
3399#
3400# You should have received a copy of the GNU General Public License version
3401# 2 along with this work; if not, write to the Free Software Foundation,
3402# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3403#
3404# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3405# or visit www.oracle.com if you need additional information or have any
3406# questions.
3407#
3408
3409# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3410# If so, then append $1 to $2 \
3411# Also set JVM_ARG_OK to true/false depending on outcome.
3412
3413
3414# Appends a string to a path variable, only adding the : when needed.
3415
3416
3417# Prepends a string to a path variable, only adding the : when needed.
3418
3419
3420# This will make sure the given variable points to a full and proper
3421# path. This means:
3422# 1) There will be no spaces in the path. On unix platforms,
3423#    spaces in the path will result in an error. On Windows,
3424#    the path will be rewritten using short-style to be space-free.
3425# 2) The path will be absolute, and it will be in unix-style (on
3426#     cygwin).
3427# $1: The name of the variable to fix
3428
3429
3430# This will make sure the given variable points to a executable
3431# with a full and proper path. This means:
3432# 1) There will be no spaces in the path. On unix platforms,
3433#    spaces in the path will result in an error. On Windows,
3434#    the path will be rewritten using short-style to be space-free.
3435# 2) The path will be absolute, and it will be in unix-style (on
3436#     cygwin).
3437# Any arguments given to the executable is preserved.
3438# If the input variable does not have a directory specification, then
3439# it need to be in the PATH.
3440# $1: The name of the variable to fix
3441
3442
3443
3444
3445# Register a --with argument but mark it as deprecated
3446# $1: The name of the with argument to deprecate, not including --with-
3447
3448
3449# Register a --enable argument but mark it as deprecated
3450# $1: The name of the with argument to deprecate, not including --enable-
3451# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3452
3453
3454
3455
3456# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3457# $1: variable to check
3458
3459
3460# Check that there are no unprocessed overridden variables left.
3461# If so, they are an incorrect argument and we will exit with an error.
3462
3463
3464# Setup a tool for the given variable. If correctly specified by the user,
3465# use that value, otherwise search for the tool using the supplied code snippet.
3466# $1: variable to set
3467# $2: code snippet to call to look for the tool
3468# $3: code snippet to call if variable was used to find tool
3469
3470
3471# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3477# $1: variable to set
3478# $2: executable name (or list of names) to look for
3479
3480
3481# Like BASIC_PATH_PROGS but fails if no tool was found.
3482# $1: variable to set
3483# $2: executable name (or list of names) to look for
3484
3485
3486# Like BASIC_SETUP_TOOL but fails if no tool was found.
3487# $1: variable to set
3488# $2: autoconf macro to call to look for the special tool
3489
3490
3491# Setup the most fundamental tools that relies on not much else to set up,
3492# but is used by much of the early bootstrap code.
3493
3494
3495# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3496
3497
3498# Evaluates platform specific overrides for devkit variables.
3499# $1: Name of variable
3500
3501
3502
3503
3504
3505
3506#%%% Simple tools %%%
3507
3508# Check if we have found a usable version of make
3509# $1: the path to a potential make binary (or empty)
3510# $2: the description on how we found this
3511
3512
3513
3514
3515# Goes looking for a usable version of GNU make.
3516
3517
3518
3519
3520
3521
3522# Check if build directory is on local disk. If not possible to determine,
3523# we prefer to claim it's local.
3524# Argument 1: directory to test
3525# Argument 2: what to do if it is on local disk
3526# Argument 3: what to do otherwise (remote disk or failure)
3527
3528
3529# Check that source files have basic read permissions set. This might
3530# not be the case in cygwin in certain conditions.
3531
3532
3533
3534
3535# Check for support for specific options in bash
3536
3537
3538# Code to run after AC_OUTPUT
3539
3540
3541#
3542# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3543# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3544#
3545# This code is free software; you can redistribute it and/or modify it
3546# under the terms of the GNU General Public License version 2 only, as
3547# published by the Free Software Foundation.  Oracle designates this
3548# particular file as subject to the "Classpath" exception as provided
3549# by Oracle in the LICENSE file that accompanied this code.
3550#
3551# This code is distributed in the hope that it will be useful, but WITHOUT
3552# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3553# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3554# version 2 for more details (a copy is included in the LICENSE file that
3555# accompanied this code).
3556#
3557# You should have received a copy of the GNU General Public License version
3558# 2 along with this work; if not, write to the Free Software Foundation,
3559# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3560#
3561# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3562# or visit www.oracle.com if you need additional information or have any
3563# questions.
3564#
3565
3566
3567
3568
3569
3570# Helper function which possibly converts a path using DOS-style short mode.
3571# If so, the updated path is stored in $new_path.
3572# $1: The path to check
3573
3574
3575# Helper function which possibly converts a path using DOS-style short mode.
3576# If so, the updated path is stored in $new_path.
3577# $1: The path to check
3578
3579
3580# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3581# and could probably be heavily simplified. However, all changes in this
3582# area tend to need lot of testing in different scenarios, and in lack of
3583# proper unit testing, cleaning this up has not been deemed worth the effort
3584# at the moment.
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3595
3596
3597
3598
3599# ... then the rest
3600#
3601# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3602# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3603#
3604# This code is free software; you can redistribute it and/or modify it
3605# under the terms of the GNU General Public License version 2 only, as
3606# published by the Free Software Foundation.  Oracle designates this
3607# particular file as subject to the "Classpath" exception as provided
3608# by Oracle in the LICENSE file that accompanied this code.
3609#
3610# This code is distributed in the hope that it will be useful, but WITHOUT
3611# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3612# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3613# version 2 for more details (a copy is included in the LICENSE file that
3614# accompanied this code).
3615#
3616# You should have received a copy of the GNU General Public License version
3617# 2 along with this work; if not, write to the Free Software Foundation,
3618# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3619#
3620# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3621# or visit www.oracle.com if you need additional information or have any
3622# questions.
3623#
3624
3625########################################################################
3626# This file handles detection of the Boot JDK. The Boot JDK detection
3627# process has been developed as a response to solve a complex real-world
3628# problem. Initially, it was simple, but it has grown as platform after
3629# platform, idiosyncracy after idiosyncracy has been supported.
3630#
3631# The basic idea is this:
3632# 1) You need an acceptable *) JDK to use as a Boot JDK
3633# 2) There are several ways to locate a JDK, that are mostly platform
3634#    dependent **)
3635# 3) You can have multiple JDKs installed
3636# 4) If possible, configure should try to dig out an acceptable JDK
3637#    automatically, without having to resort to command-line options
3638#
3639# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3640#     javac) and not a JRE, etc.
3641#
3642# **) On Windows we typically use a well-known path.
3643#     On MacOSX we typically use the tool java_home.
3644#     On Linux we typically find javac in the $PATH, and then follow a
3645#     chain of symlinks that often ends up in a real JDK.
3646#
3647# This leads to the code where we check in different ways to locate a
3648# JDK, and if one is found, check if it is acceptable. If not, we print
3649# our reasons for rejecting it (useful when debugging non-working
3650# configure situations) and continue checking the next one.
3651########################################################################
3652
3653# Execute the check given as argument, and verify the result
3654# If the Boot JDK was previously found, do nothing
3655# $1 A command line (typically autoconf macro) to execute
3656
3657
3658# Test: Is bootjdk explicitely set by command line arguments?
3659
3660
3661# Test: Is $JAVA_HOME set?
3662
3663
3664# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3665
3666
3667# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3668# $1: Argument to the java_home binary (optional)
3669
3670
3671# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3672
3673
3674# Look for a jdk in the given path. If there are multiple, try to select the newest.
3675# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3676# $1 = Path to directory containing jdk installations.
3677# $2 = String to append to the found JDK directory to get the proper JDK home
3678
3679
3680# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3681# environmental variable as base for where to look.
3682# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3683
3684
3685# Test: Is there a JDK installed in default, well-known locations?
3686
3687
3688# Check that a command-line tool in the Boot JDK is correct
3689# $1 = name of variable to assign
3690# $2 = name of binary
3691
3692
3693###############################################################################
3694#
3695# We need a Boot JDK to bootstrap the build.
3696#
3697
3698
3699
3700
3701
3702#
3703# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3704# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3705#
3706# This code is free software; you can redistribute it and/or modify it
3707# under the terms of the GNU General Public License version 2 only, as
3708# published by the Free Software Foundation.  Oracle designates this
3709# particular file as subject to the "Classpath" exception as provided
3710# by Oracle in the LICENSE file that accompanied this code.
3711#
3712# This code is distributed in the hope that it will be useful, but WITHOUT
3713# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3714# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3715# version 2 for more details (a copy is included in the LICENSE file that
3716# accompanied this code).
3717#
3718# You should have received a copy of the GNU General Public License version
3719# 2 along with this work; if not, write to the Free Software Foundation,
3720# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3721#
3722# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3723# or visit www.oracle.com if you need additional information or have any
3724# questions.
3725#
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741################################################################################
3742#
3743# Optionally enable distributed compilation of native code using icecc/icecream
3744#
3745
3746
3747
3748
3749
3750
3751
3752#
3753# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3755#
3756# This code is free software; you can redistribute it and/or modify it
3757# under the terms of the GNU General Public License version 2 only, as
3758# published by the Free Software Foundation.  Oracle designates this
3759# particular file as subject to the "Classpath" exception as provided
3760# by Oracle in the LICENSE file that accompanied this code.
3761#
3762# This code is distributed in the hope that it will be useful, but WITHOUT
3763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3765# version 2 for more details (a copy is included in the LICENSE file that
3766# accompanied this code).
3767#
3768# You should have received a copy of the GNU General Public License version
3769# 2 along with this work; if not, write to the Free Software Foundation,
3770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3771#
3772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3773# or visit www.oracle.com if you need additional information or have any
3774# questions.
3775#
3776
3777# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3778# corresponding configure arguments instead
3779
3780
3781# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3782# that configure can use them while detecting compilers.
3783# TOOLCHAIN_TYPE is available here.
3784# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3785
3786
3787
3788
3789
3790
3791# Documentation on common flags used for solstudio in HIGHEST.
3792#
3793# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3794#          done with care, there are some assumptions below that need to
3795#          be understood about the use of pointers, and IEEE behavior.
3796#
3797# -fns: Use non-standard floating point mode (not IEEE 754)
3798# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3799# -fsingle: Use single precision floating point with 'float'
3800# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3801#   (Source with excessing pointer casting and data access with mixed
3802#    pointer types are not recommended)
3803# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3804#   (If you expect perfect errno behavior, do not use this)
3805# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3806# -xrestrict: Pointer parameters to functions do not overlap
3807#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3808#    If you pass in multiple pointers to the same data, do not use this)
3809# -xlibmil: Inline some library routines
3810#   (If you expect perfect errno behavior, do not use this)
3811# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3812#   (If you expect perfect errno behavior, do not use this)
3813#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3814
3815    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3816    # Bug?
3817    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3818    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3819    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3820    #fi
3821
3822
3823
3824
3825
3826# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3827#                                   [RUN-IF-FALSE])
3828# ------------------------------------------------------------
3829# Check that the c and c++ compilers support an argument
3830
3831
3832# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3833#                                    [RUN-IF-FALSE])
3834# ------------------------------------------------------------
3835# Check that the linker support an argument
3836
3837
3838
3839
3840#
3841# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3843#
3844# This code is free software; you can redistribute it and/or modify it
3845# under the terms of the GNU General Public License version 2 only, as
3846# published by the Free Software Foundation.  Oracle designates this
3847# particular file as subject to the "Classpath" exception as provided
3848# by Oracle in the LICENSE file that accompanied this code.
3849#
3850# This code is distributed in the hope that it will be useful, but WITHOUT
3851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3853# version 2 for more details (a copy is included in the LICENSE file that
3854# accompanied this code).
3855#
3856# You should have received a copy of the GNU General Public License version
3857# 2 along with this work; if not, write to the Free Software Foundation,
3858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3859#
3860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3861# or visit www.oracle.com if you need additional information or have any
3862# questions.
3863#
3864
3865
3866
3867
3868
3869cygwin_help() {
3870  case $1 in
3871    unzip)
3872      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3873      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3874      ;;
3875    zip)
3876      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3877      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3878      ;;
3879    make)
3880      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3881      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3882      ;;
3883    freetype)
3884      HELP_MSG="
3885The freetype library can now be build during the configure process.
3886Download the freetype sources and unpack them into an arbitrary directory:
3887
3888wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3889tar -xzf freetype-2.5.3.tar.gz
3890
3891Then run configure with '--with-freetype-src=<freetype_src>'. This will
3892automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3893builds or into '<freetype_src>/lib32' for 32-bit builds.
3894Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3895and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3896      ;;
3897  esac
3898}
3899
3900msys_help() {
3901  PKGHANDLER_COMMAND=""
3902}
3903
3904apt_help() {
3905  case $1 in
3906    reduced)
3907      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3908    devkit)
3909      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3910    openjdk)
3911      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3912    alsa)
3913      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3914    cups)
3915      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3916    freetype)
3917      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3918    ffi)
3919      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3920    x11)
3921      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3922    ccache)
3923      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3924  esac
3925}
3926
3927yum_help() {
3928  case $1 in
3929    devkit)
3930      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3931    openjdk)
3932      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3933    alsa)
3934      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3935    cups)
3936      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3937    freetype)
3938      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3939    x11)
3940      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3941    ccache)
3942      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3943  esac
3944}
3945
3946port_help() {
3947  PKGHANDLER_COMMAND=""
3948}
3949
3950pkgutil_help() {
3951  PKGHANDLER_COMMAND=""
3952}
3953
3954pkgadd_help() {
3955  PKGHANDLER_COMMAND=""
3956}
3957
3958# This function will check if we're called from the "configure" wrapper while
3959# printing --help. If so, we will print out additional information that can
3960# only be extracted within the autoconf script, and then exit. This must be
3961# called at the very beginning in configure.ac.
3962
3963
3964
3965
3966
3967
3968#
3969# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3970# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3971#
3972# This code is free software; you can redistribute it and/or modify it
3973# under the terms of the GNU General Public License version 2 only, as
3974# published by the Free Software Foundation.  Oracle designates this
3975# particular file as subject to the "Classpath" exception as provided
3976# by Oracle in the LICENSE file that accompanied this code.
3977#
3978# This code is distributed in the hope that it will be useful, but WITHOUT
3979# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3980# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3981# version 2 for more details (a copy is included in the LICENSE file that
3982# accompanied this code).
3983#
3984# You should have received a copy of the GNU General Public License version
3985# 2 along with this work; if not, write to the Free Software Foundation,
3986# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3987#
3988# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3989# or visit www.oracle.com if you need additional information or have any
3990# questions.
3991#
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002###############################################################################
4003#
4004# Should we build only OpenJDK even if closed sources are present?
4005#
4006
4007
4008
4009
4010###############################################################################
4011#
4012# Setup version numbers
4013#
4014
4015
4016
4017
4018
4019
4020################################################################################
4021#
4022# Gcov coverage data for hotspot
4023#
4024
4025
4026################################################################################
4027#
4028# Static build support.  When enabled will generate static
4029# libraries instead of shared libraries for all JDK libs.
4030#
4031
4032
4033
4034
4035#
4036# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4037# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4038#
4039# This code is free software; you can redistribute it and/or modify it
4040# under the terms of the GNU General Public License version 2 only, as
4041# published by the Free Software Foundation.  Oracle designates this
4042# particular file as subject to the "Classpath" exception as provided
4043# by Oracle in the LICENSE file that accompanied this code.
4044#
4045# This code is distributed in the hope that it will be useful, but WITHOUT
4046# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4047# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4048# version 2 for more details (a copy is included in the LICENSE file that
4049# accompanied this code).
4050#
4051# You should have received a copy of the GNU General Public License version
4052# 2 along with this work; if not, write to the Free Software Foundation,
4053# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4054#
4055# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4056# or visit www.oracle.com if you need additional information or have any
4057# questions.
4058#
4059
4060# Major library component reside in separate files.
4061#
4062# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4063# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4064#
4065# This code is free software; you can redistribute it and/or modify it
4066# under the terms of the GNU General Public License version 2 only, as
4067# published by the Free Software Foundation.  Oracle designates this
4068# particular file as subject to the "Classpath" exception as provided
4069# by Oracle in the LICENSE file that accompanied this code.
4070#
4071# This code is distributed in the hope that it will be useful, but WITHOUT
4072# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4073# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4074# version 2 for more details (a copy is included in the LICENSE file that
4075# accompanied this code).
4076#
4077# You should have received a copy of the GNU General Public License version
4078# 2 along with this work; if not, write to the Free Software Foundation,
4079# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4080#
4081# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4082# or visit www.oracle.com if you need additional information or have any
4083# questions.
4084#
4085
4086################################################################################
4087# Setup alsa (Advanced Linux Sound Architecture)
4088################################################################################
4089
4090
4091#
4092# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4093# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4094#
4095# This code is free software; you can redistribute it and/or modify it
4096# under the terms of the GNU General Public License version 2 only, as
4097# published by the Free Software Foundation.  Oracle designates this
4098# particular file as subject to the "Classpath" exception as provided
4099# by Oracle in the LICENSE file that accompanied this code.
4100#
4101# This code is distributed in the hope that it will be useful, but WITHOUT
4102# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4103# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4104# version 2 for more details (a copy is included in the LICENSE file that
4105# accompanied this code).
4106#
4107# You should have received a copy of the GNU General Public License version
4108# 2 along with this work; if not, write to the Free Software Foundation,
4109# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4110#
4111# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4112# or visit www.oracle.com if you need additional information or have any
4113# questions.
4114#
4115
4116################################################################################
4117# Setup bundled libraries.
4118#
4119# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4120# OpenJDK repository. Default is to use these libraries as bundled, but they
4121# might be replaced by en external version by the user.
4122################################################################################
4123
4124
4125################################################################################
4126# Setup libjpeg
4127################################################################################
4128
4129
4130################################################################################
4131# Setup giflib
4132################################################################################
4133
4134
4135################################################################################
4136# Setup libpng
4137################################################################################
4138
4139
4140################################################################################
4141# Setup zlib
4142################################################################################
4143
4144
4145################################################################################
4146# Setup lcms (Little CMS)
4147################################################################################
4148
4149
4150#
4151# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153#
4154# This code is free software; you can redistribute it and/or modify it
4155# under the terms of the GNU General Public License version 2 only, as
4156# published by the Free Software Foundation.  Oracle designates this
4157# particular file as subject to the "Classpath" exception as provided
4158# by Oracle in the LICENSE file that accompanied this code.
4159#
4160# This code is distributed in the hope that it will be useful, but WITHOUT
4161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4163# version 2 for more details (a copy is included in the LICENSE file that
4164# accompanied this code).
4165#
4166# You should have received a copy of the GNU General Public License version
4167# 2 along with this work; if not, write to the Free Software Foundation,
4168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4169#
4170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4171# or visit www.oracle.com if you need additional information or have any
4172# questions.
4173#
4174
4175################################################################################
4176# Setup cups (Common Unix Printing System)
4177################################################################################
4178
4179
4180#
4181# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4182# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4183#
4184# This code is free software; you can redistribute it and/or modify it
4185# under the terms of the GNU General Public License version 2 only, as
4186# published by the Free Software Foundation.  Oracle designates this
4187# particular file as subject to the "Classpath" exception as provided
4188# by Oracle in the LICENSE file that accompanied this code.
4189#
4190# This code is distributed in the hope that it will be useful, but WITHOUT
4191# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4192# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4193# version 2 for more details (a copy is included in the LICENSE file that
4194# accompanied this code).
4195#
4196# You should have received a copy of the GNU General Public License version
4197# 2 along with this work; if not, write to the Free Software Foundation,
4198# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4199#
4200# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4201# or visit www.oracle.com if you need additional information or have any
4202# questions.
4203#
4204
4205################################################################################
4206# Setup libffi (Foreign Function Interface)
4207################################################################################
4208
4209
4210#
4211# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4212# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4213#
4214# This code is free software; you can redistribute it and/or modify it
4215# under the terms of the GNU General Public License version 2 only, as
4216# published by the Free Software Foundation.  Oracle designates this
4217# particular file as subject to the "Classpath" exception as provided
4218# by Oracle in the LICENSE file that accompanied this code.
4219#
4220# This code is distributed in the hope that it will be useful, but WITHOUT
4221# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4222# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4223# version 2 for more details (a copy is included in the LICENSE file that
4224# accompanied this code).
4225#
4226# You should have received a copy of the GNU General Public License version
4227# 2 along with this work; if not, write to the Free Software Foundation,
4228# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4229#
4230# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4231# or visit www.oracle.com if you need additional information or have any
4232# questions.
4233#
4234
4235################################################################################
4236# Build the freetype lib from source
4237################################################################################
4238
4239
4240################################################################################
4241# Check if a potential freeype library match is correct and usable
4242################################################################################
4243
4244
4245################################################################################
4246# Setup freetype (The FreeType2 font rendering library)
4247################################################################################
4248
4249
4250#
4251# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4252# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4253#
4254# This code is free software; you can redistribute it and/or modify it
4255# under the terms of the GNU General Public License version 2 only, as
4256# published by the Free Software Foundation.  Oracle designates this
4257# particular file as subject to the "Classpath" exception as provided
4258# by Oracle in the LICENSE file that accompanied this code.
4259#
4260# This code is distributed in the hope that it will be useful, but WITHOUT
4261# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4262# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4263# version 2 for more details (a copy is included in the LICENSE file that
4264# accompanied this code).
4265#
4266# You should have received a copy of the GNU General Public License version
4267# 2 along with this work; if not, write to the Free Software Foundation,
4268# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4269#
4270# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4271# or visit www.oracle.com if you need additional information or have any
4272# questions.
4273#
4274
4275################################################################################
4276# Setup the standard C/C++ runtime libraries.
4277#
4278# Most importantly, determine if stdc++ should be linked statically or
4279# dynamically.
4280################################################################################
4281
4282
4283#
4284# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4285# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4286#
4287# This code is free software; you can redistribute it and/or modify it
4288# under the terms of the GNU General Public License version 2 only, as
4289# published by the Free Software Foundation.  Oracle designates this
4290# particular file as subject to the "Classpath" exception as provided
4291# by Oracle in the LICENSE file that accompanied this code.
4292#
4293# This code is distributed in the hope that it will be useful, but WITHOUT
4294# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4295# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4296# version 2 for more details (a copy is included in the LICENSE file that
4297# accompanied this code).
4298#
4299# You should have received a copy of the GNU General Public License version
4300# 2 along with this work; if not, write to the Free Software Foundation,
4301# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4302#
4303# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4304# or visit www.oracle.com if you need additional information or have any
4305# questions.
4306#
4307
4308################################################################################
4309# Setup X11 Windows system
4310################################################################################
4311
4312
4313
4314################################################################################
4315# Determine which libraries are needed for this configuration
4316################################################################################
4317
4318
4319################################################################################
4320# Parse library options, and setup needed libraries
4321################################################################################
4322
4323
4324################################################################################
4325# Setup llvm (Low-Level VM)
4326################################################################################
4327
4328
4329################################################################################
4330# Setup various libraries, typically small system libraries
4331################################################################################
4332
4333
4334#
4335# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4336# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4337#
4338# This code is free software; you can redistribute it and/or modify it
4339# under the terms of the GNU General Public License version 2 only, as
4340# published by the Free Software Foundation.  Oracle designates this
4341# particular file as subject to the "Classpath" exception as provided
4342# by Oracle in the LICENSE file that accompanied this code.
4343#
4344# This code is distributed in the hope that it will be useful, but WITHOUT
4345# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4346# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4347# version 2 for more details (a copy is included in the LICENSE file that
4348# accompanied this code).
4349#
4350# You should have received a copy of the GNU General Public License version
4351# 2 along with this work; if not, write to the Free Software Foundation,
4352# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4353#
4354# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4355# or visit www.oracle.com if you need additional information or have any
4356# questions.
4357#
4358
4359# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4360# Converts autoconf style CPU name to OpenJDK style, into
4361# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4362
4363
4364# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4365# Converts autoconf style OS name to OpenJDK style, into
4366# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4367
4368
4369# Expects $host_os $host_cpu $build_os and $build_cpu
4370# and $with_target_bits to have been setup!
4371#
4372# Translate the standard triplet(quadruplet) definition
4373# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4374# OPENJDK_BUILD_OS, etc.
4375
4376
4377# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4378# accordingly. Must be done after setting up build and target system, but before
4379# doing anything else with these values.
4380
4381
4382# Setup the legacy variables, for controlling the old makefiles.
4383#
4384
4385
4386
4387
4388#%%% Build and target systems %%%
4389
4390
4391
4392
4393# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4394# Add -mX to various FLAGS variables.
4395
4396
4397
4398
4399
4400
4401#
4402# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4403# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4404#
4405# This code is free software; you can redistribute it and/or modify it
4406# under the terms of the GNU General Public License version 2 only, as
4407# published by the Free Software Foundation.  Oracle designates this
4408# particular file as subject to the "Classpath" exception as provided
4409# by Oracle in the LICENSE file that accompanied this code.
4410#
4411# This code is distributed in the hope that it will be useful, but WITHOUT
4412# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4413# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4414# version 2 for more details (a copy is included in the LICENSE file that
4415# accompanied this code).
4416#
4417# You should have received a copy of the GNU General Public License version
4418# 2 along with this work; if not, write to the Free Software Foundation,
4419# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4420#
4421# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4422# or visit www.oracle.com if you need additional information or have any
4423# questions.
4424#
4425
4426
4427
4428
4429
4430
4431
4432#
4433# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4434# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4435#
4436# This code is free software; you can redistribute it and/or modify it
4437# under the terms of the GNU General Public License version 2 only, as
4438# published by the Free Software Foundation.  Oracle designates this
4439# particular file as subject to the "Classpath" exception as provided
4440# by Oracle in the LICENSE file that accompanied this code.
4441#
4442# This code is distributed in the hope that it will be useful, but WITHOUT
4443# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4444# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4445# version 2 for more details (a copy is included in the LICENSE file that
4446# accompanied this code).
4447#
4448# You should have received a copy of the GNU General Public License version
4449# 2 along with this work; if not, write to the Free Software Foundation,
4450# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4451#
4452# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4453# or visit www.oracle.com if you need additional information or have any
4454# questions.
4455#
4456
4457########################################################################
4458# This file is responsible for detecting, verifying and setting up the
4459# toolchain, i.e. the compiler, linker and related utilities. It will setup
4460# proper paths to the binaries, but it will not setup any flags.
4461#
4462# The binaries used is determined by the toolchain type, which is the family of
4463# compilers and related tools that are used.
4464########################################################################
4465
4466
4467# All valid toolchains, regardless of platform (used by help.m4)
4468VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4469
4470# These toolchains are valid on different platforms
4471VALID_TOOLCHAINS_linux="gcc clang"
4472VALID_TOOLCHAINS_solaris="solstudio"
4473VALID_TOOLCHAINS_macosx="gcc clang"
4474VALID_TOOLCHAINS_aix="xlc"
4475VALID_TOOLCHAINS_windows="microsoft"
4476
4477# Toolchain descriptions
4478TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4479TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4480TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4481TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4482TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4483
4484# Setup a number of variables describing how native output files are
4485# named on this platform/toolchain.
4486
4487
4488# Determine which toolchain type to use, and make sure it is valid for this
4489# platform. Setup various information about the selected toolchain.
4490
4491
4492# Before we start detecting the toolchain executables, we might need some
4493# special setup, e.g. additional paths etc.
4494
4495
4496# Restore path, etc
4497
4498
4499# Check if a compiler is of the toolchain type we expect, and save the version
4500# information from it. If the compiler does not match the expected type,
4501# this function will abort using AC_MSG_ERROR. If it matches, the version will
4502# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4503# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4504#
4505# $1 = compiler to test (CC or CXX)
4506# $2 = human readable name of compiler (C or C++)
4507
4508
4509# Try to locate the given C or C++ compiler in the path, or otherwise.
4510#
4511# $1 = compiler to test (CC or CXX)
4512# $2 = human readable name of compiler (C or C++)
4513# $3 = list of compiler names to search for
4514
4515
4516# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4517# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4518# archiver (AR). Verify that the compilers are correct according to the
4519# toolchain type.
4520
4521
4522# Setup additional tools that is considered a part of the toolchain, but not the
4523# core part. Many of these are highly platform-specific and do not exist,
4524# and/or are not needed on all platforms.
4525
4526
4527# Setup the build tools (i.e, the compiler and linker used to build programs
4528# that should be run on the build platform, not the target platform, as a build
4529# helper). Since the non-cross-compile case uses the normal, target compilers
4530# for this, we can only do this after these have been setup.
4531
4532
4533# Setup legacy variables that are still needed as alternative ways to refer to
4534# parts of the toolchain.
4535
4536
4537# Do some additional checks on the detected tools.
4538
4539
4540# Setup the JTReg Regression Test Harness.
4541
4542
4543#
4544# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4546#
4547# This code is free software; you can redistribute it and/or modify it
4548# under the terms of the GNU General Public License version 2 only, as
4549# published by the Free Software Foundation.  Oracle designates this
4550# particular file as subject to the "Classpath" exception as provided
4551# by Oracle in the LICENSE file that accompanied this code.
4552#
4553# This code is distributed in the hope that it will be useful, but WITHOUT
4554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4556# version 2 for more details (a copy is included in the LICENSE file that
4557# accompanied this code).
4558#
4559# You should have received a copy of the GNU General Public License version
4560# 2 along with this work; if not, write to the Free Software Foundation,
4561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4562#
4563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4564# or visit www.oracle.com if you need additional information or have any
4565# questions.
4566#
4567
4568################################################################################
4569# The order of these defines the priority by which we try to find them.
4570VALID_VS_VERSIONS="2013 2012 2010"
4571
4572VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4573VS_VERSION_INTERNAL_2010=100
4574VS_MSVCR_2010=msvcr100.dll
4575# We don't use msvcp on Visual Studio 2010
4576#VS_MSVCP_2010=msvcp100.dll
4577VS_ENVVAR_2010="VS100COMNTOOLS"
4578VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4579VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4580VS_VS_PLATFORM_NAME_2010="v100"
4581VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4582
4583VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4584VS_VERSION_INTERNAL_2012=110
4585VS_MSVCR_2012=msvcr110.dll
4586VS_MSVCP_2012=msvcp110.dll
4587VS_ENVVAR_2012="VS110COMNTOOLS"
4588VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4589VS_SDK_INSTALLDIR_2012=
4590VS_VS_PLATFORM_NAME_2012="v110"
4591VS_SDK_PLATFORM_NAME_2012=
4592
4593VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4594VS_VERSION_INTERNAL_2013=120
4595VS_MSVCR_2013=msvcr120.dll
4596VS_MSVCP_2013=msvcp120.dll
4597VS_ENVVAR_2013="VS120COMNTOOLS"
4598VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4599VS_SDK_INSTALLDIR_2013=
4600VS_VS_PLATFORM_NAME_2013="v120"
4601VS_SDK_PLATFORM_NAME_2013=
4602
4603################################################################################
4604
4605
4606
4607################################################################################
4608
4609
4610
4611################################################################################
4612# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4613# build environment and assigns it to VS_ENV_CMD
4614
4615
4616################################################################################
4617
4618
4619
4620################################################################################
4621# Check if the VS env variables were setup prior to running configure.
4622# If not, then find vcvarsall.bat and run it automatically, and integrate
4623# the set env variables into the spec file.
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638# This line needs to be here, verbatim, after all includes and the dummy hook
4639# definitions. It is replaced with custom functionality when building
4640# custom sources.
4641#CUSTOM_AUTOCONF_INCLUDE
4642
4643# Do not change or remove the following line, it is needed for consistency checks:
4644DATE_WHEN_GENERATED=1448383548
4645
4646###############################################################################
4647#
4648# Initialization / Boot-strapping
4649#
4650# The bootstrapping process needs to solve the "chicken or the egg" problem,
4651# thus it jumps back and forth, each time gaining something needed later on.
4652#
4653###############################################################################
4654
4655# If we are requested to print additional help, do that and then exit.
4656# This must be the very first call.
4657
4658  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4659    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4660    $PRINTF "Which are valid to use depends on the build platform.\n"
4661    for toolchain in $VALID_TOOLCHAINS_all; do
4662      # Use indirect variable referencing
4663      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4664      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4665      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4666    done
4667
4668    # And now exit directly
4669    exit 0
4670  fi
4671
4672
4673# Basic initialization that must happen first of all in the normal process.
4674
4675  # Save the original command line. This is passed to us by the wrapper configure script.
4676
4677  # Save the path variable before it gets changed
4678  ORIGINAL_PATH="$PATH"
4679
4680  DATE_WHEN_CONFIGURED=`LANG=C date`
4681
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4683$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4684  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4685$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4686
4687
4688  # Start with tools that do not need have cross compilation support
4689  # and can be expected to be found in the default PATH. These tools are
4690  # used by configure.
4691
4692  # First are all the simple required tools.
4693
4694
4695
4696  # Publish this variable in the help.
4697
4698
4699  if [ -z "${BASENAME+x}" ]; then
4700    # The variable is not set by user, try to locate tool using the code snippet
4701    for ac_prog in basename
4702do
4703  # Extract the first word of "$ac_prog", so it can be a program name with args.
4704set dummy $ac_prog; ac_word=$2
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4706$as_echo_n "checking for $ac_word... " >&6; }
4707if ${ac_cv_path_BASENAME+:} false; then :
4708  $as_echo_n "(cached) " >&6
4709else
4710  case $BASENAME in
4711  [\\/]* | ?:[\\/]*)
4712  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4713  ;;
4714  *)
4715  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4716for as_dir in $PATH
4717do
4718  IFS=$as_save_IFS
4719  test -z "$as_dir" && as_dir=.
4720    for ac_exec_ext in '' $ac_executable_extensions; do
4721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4722    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4724    break 2
4725  fi
4726done
4727  done
4728IFS=$as_save_IFS
4729
4730  ;;
4731esac
4732fi
4733BASENAME=$ac_cv_path_BASENAME
4734if test -n "$BASENAME"; then
4735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4736$as_echo "$BASENAME" >&6; }
4737else
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743  test -n "$BASENAME" && break
4744done
4745
4746  else
4747    # The variable is set, but is it from the command line or the environment?
4748
4749    # Try to remove the string !BASENAME! from our list.
4750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4752      # If it failed, the variable was not from the command line. Ignore it,
4753      # but warn the user (except for BASH, which is always set by the calling BASH).
4754      if test "xBASENAME" != xBASH; then
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4756$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4757      fi
4758      # Try to locate tool using the code snippet
4759      for ac_prog in basename
4760do
4761  # Extract the first word of "$ac_prog", so it can be a program name with args.
4762set dummy $ac_prog; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
4765if ${ac_cv_path_BASENAME+:} false; then :
4766  $as_echo_n "(cached) " >&6
4767else
4768  case $BASENAME in
4769  [\\/]* | ?:[\\/]*)
4770  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4771  ;;
4772  *)
4773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in $PATH
4775do
4776  IFS=$as_save_IFS
4777  test -z "$as_dir" && as_dir=.
4778    for ac_exec_ext in '' $ac_executable_extensions; do
4779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782    break 2
4783  fi
4784done
4785  done
4786IFS=$as_save_IFS
4787
4788  ;;
4789esac
4790fi
4791BASENAME=$ac_cv_path_BASENAME
4792if test -n "$BASENAME"; then
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4794$as_echo "$BASENAME" >&6; }
4795else
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
4798fi
4799
4800
4801  test -n "$BASENAME" && break
4802done
4803
4804    else
4805      # If it succeeded, then it was overridden by the user. We will use it
4806      # for the tool.
4807
4808      # First remove it from the list of overridden variables, so we can test
4809      # for unknown variables in the end.
4810      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4811
4812      # Check if we try to supply an empty value
4813      if test "x$BASENAME" = x; then
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4815$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4817$as_echo_n "checking for BASENAME... " >&6; }
4818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4819$as_echo "disabled" >&6; }
4820      else
4821        # Check if the provided tool contains a complete path.
4822        tool_specified="$BASENAME"
4823        tool_basename="${tool_specified##*/}"
4824        if test "x$tool_basename" = "x$tool_specified"; then
4825          # A command without a complete path is provided, search $PATH.
4826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4827$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4828          # Extract the first word of "$tool_basename", so it can be a program name with args.
4829set dummy $tool_basename; ac_word=$2
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
4832if ${ac_cv_path_BASENAME+:} false; then :
4833  $as_echo_n "(cached) " >&6
4834else
4835  case $BASENAME in
4836  [\\/]* | ?:[\\/]*)
4837  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4838  ;;
4839  *)
4840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in $PATH
4842do
4843  IFS=$as_save_IFS
4844  test -z "$as_dir" && as_dir=.
4845    for ac_exec_ext in '' $ac_executable_extensions; do
4846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4847    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849    break 2
4850  fi
4851done
4852  done
4853IFS=$as_save_IFS
4854
4855  ;;
4856esac
4857fi
4858BASENAME=$ac_cv_path_BASENAME
4859if test -n "$BASENAME"; then
4860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4861$as_echo "$BASENAME" >&6; }
4862else
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
4865fi
4866
4867
4868          if test "x$BASENAME" = x; then
4869            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4870          fi
4871        else
4872          # Otherwise we believe it is a complete path. Use it as it is.
4873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4874$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4875          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4876$as_echo_n "checking for BASENAME... " >&6; }
4877          if test ! -x "$tool_specified"; then
4878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4879$as_echo "not found" >&6; }
4880            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4881          fi
4882          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4883$as_echo "$tool_specified" >&6; }
4884        fi
4885      fi
4886    fi
4887
4888  fi
4889
4890
4891
4892  if test "x$BASENAME" = x; then
4893    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4894  fi
4895
4896
4897
4898
4899
4900  # Publish this variable in the help.
4901
4902
4903  if [ -z "${BASH+x}" ]; then
4904    # The variable is not set by user, try to locate tool using the code snippet
4905    for ac_prog in bash
4906do
4907  # Extract the first word of "$ac_prog", so it can be a program name with args.
4908set dummy $ac_prog; ac_word=$2
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4910$as_echo_n "checking for $ac_word... " >&6; }
4911if ${ac_cv_path_BASH+:} false; then :
4912  $as_echo_n "(cached) " >&6
4913else
4914  case $BASH in
4915  [\\/]* | ?:[\\/]*)
4916  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4917  ;;
4918  *)
4919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4920for as_dir in $PATH
4921do
4922  IFS=$as_save_IFS
4923  test -z "$as_dir" && as_dir=.
4924    for ac_exec_ext in '' $ac_executable_extensions; do
4925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4926    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4928    break 2
4929  fi
4930done
4931  done
4932IFS=$as_save_IFS
4933
4934  ;;
4935esac
4936fi
4937BASH=$ac_cv_path_BASH
4938if test -n "$BASH"; then
4939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4940$as_echo "$BASH" >&6; }
4941else
4942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943$as_echo "no" >&6; }
4944fi
4945
4946
4947  test -n "$BASH" && break
4948done
4949
4950  else
4951    # The variable is set, but is it from the command line or the environment?
4952
4953    # Try to remove the string !BASH! from our list.
4954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4956      # If it failed, the variable was not from the command line. Ignore it,
4957      # but warn the user (except for BASH, which is always set by the calling BASH).
4958      if test "xBASH" != xBASH; then
4959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4960$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4961      fi
4962      # Try to locate tool using the code snippet
4963      for ac_prog in bash
4964do
4965  # Extract the first word of "$ac_prog", so it can be a program name with args.
4966set dummy $ac_prog; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_BASH+:} false; then :
4970  $as_echo_n "(cached) " >&6
4971else
4972  case $BASH in
4973  [\\/]* | ?:[\\/]*)
4974  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4975  ;;
4976  *)
4977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in $PATH
4979do
4980  IFS=$as_save_IFS
4981  test -z "$as_dir" && as_dir=.
4982    for ac_exec_ext in '' $ac_executable_extensions; do
4983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986    break 2
4987  fi
4988done
4989  done
4990IFS=$as_save_IFS
4991
4992  ;;
4993esac
4994fi
4995BASH=$ac_cv_path_BASH
4996if test -n "$BASH"; then
4997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4998$as_echo "$BASH" >&6; }
4999else
5000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004
5005  test -n "$BASH" && break
5006done
5007
5008    else
5009      # If it succeeded, then it was overridden by the user. We will use it
5010      # for the tool.
5011
5012      # First remove it from the list of overridden variables, so we can test
5013      # for unknown variables in the end.
5014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5015
5016      # Check if we try to supply an empty value
5017      if test "x$BASH" = x; then
5018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5019$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5021$as_echo_n "checking for BASH... " >&6; }
5022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5023$as_echo "disabled" >&6; }
5024      else
5025        # Check if the provided tool contains a complete path.
5026        tool_specified="$BASH"
5027        tool_basename="${tool_specified##*/}"
5028        if test "x$tool_basename" = "x$tool_specified"; then
5029          # A command without a complete path is provided, search $PATH.
5030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5031$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5032          # Extract the first word of "$tool_basename", so it can be a program name with args.
5033set dummy $tool_basename; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if ${ac_cv_path_BASH+:} false; then :
5037  $as_echo_n "(cached) " >&6
5038else
5039  case $BASH in
5040  [\\/]* | ?:[\\/]*)
5041  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5042  ;;
5043  *)
5044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in $PATH
5046do
5047  IFS=$as_save_IFS
5048  test -z "$as_dir" && as_dir=.
5049    for ac_exec_ext in '' $ac_executable_extensions; do
5050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5051    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053    break 2
5054  fi
5055done
5056  done
5057IFS=$as_save_IFS
5058
5059  ;;
5060esac
5061fi
5062BASH=$ac_cv_path_BASH
5063if test -n "$BASH"; then
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5065$as_echo "$BASH" >&6; }
5066else
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071
5072          if test "x$BASH" = x; then
5073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5074          fi
5075        else
5076          # Otherwise we believe it is a complete path. Use it as it is.
5077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5078$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5080$as_echo_n "checking for BASH... " >&6; }
5081          if test ! -x "$tool_specified"; then
5082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5083$as_echo "not found" >&6; }
5084            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5085          fi
5086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5087$as_echo "$tool_specified" >&6; }
5088        fi
5089      fi
5090    fi
5091
5092  fi
5093
5094
5095
5096  if test "x$BASH" = x; then
5097    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5098  fi
5099
5100
5101
5102
5103
5104  # Publish this variable in the help.
5105
5106
5107  if [ -z "${CAT+x}" ]; then
5108    # The variable is not set by user, try to locate tool using the code snippet
5109    for ac_prog in cat
5110do
5111  # Extract the first word of "$ac_prog", so it can be a program name with args.
5112set dummy $ac_prog; ac_word=$2
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
5115if ${ac_cv_path_CAT+:} false; then :
5116  $as_echo_n "(cached) " >&6
5117else
5118  case $CAT in
5119  [\\/]* | ?:[\\/]*)
5120  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5121  ;;
5122  *)
5123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126  IFS=$as_save_IFS
5127  test -z "$as_dir" && as_dir=.
5128    for ac_exec_ext in '' $ac_executable_extensions; do
5129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5130    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5132    break 2
5133  fi
5134done
5135  done
5136IFS=$as_save_IFS
5137
5138  ;;
5139esac
5140fi
5141CAT=$ac_cv_path_CAT
5142if test -n "$CAT"; then
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5144$as_echo "$CAT" >&6; }
5145else
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148fi
5149
5150
5151  test -n "$CAT" && break
5152done
5153
5154  else
5155    # The variable is set, but is it from the command line or the environment?
5156
5157    # Try to remove the string !CAT! from our list.
5158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5160      # If it failed, the variable was not from the command line. Ignore it,
5161      # but warn the user (except for BASH, which is always set by the calling BASH).
5162      if test "xCAT" != xBASH; then
5163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5164$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5165      fi
5166      # Try to locate tool using the code snippet
5167      for ac_prog in cat
5168do
5169  # Extract the first word of "$ac_prog", so it can be a program name with args.
5170set dummy $ac_prog; ac_word=$2
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172$as_echo_n "checking for $ac_word... " >&6; }
5173if ${ac_cv_path_CAT+:} false; then :
5174  $as_echo_n "(cached) " >&6
5175else
5176  case $CAT in
5177  [\\/]* | ?:[\\/]*)
5178  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5179  ;;
5180  *)
5181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182for as_dir in $PATH
5183do
5184  IFS=$as_save_IFS
5185  test -z "$as_dir" && as_dir=.
5186    for ac_exec_ext in '' $ac_executable_extensions; do
5187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5188    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5190    break 2
5191  fi
5192done
5193  done
5194IFS=$as_save_IFS
5195
5196  ;;
5197esac
5198fi
5199CAT=$ac_cv_path_CAT
5200if test -n "$CAT"; then
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5202$as_echo "$CAT" >&6; }
5203else
5204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5205$as_echo "no" >&6; }
5206fi
5207
5208
5209  test -n "$CAT" && break
5210done
5211
5212    else
5213      # If it succeeded, then it was overridden by the user. We will use it
5214      # for the tool.
5215
5216      # First remove it from the list of overridden variables, so we can test
5217      # for unknown variables in the end.
5218      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5219
5220      # Check if we try to supply an empty value
5221      if test "x$CAT" = x; then
5222        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5223$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5225$as_echo_n "checking for CAT... " >&6; }
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5227$as_echo "disabled" >&6; }
5228      else
5229        # Check if the provided tool contains a complete path.
5230        tool_specified="$CAT"
5231        tool_basename="${tool_specified##*/}"
5232        if test "x$tool_basename" = "x$tool_specified"; then
5233          # A command without a complete path is provided, search $PATH.
5234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5235$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5236          # Extract the first word of "$tool_basename", so it can be a program name with args.
5237set dummy $tool_basename; ac_word=$2
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239$as_echo_n "checking for $ac_word... " >&6; }
5240if ${ac_cv_path_CAT+:} false; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $CAT in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5246  ;;
5247  *)
5248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249for as_dir in $PATH
5250do
5251  IFS=$as_save_IFS
5252  test -z "$as_dir" && as_dir=.
5253    for ac_exec_ext in '' $ac_executable_extensions; do
5254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5255    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257    break 2
5258  fi
5259done
5260  done
5261IFS=$as_save_IFS
5262
5263  ;;
5264esac
5265fi
5266CAT=$ac_cv_path_CAT
5267if test -n "$CAT"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5269$as_echo "$CAT" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276          if test "x$CAT" = x; then
5277            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5278          fi
5279        else
5280          # Otherwise we believe it is a complete path. Use it as it is.
5281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5282$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5283          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5284$as_echo_n "checking for CAT... " >&6; }
5285          if test ! -x "$tool_specified"; then
5286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5287$as_echo "not found" >&6; }
5288            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5289          fi
5290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5291$as_echo "$tool_specified" >&6; }
5292        fi
5293      fi
5294    fi
5295
5296  fi
5297
5298
5299
5300  if test "x$CAT" = x; then
5301    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5302  fi
5303
5304
5305
5306
5307
5308  # Publish this variable in the help.
5309
5310
5311  if [ -z "${CHMOD+x}" ]; then
5312    # The variable is not set by user, try to locate tool using the code snippet
5313    for ac_prog in chmod
5314do
5315  # Extract the first word of "$ac_prog", so it can be a program name with args.
5316set dummy $ac_prog; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_CHMOD+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $CHMOD in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345CHMOD=$ac_cv_path_CHMOD
5346if test -n "$CHMOD"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5348$as_echo "$CHMOD" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355  test -n "$CHMOD" && break
5356done
5357
5358  else
5359    # The variable is set, but is it from the command line or the environment?
5360
5361    # Try to remove the string !CHMOD! from our list.
5362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5364      # If it failed, the variable was not from the command line. Ignore it,
5365      # but warn the user (except for BASH, which is always set by the calling BASH).
5366      if test "xCHMOD" != xBASH; then
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5368$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5369      fi
5370      # Try to locate tool using the code snippet
5371      for ac_prog in chmod
5372do
5373  # Extract the first word of "$ac_prog", so it can be a program name with args.
5374set dummy $ac_prog; ac_word=$2
5375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5376$as_echo_n "checking for $ac_word... " >&6; }
5377if ${ac_cv_path_CHMOD+:} false; then :
5378  $as_echo_n "(cached) " >&6
5379else
5380  case $CHMOD in
5381  [\\/]* | ?:[\\/]*)
5382  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5383  ;;
5384  *)
5385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5386for as_dir in $PATH
5387do
5388  IFS=$as_save_IFS
5389  test -z "$as_dir" && as_dir=.
5390    for ac_exec_ext in '' $ac_executable_extensions; do
5391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5392    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5394    break 2
5395  fi
5396done
5397  done
5398IFS=$as_save_IFS
5399
5400  ;;
5401esac
5402fi
5403CHMOD=$ac_cv_path_CHMOD
5404if test -n "$CHMOD"; then
5405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5406$as_echo "$CHMOD" >&6; }
5407else
5408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5409$as_echo "no" >&6; }
5410fi
5411
5412
5413  test -n "$CHMOD" && break
5414done
5415
5416    else
5417      # If it succeeded, then it was overridden by the user. We will use it
5418      # for the tool.
5419
5420      # First remove it from the list of overridden variables, so we can test
5421      # for unknown variables in the end.
5422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5423
5424      # Check if we try to supply an empty value
5425      if test "x$CHMOD" = x; then
5426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5427$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5429$as_echo_n "checking for CHMOD... " >&6; }
5430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5431$as_echo "disabled" >&6; }
5432      else
5433        # Check if the provided tool contains a complete path.
5434        tool_specified="$CHMOD"
5435        tool_basename="${tool_specified##*/}"
5436        if test "x$tool_basename" = "x$tool_specified"; then
5437          # A command without a complete path is provided, search $PATH.
5438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5439$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5440          # Extract the first word of "$tool_basename", so it can be a program name with args.
5441set dummy $tool_basename; ac_word=$2
5442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5443$as_echo_n "checking for $ac_word... " >&6; }
5444if ${ac_cv_path_CHMOD+:} false; then :
5445  $as_echo_n "(cached) " >&6
5446else
5447  case $CHMOD in
5448  [\\/]* | ?:[\\/]*)
5449  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5450  ;;
5451  *)
5452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5453for as_dir in $PATH
5454do
5455  IFS=$as_save_IFS
5456  test -z "$as_dir" && as_dir=.
5457    for ac_exec_ext in '' $ac_executable_extensions; do
5458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5459    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5461    break 2
5462  fi
5463done
5464  done
5465IFS=$as_save_IFS
5466
5467  ;;
5468esac
5469fi
5470CHMOD=$ac_cv_path_CHMOD
5471if test -n "$CHMOD"; then
5472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5473$as_echo "$CHMOD" >&6; }
5474else
5475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477fi
5478
5479
5480          if test "x$CHMOD" = x; then
5481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5482          fi
5483        else
5484          # Otherwise we believe it is a complete path. Use it as it is.
5485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5486$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5488$as_echo_n "checking for CHMOD... " >&6; }
5489          if test ! -x "$tool_specified"; then
5490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5491$as_echo "not found" >&6; }
5492            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5493          fi
5494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5495$as_echo "$tool_specified" >&6; }
5496        fi
5497      fi
5498    fi
5499
5500  fi
5501
5502
5503
5504  if test "x$CHMOD" = x; then
5505    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5506  fi
5507
5508
5509
5510
5511
5512  # Publish this variable in the help.
5513
5514
5515  if [ -z "${CMP+x}" ]; then
5516    # The variable is not set by user, try to locate tool using the code snippet
5517    for ac_prog in cmp
5518do
5519  # Extract the first word of "$ac_prog", so it can be a program name with args.
5520set dummy $ac_prog; ac_word=$2
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5522$as_echo_n "checking for $ac_word... " >&6; }
5523if ${ac_cv_path_CMP+:} false; then :
5524  $as_echo_n "(cached) " >&6
5525else
5526  case $CMP in
5527  [\\/]* | ?:[\\/]*)
5528  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5529  ;;
5530  *)
5531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5532for as_dir in $PATH
5533do
5534  IFS=$as_save_IFS
5535  test -z "$as_dir" && as_dir=.
5536    for ac_exec_ext in '' $ac_executable_extensions; do
5537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5538    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5540    break 2
5541  fi
5542done
5543  done
5544IFS=$as_save_IFS
5545
5546  ;;
5547esac
5548fi
5549CMP=$ac_cv_path_CMP
5550if test -n "$CMP"; then
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5552$as_echo "$CMP" >&6; }
5553else
5554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5555$as_echo "no" >&6; }
5556fi
5557
5558
5559  test -n "$CMP" && break
5560done
5561
5562  else
5563    # The variable is set, but is it from the command line or the environment?
5564
5565    # Try to remove the string !CMP! from our list.
5566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5568      # If it failed, the variable was not from the command line. Ignore it,
5569      # but warn the user (except for BASH, which is always set by the calling BASH).
5570      if test "xCMP" != xBASH; then
5571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5572$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5573      fi
5574      # Try to locate tool using the code snippet
5575      for ac_prog in cmp
5576do
5577  # Extract the first word of "$ac_prog", so it can be a program name with args.
5578set dummy $ac_prog; ac_word=$2
5579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5580$as_echo_n "checking for $ac_word... " >&6; }
5581if ${ac_cv_path_CMP+:} false; then :
5582  $as_echo_n "(cached) " >&6
5583else
5584  case $CMP in
5585  [\\/]* | ?:[\\/]*)
5586  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5587  ;;
5588  *)
5589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5590for as_dir in $PATH
5591do
5592  IFS=$as_save_IFS
5593  test -z "$as_dir" && as_dir=.
5594    for ac_exec_ext in '' $ac_executable_extensions; do
5595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5596    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5598    break 2
5599  fi
5600done
5601  done
5602IFS=$as_save_IFS
5603
5604  ;;
5605esac
5606fi
5607CMP=$ac_cv_path_CMP
5608if test -n "$CMP"; then
5609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5610$as_echo "$CMP" >&6; }
5611else
5612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5613$as_echo "no" >&6; }
5614fi
5615
5616
5617  test -n "$CMP" && break
5618done
5619
5620    else
5621      # If it succeeded, then it was overridden by the user. We will use it
5622      # for the tool.
5623
5624      # First remove it from the list of overridden variables, so we can test
5625      # for unknown variables in the end.
5626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5627
5628      # Check if we try to supply an empty value
5629      if test "x$CMP" = x; then
5630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5631$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5633$as_echo_n "checking for CMP... " >&6; }
5634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5635$as_echo "disabled" >&6; }
5636      else
5637        # Check if the provided tool contains a complete path.
5638        tool_specified="$CMP"
5639        tool_basename="${tool_specified##*/}"
5640        if test "x$tool_basename" = "x$tool_specified"; then
5641          # A command without a complete path is provided, search $PATH.
5642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5643$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5644          # Extract the first word of "$tool_basename", so it can be a program name with args.
5645set dummy $tool_basename; ac_word=$2
5646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5647$as_echo_n "checking for $ac_word... " >&6; }
5648if ${ac_cv_path_CMP+:} false; then :
5649  $as_echo_n "(cached) " >&6
5650else
5651  case $CMP in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5657for as_dir in $PATH
5658do
5659  IFS=$as_save_IFS
5660  test -z "$as_dir" && as_dir=.
5661    for ac_exec_ext in '' $ac_executable_extensions; do
5662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5663    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5665    break 2
5666  fi
5667done
5668  done
5669IFS=$as_save_IFS
5670
5671  ;;
5672esac
5673fi
5674CMP=$ac_cv_path_CMP
5675if test -n "$CMP"; then
5676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5677$as_echo "$CMP" >&6; }
5678else
5679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
5681fi
5682
5683
5684          if test "x$CMP" = x; then
5685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5686          fi
5687        else
5688          # Otherwise we believe it is a complete path. Use it as it is.
5689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5690$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5692$as_echo_n "checking for CMP... " >&6; }
5693          if test ! -x "$tool_specified"; then
5694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5695$as_echo "not found" >&6; }
5696            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5697          fi
5698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5699$as_echo "$tool_specified" >&6; }
5700        fi
5701      fi
5702    fi
5703
5704  fi
5705
5706
5707
5708  if test "x$CMP" = x; then
5709    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5710  fi
5711
5712
5713
5714
5715
5716  # Publish this variable in the help.
5717
5718
5719  if [ -z "${COMM+x}" ]; then
5720    # The variable is not set by user, try to locate tool using the code snippet
5721    for ac_prog in comm
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_COMM+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $COMM in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753COMM=$ac_cv_path_COMM
5754if test -n "$COMM"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5756$as_echo "$COMM" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$COMM" && break
5764done
5765
5766  else
5767    # The variable is set, but is it from the command line or the environment?
5768
5769    # Try to remove the string !COMM! from our list.
5770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5772      # If it failed, the variable was not from the command line. Ignore it,
5773      # but warn the user (except for BASH, which is always set by the calling BASH).
5774      if test "xCOMM" != xBASH; then
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5776$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5777      fi
5778      # Try to locate tool using the code snippet
5779      for ac_prog in comm
5780do
5781  # Extract the first word of "$ac_prog", so it can be a program name with args.
5782set dummy $ac_prog; ac_word=$2
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784$as_echo_n "checking for $ac_word... " >&6; }
5785if ${ac_cv_path_COMM+:} false; then :
5786  $as_echo_n "(cached) " >&6
5787else
5788  case $COMM in
5789  [\\/]* | ?:[\\/]*)
5790  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5791  ;;
5792  *)
5793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796  IFS=$as_save_IFS
5797  test -z "$as_dir" && as_dir=.
5798    for ac_exec_ext in '' $ac_executable_extensions; do
5799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5800    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802    break 2
5803  fi
5804done
5805  done
5806IFS=$as_save_IFS
5807
5808  ;;
5809esac
5810fi
5811COMM=$ac_cv_path_COMM
5812if test -n "$COMM"; then
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5814$as_echo "$COMM" >&6; }
5815else
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818fi
5819
5820
5821  test -n "$COMM" && break
5822done
5823
5824    else
5825      # If it succeeded, then it was overridden by the user. We will use it
5826      # for the tool.
5827
5828      # First remove it from the list of overridden variables, so we can test
5829      # for unknown variables in the end.
5830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5831
5832      # Check if we try to supply an empty value
5833      if test "x$COMM" = x; then
5834        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5835$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5837$as_echo_n "checking for COMM... " >&6; }
5838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5839$as_echo "disabled" >&6; }
5840      else
5841        # Check if the provided tool contains a complete path.
5842        tool_specified="$COMM"
5843        tool_basename="${tool_specified##*/}"
5844        if test "x$tool_basename" = "x$tool_specified"; then
5845          # A command without a complete path is provided, search $PATH.
5846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5847$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5848          # Extract the first word of "$tool_basename", so it can be a program name with args.
5849set dummy $tool_basename; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_path_COMM+:} false; then :
5853  $as_echo_n "(cached) " >&6
5854else
5855  case $COMM in
5856  [\\/]* | ?:[\\/]*)
5857  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5858  ;;
5859  *)
5860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5861for as_dir in $PATH
5862do
5863  IFS=$as_save_IFS
5864  test -z "$as_dir" && as_dir=.
5865    for ac_exec_ext in '' $ac_executable_extensions; do
5866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5867    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5869    break 2
5870  fi
5871done
5872  done
5873IFS=$as_save_IFS
5874
5875  ;;
5876esac
5877fi
5878COMM=$ac_cv_path_COMM
5879if test -n "$COMM"; then
5880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5881$as_echo "$COMM" >&6; }
5882else
5883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5884$as_echo "no" >&6; }
5885fi
5886
5887
5888          if test "x$COMM" = x; then
5889            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5890          fi
5891        else
5892          # Otherwise we believe it is a complete path. Use it as it is.
5893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5894$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5895          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5896$as_echo_n "checking for COMM... " >&6; }
5897          if test ! -x "$tool_specified"; then
5898            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5899$as_echo "not found" >&6; }
5900            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5901          fi
5902          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5903$as_echo "$tool_specified" >&6; }
5904        fi
5905      fi
5906    fi
5907
5908  fi
5909
5910
5911
5912  if test "x$COMM" = x; then
5913    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5914  fi
5915
5916
5917
5918
5919
5920  # Publish this variable in the help.
5921
5922
5923  if [ -z "${CP+x}" ]; then
5924    # The variable is not set by user, try to locate tool using the code snippet
5925    for ac_prog in cp
5926do
5927  # Extract the first word of "$ac_prog", so it can be a program name with args.
5928set dummy $ac_prog; ac_word=$2
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930$as_echo_n "checking for $ac_word... " >&6; }
5931if ${ac_cv_path_CP+:} false; then :
5932  $as_echo_n "(cached) " >&6
5933else
5934  case $CP in
5935  [\\/]* | ?:[\\/]*)
5936  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5937  ;;
5938  *)
5939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940for as_dir in $PATH
5941do
5942  IFS=$as_save_IFS
5943  test -z "$as_dir" && as_dir=.
5944    for ac_exec_ext in '' $ac_executable_extensions; do
5945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5946    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5948    break 2
5949  fi
5950done
5951  done
5952IFS=$as_save_IFS
5953
5954  ;;
5955esac
5956fi
5957CP=$ac_cv_path_CP
5958if test -n "$CP"; then
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5960$as_echo "$CP" >&6; }
5961else
5962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
5964fi
5965
5966
5967  test -n "$CP" && break
5968done
5969
5970  else
5971    # The variable is set, but is it from the command line or the environment?
5972
5973    # Try to remove the string !CP! from our list.
5974    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5975    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5976      # If it failed, the variable was not from the command line. Ignore it,
5977      # but warn the user (except for BASH, which is always set by the calling BASH).
5978      if test "xCP" != xBASH; then
5979        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5980$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5981      fi
5982      # Try to locate tool using the code snippet
5983      for ac_prog in cp
5984do
5985  # Extract the first word of "$ac_prog", so it can be a program name with args.
5986set dummy $ac_prog; ac_word=$2
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
5989if ${ac_cv_path_CP+:} false; then :
5990  $as_echo_n "(cached) " >&6
5991else
5992  case $CP in
5993  [\\/]* | ?:[\\/]*)
5994  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5995  ;;
5996  *)
5997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000  IFS=$as_save_IFS
6001  test -z "$as_dir" && as_dir=.
6002    for ac_exec_ext in '' $ac_executable_extensions; do
6003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6004    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006    break 2
6007  fi
6008done
6009  done
6010IFS=$as_save_IFS
6011
6012  ;;
6013esac
6014fi
6015CP=$ac_cv_path_CP
6016if test -n "$CP"; then
6017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6018$as_echo "$CP" >&6; }
6019else
6020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
6022fi
6023
6024
6025  test -n "$CP" && break
6026done
6027
6028    else
6029      # If it succeeded, then it was overridden by the user. We will use it
6030      # for the tool.
6031
6032      # First remove it from the list of overridden variables, so we can test
6033      # for unknown variables in the end.
6034      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6035
6036      # Check if we try to supply an empty value
6037      if test "x$CP" = x; then
6038        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6039$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6041$as_echo_n "checking for CP... " >&6; }
6042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6043$as_echo "disabled" >&6; }
6044      else
6045        # Check if the provided tool contains a complete path.
6046        tool_specified="$CP"
6047        tool_basename="${tool_specified##*/}"
6048        if test "x$tool_basename" = "x$tool_specified"; then
6049          # A command without a complete path is provided, search $PATH.
6050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6051$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6052          # Extract the first word of "$tool_basename", so it can be a program name with args.
6053set dummy $tool_basename; ac_word=$2
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
6056if ${ac_cv_path_CP+:} false; then :
6057  $as_echo_n "(cached) " >&6
6058else
6059  case $CP in
6060  [\\/]* | ?:[\\/]*)
6061  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6062  ;;
6063  *)
6064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067  IFS=$as_save_IFS
6068  test -z "$as_dir" && as_dir=.
6069    for ac_exec_ext in '' $ac_executable_extensions; do
6070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6071    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073    break 2
6074  fi
6075done
6076  done
6077IFS=$as_save_IFS
6078
6079  ;;
6080esac
6081fi
6082CP=$ac_cv_path_CP
6083if test -n "$CP"; then
6084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6085$as_echo "$CP" >&6; }
6086else
6087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6088$as_echo "no" >&6; }
6089fi
6090
6091
6092          if test "x$CP" = x; then
6093            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6094          fi
6095        else
6096          # Otherwise we believe it is a complete path. Use it as it is.
6097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6098$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6099          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6100$as_echo_n "checking for CP... " >&6; }
6101          if test ! -x "$tool_specified"; then
6102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6103$as_echo "not found" >&6; }
6104            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6105          fi
6106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6107$as_echo "$tool_specified" >&6; }
6108        fi
6109      fi
6110    fi
6111
6112  fi
6113
6114
6115
6116  if test "x$CP" = x; then
6117    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6118  fi
6119
6120
6121
6122
6123
6124  # Publish this variable in the help.
6125
6126
6127  if [ -z "${CUT+x}" ]; then
6128    # The variable is not set by user, try to locate tool using the code snippet
6129    for ac_prog in cut
6130do
6131  # Extract the first word of "$ac_prog", so it can be a program name with args.
6132set dummy $ac_prog; ac_word=$2
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134$as_echo_n "checking for $ac_word... " >&6; }
6135if ${ac_cv_path_CUT+:} false; then :
6136  $as_echo_n "(cached) " >&6
6137else
6138  case $CUT in
6139  [\\/]* | ?:[\\/]*)
6140  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6141  ;;
6142  *)
6143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146  IFS=$as_save_IFS
6147  test -z "$as_dir" && as_dir=.
6148    for ac_exec_ext in '' $ac_executable_extensions; do
6149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6150    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152    break 2
6153  fi
6154done
6155  done
6156IFS=$as_save_IFS
6157
6158  ;;
6159esac
6160fi
6161CUT=$ac_cv_path_CUT
6162if test -n "$CUT"; then
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6164$as_echo "$CUT" >&6; }
6165else
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167$as_echo "no" >&6; }
6168fi
6169
6170
6171  test -n "$CUT" && break
6172done
6173
6174  else
6175    # The variable is set, but is it from the command line or the environment?
6176
6177    # Try to remove the string !CUT! from our list.
6178    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6179    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6180      # If it failed, the variable was not from the command line. Ignore it,
6181      # but warn the user (except for BASH, which is always set by the calling BASH).
6182      if test "xCUT" != xBASH; then
6183        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6184$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6185      fi
6186      # Try to locate tool using the code snippet
6187      for ac_prog in cut
6188do
6189  # Extract the first word of "$ac_prog", so it can be a program name with args.
6190set dummy $ac_prog; ac_word=$2
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6192$as_echo_n "checking for $ac_word... " >&6; }
6193if ${ac_cv_path_CUT+:} false; then :
6194  $as_echo_n "(cached) " >&6
6195else
6196  case $CUT in
6197  [\\/]* | ?:[\\/]*)
6198  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6199  ;;
6200  *)
6201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6202for as_dir in $PATH
6203do
6204  IFS=$as_save_IFS
6205  test -z "$as_dir" && as_dir=.
6206    for ac_exec_ext in '' $ac_executable_extensions; do
6207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6208    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6210    break 2
6211  fi
6212done
6213  done
6214IFS=$as_save_IFS
6215
6216  ;;
6217esac
6218fi
6219CUT=$ac_cv_path_CUT
6220if test -n "$CUT"; then
6221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6222$as_echo "$CUT" >&6; }
6223else
6224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6225$as_echo "no" >&6; }
6226fi
6227
6228
6229  test -n "$CUT" && break
6230done
6231
6232    else
6233      # If it succeeded, then it was overridden by the user. We will use it
6234      # for the tool.
6235
6236      # First remove it from the list of overridden variables, so we can test
6237      # for unknown variables in the end.
6238      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6239
6240      # Check if we try to supply an empty value
6241      if test "x$CUT" = x; then
6242        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6243$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6245$as_echo_n "checking for CUT... " >&6; }
6246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6247$as_echo "disabled" >&6; }
6248      else
6249        # Check if the provided tool contains a complete path.
6250        tool_specified="$CUT"
6251        tool_basename="${tool_specified##*/}"
6252        if test "x$tool_basename" = "x$tool_specified"; then
6253          # A command without a complete path is provided, search $PATH.
6254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6255$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6256          # Extract the first word of "$tool_basename", so it can be a program name with args.
6257set dummy $tool_basename; ac_word=$2
6258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6259$as_echo_n "checking for $ac_word... " >&6; }
6260if ${ac_cv_path_CUT+:} false; then :
6261  $as_echo_n "(cached) " >&6
6262else
6263  case $CUT in
6264  [\\/]* | ?:[\\/]*)
6265  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6266  ;;
6267  *)
6268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6269for as_dir in $PATH
6270do
6271  IFS=$as_save_IFS
6272  test -z "$as_dir" && as_dir=.
6273    for ac_exec_ext in '' $ac_executable_extensions; do
6274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6275    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6277    break 2
6278  fi
6279done
6280  done
6281IFS=$as_save_IFS
6282
6283  ;;
6284esac
6285fi
6286CUT=$ac_cv_path_CUT
6287if test -n "$CUT"; then
6288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6289$as_echo "$CUT" >&6; }
6290else
6291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6292$as_echo "no" >&6; }
6293fi
6294
6295
6296          if test "x$CUT" = x; then
6297            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6298          fi
6299        else
6300          # Otherwise we believe it is a complete path. Use it as it is.
6301          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6302$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6303          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6304$as_echo_n "checking for CUT... " >&6; }
6305          if test ! -x "$tool_specified"; then
6306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6307$as_echo "not found" >&6; }
6308            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6309          fi
6310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6311$as_echo "$tool_specified" >&6; }
6312        fi
6313      fi
6314    fi
6315
6316  fi
6317
6318
6319
6320  if test "x$CUT" = x; then
6321    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6322  fi
6323
6324
6325
6326
6327
6328  # Publish this variable in the help.
6329
6330
6331  if [ -z "${DATE+x}" ]; then
6332    # The variable is not set by user, try to locate tool using the code snippet
6333    for ac_prog in date
6334do
6335  # Extract the first word of "$ac_prog", so it can be a program name with args.
6336set dummy $ac_prog; ac_word=$2
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338$as_echo_n "checking for $ac_word... " >&6; }
6339if ${ac_cv_path_DATE+:} false; then :
6340  $as_echo_n "(cached) " >&6
6341else
6342  case $DATE in
6343  [\\/]* | ?:[\\/]*)
6344  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6345  ;;
6346  *)
6347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350  IFS=$as_save_IFS
6351  test -z "$as_dir" && as_dir=.
6352    for ac_exec_ext in '' $ac_executable_extensions; do
6353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356    break 2
6357  fi
6358done
6359  done
6360IFS=$as_save_IFS
6361
6362  ;;
6363esac
6364fi
6365DATE=$ac_cv_path_DATE
6366if test -n "$DATE"; then
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6368$as_echo "$DATE" >&6; }
6369else
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375  test -n "$DATE" && break
6376done
6377
6378  else
6379    # The variable is set, but is it from the command line or the environment?
6380
6381    # Try to remove the string !DATE! from our list.
6382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6384      # If it failed, the variable was not from the command line. Ignore it,
6385      # but warn the user (except for BASH, which is always set by the calling BASH).
6386      if test "xDATE" != xBASH; then
6387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6388$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6389      fi
6390      # Try to locate tool using the code snippet
6391      for ac_prog in date
6392do
6393  # Extract the first word of "$ac_prog", so it can be a program name with args.
6394set dummy $ac_prog; ac_word=$2
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6396$as_echo_n "checking for $ac_word... " >&6; }
6397if ${ac_cv_path_DATE+:} false; then :
6398  $as_echo_n "(cached) " >&6
6399else
6400  case $DATE in
6401  [\\/]* | ?:[\\/]*)
6402  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6403  ;;
6404  *)
6405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6406for as_dir in $PATH
6407do
6408  IFS=$as_save_IFS
6409  test -z "$as_dir" && as_dir=.
6410    for ac_exec_ext in '' $ac_executable_extensions; do
6411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6412    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6414    break 2
6415  fi
6416done
6417  done
6418IFS=$as_save_IFS
6419
6420  ;;
6421esac
6422fi
6423DATE=$ac_cv_path_DATE
6424if test -n "$DATE"; then
6425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6426$as_echo "$DATE" >&6; }
6427else
6428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430fi
6431
6432
6433  test -n "$DATE" && break
6434done
6435
6436    else
6437      # If it succeeded, then it was overridden by the user. We will use it
6438      # for the tool.
6439
6440      # First remove it from the list of overridden variables, so we can test
6441      # for unknown variables in the end.
6442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6443
6444      # Check if we try to supply an empty value
6445      if test "x$DATE" = x; then
6446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6447$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6449$as_echo_n "checking for DATE... " >&6; }
6450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6451$as_echo "disabled" >&6; }
6452      else
6453        # Check if the provided tool contains a complete path.
6454        tool_specified="$DATE"
6455        tool_basename="${tool_specified##*/}"
6456        if test "x$tool_basename" = "x$tool_specified"; then
6457          # A command without a complete path is provided, search $PATH.
6458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6459$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6460          # Extract the first word of "$tool_basename", so it can be a program name with args.
6461set dummy $tool_basename; ac_word=$2
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6463$as_echo_n "checking for $ac_word... " >&6; }
6464if ${ac_cv_path_DATE+:} false; then :
6465  $as_echo_n "(cached) " >&6
6466else
6467  case $DATE in
6468  [\\/]* | ?:[\\/]*)
6469  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6470  ;;
6471  *)
6472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6473for as_dir in $PATH
6474do
6475  IFS=$as_save_IFS
6476  test -z "$as_dir" && as_dir=.
6477    for ac_exec_ext in '' $ac_executable_extensions; do
6478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6479    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6481    break 2
6482  fi
6483done
6484  done
6485IFS=$as_save_IFS
6486
6487  ;;
6488esac
6489fi
6490DATE=$ac_cv_path_DATE
6491if test -n "$DATE"; then
6492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6493$as_echo "$DATE" >&6; }
6494else
6495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6496$as_echo "no" >&6; }
6497fi
6498
6499
6500          if test "x$DATE" = x; then
6501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6502          fi
6503        else
6504          # Otherwise we believe it is a complete path. Use it as it is.
6505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6506$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6508$as_echo_n "checking for DATE... " >&6; }
6509          if test ! -x "$tool_specified"; then
6510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6511$as_echo "not found" >&6; }
6512            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6513          fi
6514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6515$as_echo "$tool_specified" >&6; }
6516        fi
6517      fi
6518    fi
6519
6520  fi
6521
6522
6523
6524  if test "x$DATE" = x; then
6525    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6526  fi
6527
6528
6529
6530
6531
6532  # Publish this variable in the help.
6533
6534
6535  if [ -z "${DIFF+x}" ]; then
6536    # The variable is not set by user, try to locate tool using the code snippet
6537    for ac_prog in gdiff diff
6538do
6539  # Extract the first word of "$ac_prog", so it can be a program name with args.
6540set dummy $ac_prog; ac_word=$2
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6542$as_echo_n "checking for $ac_word... " >&6; }
6543if ${ac_cv_path_DIFF+:} false; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  case $DIFF in
6547  [\\/]* | ?:[\\/]*)
6548  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6549  ;;
6550  *)
6551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552for as_dir in $PATH
6553do
6554  IFS=$as_save_IFS
6555  test -z "$as_dir" && as_dir=.
6556    for ac_exec_ext in '' $ac_executable_extensions; do
6557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560    break 2
6561  fi
6562done
6563  done
6564IFS=$as_save_IFS
6565
6566  ;;
6567esac
6568fi
6569DIFF=$ac_cv_path_DIFF
6570if test -n "$DIFF"; then
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6572$as_echo "$DIFF" >&6; }
6573else
6574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
6576fi
6577
6578
6579  test -n "$DIFF" && break
6580done
6581
6582  else
6583    # The variable is set, but is it from the command line or the environment?
6584
6585    # Try to remove the string !DIFF! from our list.
6586    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6587    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6588      # If it failed, the variable was not from the command line. Ignore it,
6589      # but warn the user (except for BASH, which is always set by the calling BASH).
6590      if test "xDIFF" != xBASH; then
6591        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6592$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6593      fi
6594      # Try to locate tool using the code snippet
6595      for ac_prog in gdiff diff
6596do
6597  # Extract the first word of "$ac_prog", so it can be a program name with args.
6598set dummy $ac_prog; ac_word=$2
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6600$as_echo_n "checking for $ac_word... " >&6; }
6601if ${ac_cv_path_DIFF+:} false; then :
6602  $as_echo_n "(cached) " >&6
6603else
6604  case $DIFF in
6605  [\\/]* | ?:[\\/]*)
6606  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6607  ;;
6608  *)
6609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6610for as_dir in $PATH
6611do
6612  IFS=$as_save_IFS
6613  test -z "$as_dir" && as_dir=.
6614    for ac_exec_ext in '' $ac_executable_extensions; do
6615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6616    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6618    break 2
6619  fi
6620done
6621  done
6622IFS=$as_save_IFS
6623
6624  ;;
6625esac
6626fi
6627DIFF=$ac_cv_path_DIFF
6628if test -n "$DIFF"; then
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6630$as_echo "$DIFF" >&6; }
6631else
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633$as_echo "no" >&6; }
6634fi
6635
6636
6637  test -n "$DIFF" && break
6638done
6639
6640    else
6641      # If it succeeded, then it was overridden by the user. We will use it
6642      # for the tool.
6643
6644      # First remove it from the list of overridden variables, so we can test
6645      # for unknown variables in the end.
6646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6647
6648      # Check if we try to supply an empty value
6649      if test "x$DIFF" = x; then
6650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6651$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6653$as_echo_n "checking for DIFF... " >&6; }
6654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6655$as_echo "disabled" >&6; }
6656      else
6657        # Check if the provided tool contains a complete path.
6658        tool_specified="$DIFF"
6659        tool_basename="${tool_specified##*/}"
6660        if test "x$tool_basename" = "x$tool_specified"; then
6661          # A command without a complete path is provided, search $PATH.
6662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6663$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6664          # Extract the first word of "$tool_basename", so it can be a program name with args.
6665set dummy $tool_basename; ac_word=$2
6666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6667$as_echo_n "checking for $ac_word... " >&6; }
6668if ${ac_cv_path_DIFF+:} false; then :
6669  $as_echo_n "(cached) " >&6
6670else
6671  case $DIFF in
6672  [\\/]* | ?:[\\/]*)
6673  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6674  ;;
6675  *)
6676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6677for as_dir in $PATH
6678do
6679  IFS=$as_save_IFS
6680  test -z "$as_dir" && as_dir=.
6681    for ac_exec_ext in '' $ac_executable_extensions; do
6682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6683    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6685    break 2
6686  fi
6687done
6688  done
6689IFS=$as_save_IFS
6690
6691  ;;
6692esac
6693fi
6694DIFF=$ac_cv_path_DIFF
6695if test -n "$DIFF"; then
6696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6697$as_echo "$DIFF" >&6; }
6698else
6699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6700$as_echo "no" >&6; }
6701fi
6702
6703
6704          if test "x$DIFF" = x; then
6705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6706          fi
6707        else
6708          # Otherwise we believe it is a complete path. Use it as it is.
6709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6710$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6712$as_echo_n "checking for DIFF... " >&6; }
6713          if test ! -x "$tool_specified"; then
6714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6715$as_echo "not found" >&6; }
6716            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6717          fi
6718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6719$as_echo "$tool_specified" >&6; }
6720        fi
6721      fi
6722    fi
6723
6724  fi
6725
6726
6727
6728  if test "x$DIFF" = x; then
6729    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6730  fi
6731
6732
6733
6734
6735
6736  # Publish this variable in the help.
6737
6738
6739  if [ -z "${DIRNAME+x}" ]; then
6740    # The variable is not set by user, try to locate tool using the code snippet
6741    for ac_prog in dirname
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_DIRNAME+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $DIRNAME in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773DIRNAME=$ac_cv_path_DIRNAME
6774if test -n "$DIRNAME"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6776$as_echo "$DIRNAME" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$DIRNAME" && break
6784done
6785
6786  else
6787    # The variable is set, but is it from the command line or the environment?
6788
6789    # Try to remove the string !DIRNAME! from our list.
6790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6792      # If it failed, the variable was not from the command line. Ignore it,
6793      # but warn the user (except for BASH, which is always set by the calling BASH).
6794      if test "xDIRNAME" != xBASH; then
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6796$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6797      fi
6798      # Try to locate tool using the code snippet
6799      for ac_prog in dirname
6800do
6801  # Extract the first word of "$ac_prog", so it can be a program name with args.
6802set dummy $ac_prog; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_DIRNAME+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $DIRNAME in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831DIRNAME=$ac_cv_path_DIRNAME
6832if test -n "$DIRNAME"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6834$as_echo "$DIRNAME" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841  test -n "$DIRNAME" && break
6842done
6843
6844    else
6845      # If it succeeded, then it was overridden by the user. We will use it
6846      # for the tool.
6847
6848      # First remove it from the list of overridden variables, so we can test
6849      # for unknown variables in the end.
6850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6851
6852      # Check if we try to supply an empty value
6853      if test "x$DIRNAME" = x; then
6854        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6855$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6856        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6857$as_echo_n "checking for DIRNAME... " >&6; }
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6859$as_echo "disabled" >&6; }
6860      else
6861        # Check if the provided tool contains a complete path.
6862        tool_specified="$DIRNAME"
6863        tool_basename="${tool_specified##*/}"
6864        if test "x$tool_basename" = "x$tool_specified"; then
6865          # A command without a complete path is provided, search $PATH.
6866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6867$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6868          # Extract the first word of "$tool_basename", so it can be a program name with args.
6869set dummy $tool_basename; ac_word=$2
6870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6871$as_echo_n "checking for $ac_word... " >&6; }
6872if ${ac_cv_path_DIRNAME+:} false; then :
6873  $as_echo_n "(cached) " >&6
6874else
6875  case $DIRNAME in
6876  [\\/]* | ?:[\\/]*)
6877  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6878  ;;
6879  *)
6880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6881for as_dir in $PATH
6882do
6883  IFS=$as_save_IFS
6884  test -z "$as_dir" && as_dir=.
6885    for ac_exec_ext in '' $ac_executable_extensions; do
6886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6887    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6889    break 2
6890  fi
6891done
6892  done
6893IFS=$as_save_IFS
6894
6895  ;;
6896esac
6897fi
6898DIRNAME=$ac_cv_path_DIRNAME
6899if test -n "$DIRNAME"; then
6900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6901$as_echo "$DIRNAME" >&6; }
6902else
6903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6904$as_echo "no" >&6; }
6905fi
6906
6907
6908          if test "x$DIRNAME" = x; then
6909            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6910          fi
6911        else
6912          # Otherwise we believe it is a complete path. Use it as it is.
6913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6914$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6916$as_echo_n "checking for DIRNAME... " >&6; }
6917          if test ! -x "$tool_specified"; then
6918            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6919$as_echo "not found" >&6; }
6920            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6921          fi
6922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6923$as_echo "$tool_specified" >&6; }
6924        fi
6925      fi
6926    fi
6927
6928  fi
6929
6930
6931
6932  if test "x$DIRNAME" = x; then
6933    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6934  fi
6935
6936
6937
6938
6939
6940  # Publish this variable in the help.
6941
6942
6943  if [ -z "${ECHO+x}" ]; then
6944    # The variable is not set by user, try to locate tool using the code snippet
6945    for ac_prog in echo
6946do
6947  # Extract the first word of "$ac_prog", so it can be a program name with args.
6948set dummy $ac_prog; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_ECHO+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $ECHO in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977ECHO=$ac_cv_path_ECHO
6978if test -n "$ECHO"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6980$as_echo "$ECHO" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986
6987  test -n "$ECHO" && break
6988done
6989
6990  else
6991    # The variable is set, but is it from the command line or the environment?
6992
6993    # Try to remove the string !ECHO! from our list.
6994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6996      # If it failed, the variable was not from the command line. Ignore it,
6997      # but warn the user (except for BASH, which is always set by the calling BASH).
6998      if test "xECHO" != xBASH; then
6999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7000$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7001      fi
7002      # Try to locate tool using the code snippet
7003      for ac_prog in echo
7004do
7005  # Extract the first word of "$ac_prog", so it can be a program name with args.
7006set dummy $ac_prog; ac_word=$2
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7008$as_echo_n "checking for $ac_word... " >&6; }
7009if ${ac_cv_path_ECHO+:} false; then :
7010  $as_echo_n "(cached) " >&6
7011else
7012  case $ECHO in
7013  [\\/]* | ?:[\\/]*)
7014  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7015  ;;
7016  *)
7017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7018for as_dir in $PATH
7019do
7020  IFS=$as_save_IFS
7021  test -z "$as_dir" && as_dir=.
7022    for ac_exec_ext in '' $ac_executable_extensions; do
7023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7024    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7026    break 2
7027  fi
7028done
7029  done
7030IFS=$as_save_IFS
7031
7032  ;;
7033esac
7034fi
7035ECHO=$ac_cv_path_ECHO
7036if test -n "$ECHO"; then
7037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7038$as_echo "$ECHO" >&6; }
7039else
7040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7041$as_echo "no" >&6; }
7042fi
7043
7044
7045  test -n "$ECHO" && break
7046done
7047
7048    else
7049      # If it succeeded, then it was overridden by the user. We will use it
7050      # for the tool.
7051
7052      # First remove it from the list of overridden variables, so we can test
7053      # for unknown variables in the end.
7054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7055
7056      # Check if we try to supply an empty value
7057      if test "x$ECHO" = x; then
7058        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7059$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7060        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7061$as_echo_n "checking for ECHO... " >&6; }
7062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7063$as_echo "disabled" >&6; }
7064      else
7065        # Check if the provided tool contains a complete path.
7066        tool_specified="$ECHO"
7067        tool_basename="${tool_specified##*/}"
7068        if test "x$tool_basename" = "x$tool_specified"; then
7069          # A command without a complete path is provided, search $PATH.
7070          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7071$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7072          # Extract the first word of "$tool_basename", so it can be a program name with args.
7073set dummy $tool_basename; ac_word=$2
7074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7075$as_echo_n "checking for $ac_word... " >&6; }
7076if ${ac_cv_path_ECHO+:} false; then :
7077  $as_echo_n "(cached) " >&6
7078else
7079  case $ECHO in
7080  [\\/]* | ?:[\\/]*)
7081  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7082  ;;
7083  *)
7084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7085for as_dir in $PATH
7086do
7087  IFS=$as_save_IFS
7088  test -z "$as_dir" && as_dir=.
7089    for ac_exec_ext in '' $ac_executable_extensions; do
7090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7091    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7093    break 2
7094  fi
7095done
7096  done
7097IFS=$as_save_IFS
7098
7099  ;;
7100esac
7101fi
7102ECHO=$ac_cv_path_ECHO
7103if test -n "$ECHO"; then
7104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7105$as_echo "$ECHO" >&6; }
7106else
7107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7108$as_echo "no" >&6; }
7109fi
7110
7111
7112          if test "x$ECHO" = x; then
7113            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7114          fi
7115        else
7116          # Otherwise we believe it is a complete path. Use it as it is.
7117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7118$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7119          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7120$as_echo_n "checking for ECHO... " >&6; }
7121          if test ! -x "$tool_specified"; then
7122            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7123$as_echo "not found" >&6; }
7124            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7125          fi
7126          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7127$as_echo "$tool_specified" >&6; }
7128        fi
7129      fi
7130    fi
7131
7132  fi
7133
7134
7135
7136  if test "x$ECHO" = x; then
7137    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7138  fi
7139
7140
7141
7142
7143
7144  # Publish this variable in the help.
7145
7146
7147  if [ -z "${EXPR+x}" ]; then
7148    # The variable is not set by user, try to locate tool using the code snippet
7149    for ac_prog in expr
7150do
7151  # Extract the first word of "$ac_prog", so it can be a program name with args.
7152set dummy $ac_prog; ac_word=$2
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154$as_echo_n "checking for $ac_word... " >&6; }
7155if ${ac_cv_path_EXPR+:} false; then :
7156  $as_echo_n "(cached) " >&6
7157else
7158  case $EXPR in
7159  [\\/]* | ?:[\\/]*)
7160  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7161  ;;
7162  *)
7163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164for as_dir in $PATH
7165do
7166  IFS=$as_save_IFS
7167  test -z "$as_dir" && as_dir=.
7168    for ac_exec_ext in '' $ac_executable_extensions; do
7169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7170    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7172    break 2
7173  fi
7174done
7175  done
7176IFS=$as_save_IFS
7177
7178  ;;
7179esac
7180fi
7181EXPR=$ac_cv_path_EXPR
7182if test -n "$EXPR"; then
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7184$as_echo "$EXPR" >&6; }
7185else
7186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187$as_echo "no" >&6; }
7188fi
7189
7190
7191  test -n "$EXPR" && break
7192done
7193
7194  else
7195    # The variable is set, but is it from the command line or the environment?
7196
7197    # Try to remove the string !EXPR! from our list.
7198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7200      # If it failed, the variable was not from the command line. Ignore it,
7201      # but warn the user (except for BASH, which is always set by the calling BASH).
7202      if test "xEXPR" != xBASH; then
7203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7204$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7205      fi
7206      # Try to locate tool using the code snippet
7207      for ac_prog in expr
7208do
7209  # Extract the first word of "$ac_prog", so it can be a program name with args.
7210set dummy $ac_prog; ac_word=$2
7211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7212$as_echo_n "checking for $ac_word... " >&6; }
7213if ${ac_cv_path_EXPR+:} false; then :
7214  $as_echo_n "(cached) " >&6
7215else
7216  case $EXPR in
7217  [\\/]* | ?:[\\/]*)
7218  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7219  ;;
7220  *)
7221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7222for as_dir in $PATH
7223do
7224  IFS=$as_save_IFS
7225  test -z "$as_dir" && as_dir=.
7226    for ac_exec_ext in '' $ac_executable_extensions; do
7227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7228    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7230    break 2
7231  fi
7232done
7233  done
7234IFS=$as_save_IFS
7235
7236  ;;
7237esac
7238fi
7239EXPR=$ac_cv_path_EXPR
7240if test -n "$EXPR"; then
7241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7242$as_echo "$EXPR" >&6; }
7243else
7244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7245$as_echo "no" >&6; }
7246fi
7247
7248
7249  test -n "$EXPR" && break
7250done
7251
7252    else
7253      # If it succeeded, then it was overridden by the user. We will use it
7254      # for the tool.
7255
7256      # First remove it from the list of overridden variables, so we can test
7257      # for unknown variables in the end.
7258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7259
7260      # Check if we try to supply an empty value
7261      if test "x$EXPR" = x; then
7262        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7263$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7264        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7265$as_echo_n "checking for EXPR... " >&6; }
7266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7267$as_echo "disabled" >&6; }
7268      else
7269        # Check if the provided tool contains a complete path.
7270        tool_specified="$EXPR"
7271        tool_basename="${tool_specified##*/}"
7272        if test "x$tool_basename" = "x$tool_specified"; then
7273          # A command without a complete path is provided, search $PATH.
7274          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7275$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7276          # Extract the first word of "$tool_basename", so it can be a program name with args.
7277set dummy $tool_basename; ac_word=$2
7278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7279$as_echo_n "checking for $ac_word... " >&6; }
7280if ${ac_cv_path_EXPR+:} false; then :
7281  $as_echo_n "(cached) " >&6
7282else
7283  case $EXPR in
7284  [\\/]* | ?:[\\/]*)
7285  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7286  ;;
7287  *)
7288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7289for as_dir in $PATH
7290do
7291  IFS=$as_save_IFS
7292  test -z "$as_dir" && as_dir=.
7293    for ac_exec_ext in '' $ac_executable_extensions; do
7294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7295    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7297    break 2
7298  fi
7299done
7300  done
7301IFS=$as_save_IFS
7302
7303  ;;
7304esac
7305fi
7306EXPR=$ac_cv_path_EXPR
7307if test -n "$EXPR"; then
7308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7309$as_echo "$EXPR" >&6; }
7310else
7311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312$as_echo "no" >&6; }
7313fi
7314
7315
7316          if test "x$EXPR" = x; then
7317            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7318          fi
7319        else
7320          # Otherwise we believe it is a complete path. Use it as it is.
7321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7322$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7323          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7324$as_echo_n "checking for EXPR... " >&6; }
7325          if test ! -x "$tool_specified"; then
7326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7327$as_echo "not found" >&6; }
7328            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7329          fi
7330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7331$as_echo "$tool_specified" >&6; }
7332        fi
7333      fi
7334    fi
7335
7336  fi
7337
7338
7339
7340  if test "x$EXPR" = x; then
7341    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7342  fi
7343
7344
7345
7346
7347
7348  # Publish this variable in the help.
7349
7350
7351  if [ -z "${FILE+x}" ]; then
7352    # The variable is not set by user, try to locate tool using the code snippet
7353    for ac_prog in file
7354do
7355  # Extract the first word of "$ac_prog", so it can be a program name with args.
7356set dummy $ac_prog; ac_word=$2
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358$as_echo_n "checking for $ac_word... " >&6; }
7359if ${ac_cv_path_FILE+:} false; then :
7360  $as_echo_n "(cached) " >&6
7361else
7362  case $FILE in
7363  [\\/]* | ?:[\\/]*)
7364  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7365  ;;
7366  *)
7367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368for as_dir in $PATH
7369do
7370  IFS=$as_save_IFS
7371  test -z "$as_dir" && as_dir=.
7372    for ac_exec_ext in '' $ac_executable_extensions; do
7373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7374    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7376    break 2
7377  fi
7378done
7379  done
7380IFS=$as_save_IFS
7381
7382  ;;
7383esac
7384fi
7385FILE=$ac_cv_path_FILE
7386if test -n "$FILE"; then
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7388$as_echo "$FILE" >&6; }
7389else
7390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7391$as_echo "no" >&6; }
7392fi
7393
7394
7395  test -n "$FILE" && break
7396done
7397
7398  else
7399    # The variable is set, but is it from the command line or the environment?
7400
7401    # Try to remove the string !FILE! from our list.
7402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7404      # If it failed, the variable was not from the command line. Ignore it,
7405      # but warn the user (except for BASH, which is always set by the calling BASH).
7406      if test "xFILE" != xBASH; then
7407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7408$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7409      fi
7410      # Try to locate tool using the code snippet
7411      for ac_prog in file
7412do
7413  # Extract the first word of "$ac_prog", so it can be a program name with args.
7414set dummy $ac_prog; ac_word=$2
7415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7416$as_echo_n "checking for $ac_word... " >&6; }
7417if ${ac_cv_path_FILE+:} false; then :
7418  $as_echo_n "(cached) " >&6
7419else
7420  case $FILE in
7421  [\\/]* | ?:[\\/]*)
7422  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7423  ;;
7424  *)
7425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7426for as_dir in $PATH
7427do
7428  IFS=$as_save_IFS
7429  test -z "$as_dir" && as_dir=.
7430    for ac_exec_ext in '' $ac_executable_extensions; do
7431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7432    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7434    break 2
7435  fi
7436done
7437  done
7438IFS=$as_save_IFS
7439
7440  ;;
7441esac
7442fi
7443FILE=$ac_cv_path_FILE
7444if test -n "$FILE"; then
7445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7446$as_echo "$FILE" >&6; }
7447else
7448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7449$as_echo "no" >&6; }
7450fi
7451
7452
7453  test -n "$FILE" && break
7454done
7455
7456    else
7457      # If it succeeded, then it was overridden by the user. We will use it
7458      # for the tool.
7459
7460      # First remove it from the list of overridden variables, so we can test
7461      # for unknown variables in the end.
7462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7463
7464      # Check if we try to supply an empty value
7465      if test "x$FILE" = x; then
7466        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7467$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7469$as_echo_n "checking for FILE... " >&6; }
7470        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7471$as_echo "disabled" >&6; }
7472      else
7473        # Check if the provided tool contains a complete path.
7474        tool_specified="$FILE"
7475        tool_basename="${tool_specified##*/}"
7476        if test "x$tool_basename" = "x$tool_specified"; then
7477          # A command without a complete path is provided, search $PATH.
7478          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7479$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7480          # Extract the first word of "$tool_basename", so it can be a program name with args.
7481set dummy $tool_basename; ac_word=$2
7482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7483$as_echo_n "checking for $ac_word... " >&6; }
7484if ${ac_cv_path_FILE+:} false; then :
7485  $as_echo_n "(cached) " >&6
7486else
7487  case $FILE in
7488  [\\/]* | ?:[\\/]*)
7489  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7490  ;;
7491  *)
7492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7493for as_dir in $PATH
7494do
7495  IFS=$as_save_IFS
7496  test -z "$as_dir" && as_dir=.
7497    for ac_exec_ext in '' $ac_executable_extensions; do
7498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7499    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7501    break 2
7502  fi
7503done
7504  done
7505IFS=$as_save_IFS
7506
7507  ;;
7508esac
7509fi
7510FILE=$ac_cv_path_FILE
7511if test -n "$FILE"; then
7512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7513$as_echo "$FILE" >&6; }
7514else
7515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516$as_echo "no" >&6; }
7517fi
7518
7519
7520          if test "x$FILE" = x; then
7521            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7522          fi
7523        else
7524          # Otherwise we believe it is a complete path. Use it as it is.
7525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7526$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7527          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7528$as_echo_n "checking for FILE... " >&6; }
7529          if test ! -x "$tool_specified"; then
7530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7531$as_echo "not found" >&6; }
7532            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7533          fi
7534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7535$as_echo "$tool_specified" >&6; }
7536        fi
7537      fi
7538    fi
7539
7540  fi
7541
7542
7543
7544  if test "x$FILE" = x; then
7545    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7546  fi
7547
7548
7549
7550
7551
7552  # Publish this variable in the help.
7553
7554
7555  if [ -z "${FIND+x}" ]; then
7556    # The variable is not set by user, try to locate tool using the code snippet
7557    for ac_prog in find
7558do
7559  # Extract the first word of "$ac_prog", so it can be a program name with args.
7560set dummy $ac_prog; ac_word=$2
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7562$as_echo_n "checking for $ac_word... " >&6; }
7563if ${ac_cv_path_FIND+:} false; then :
7564  $as_echo_n "(cached) " >&6
7565else
7566  case $FIND in
7567  [\\/]* | ?:[\\/]*)
7568  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7569  ;;
7570  *)
7571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7572for as_dir in $PATH
7573do
7574  IFS=$as_save_IFS
7575  test -z "$as_dir" && as_dir=.
7576    for ac_exec_ext in '' $ac_executable_extensions; do
7577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7578    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7580    break 2
7581  fi
7582done
7583  done
7584IFS=$as_save_IFS
7585
7586  ;;
7587esac
7588fi
7589FIND=$ac_cv_path_FIND
7590if test -n "$FIND"; then
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7592$as_echo "$FIND" >&6; }
7593else
7594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7595$as_echo "no" >&6; }
7596fi
7597
7598
7599  test -n "$FIND" && break
7600done
7601
7602  else
7603    # The variable is set, but is it from the command line or the environment?
7604
7605    # Try to remove the string !FIND! from our list.
7606    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7607    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7608      # If it failed, the variable was not from the command line. Ignore it,
7609      # but warn the user (except for BASH, which is always set by the calling BASH).
7610      if test "xFIND" != xBASH; then
7611        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7612$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7613      fi
7614      # Try to locate tool using the code snippet
7615      for ac_prog in find
7616do
7617  # Extract the first word of "$ac_prog", so it can be a program name with args.
7618set dummy $ac_prog; ac_word=$2
7619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7620$as_echo_n "checking for $ac_word... " >&6; }
7621if ${ac_cv_path_FIND+:} false; then :
7622  $as_echo_n "(cached) " >&6
7623else
7624  case $FIND in
7625  [\\/]* | ?:[\\/]*)
7626  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7627  ;;
7628  *)
7629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7630for as_dir in $PATH
7631do
7632  IFS=$as_save_IFS
7633  test -z "$as_dir" && as_dir=.
7634    for ac_exec_ext in '' $ac_executable_extensions; do
7635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7636    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7638    break 2
7639  fi
7640done
7641  done
7642IFS=$as_save_IFS
7643
7644  ;;
7645esac
7646fi
7647FIND=$ac_cv_path_FIND
7648if test -n "$FIND"; then
7649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7650$as_echo "$FIND" >&6; }
7651else
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653$as_echo "no" >&6; }
7654fi
7655
7656
7657  test -n "$FIND" && break
7658done
7659
7660    else
7661      # If it succeeded, then it was overridden by the user. We will use it
7662      # for the tool.
7663
7664      # First remove it from the list of overridden variables, so we can test
7665      # for unknown variables in the end.
7666      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7667
7668      # Check if we try to supply an empty value
7669      if test "x$FIND" = x; then
7670        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7671$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7672        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7673$as_echo_n "checking for FIND... " >&6; }
7674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7675$as_echo "disabled" >&6; }
7676      else
7677        # Check if the provided tool contains a complete path.
7678        tool_specified="$FIND"
7679        tool_basename="${tool_specified##*/}"
7680        if test "x$tool_basename" = "x$tool_specified"; then
7681          # A command without a complete path is provided, search $PATH.
7682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7683$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7684          # Extract the first word of "$tool_basename", so it can be a program name with args.
7685set dummy $tool_basename; ac_word=$2
7686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7687$as_echo_n "checking for $ac_word... " >&6; }
7688if ${ac_cv_path_FIND+:} false; then :
7689  $as_echo_n "(cached) " >&6
7690else
7691  case $FIND in
7692  [\\/]* | ?:[\\/]*)
7693  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7694  ;;
7695  *)
7696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7697for as_dir in $PATH
7698do
7699  IFS=$as_save_IFS
7700  test -z "$as_dir" && as_dir=.
7701    for ac_exec_ext in '' $ac_executable_extensions; do
7702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7703    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7705    break 2
7706  fi
7707done
7708  done
7709IFS=$as_save_IFS
7710
7711  ;;
7712esac
7713fi
7714FIND=$ac_cv_path_FIND
7715if test -n "$FIND"; then
7716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7717$as_echo "$FIND" >&6; }
7718else
7719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7720$as_echo "no" >&6; }
7721fi
7722
7723
7724          if test "x$FIND" = x; then
7725            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7726          fi
7727        else
7728          # Otherwise we believe it is a complete path. Use it as it is.
7729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7730$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7731          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7732$as_echo_n "checking for FIND... " >&6; }
7733          if test ! -x "$tool_specified"; then
7734            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7735$as_echo "not found" >&6; }
7736            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7737          fi
7738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7739$as_echo "$tool_specified" >&6; }
7740        fi
7741      fi
7742    fi
7743
7744  fi
7745
7746
7747
7748  if test "x$FIND" = x; then
7749    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7750  fi
7751
7752
7753
7754
7755
7756  # Publish this variable in the help.
7757
7758
7759  if [ -z "${HEAD+x}" ]; then
7760    # The variable is not set by user, try to locate tool using the code snippet
7761    for ac_prog in head
7762do
7763  # Extract the first word of "$ac_prog", so it can be a program name with args.
7764set dummy $ac_prog; ac_word=$2
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7766$as_echo_n "checking for $ac_word... " >&6; }
7767if ${ac_cv_path_HEAD+:} false; then :
7768  $as_echo_n "(cached) " >&6
7769else
7770  case $HEAD in
7771  [\\/]* | ?:[\\/]*)
7772  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7773  ;;
7774  *)
7775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7776for as_dir in $PATH
7777do
7778  IFS=$as_save_IFS
7779  test -z "$as_dir" && as_dir=.
7780    for ac_exec_ext in '' $ac_executable_extensions; do
7781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7782    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7784    break 2
7785  fi
7786done
7787  done
7788IFS=$as_save_IFS
7789
7790  ;;
7791esac
7792fi
7793HEAD=$ac_cv_path_HEAD
7794if test -n "$HEAD"; then
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7796$as_echo "$HEAD" >&6; }
7797else
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799$as_echo "no" >&6; }
7800fi
7801
7802
7803  test -n "$HEAD" && break
7804done
7805
7806  else
7807    # The variable is set, but is it from the command line or the environment?
7808
7809    # Try to remove the string !HEAD! from our list.
7810    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7811    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7812      # If it failed, the variable was not from the command line. Ignore it,
7813      # but warn the user (except for BASH, which is always set by the calling BASH).
7814      if test "xHEAD" != xBASH; then
7815        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7816$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7817      fi
7818      # Try to locate tool using the code snippet
7819      for ac_prog in head
7820do
7821  # Extract the first word of "$ac_prog", so it can be a program name with args.
7822set dummy $ac_prog; ac_word=$2
7823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7824$as_echo_n "checking for $ac_word... " >&6; }
7825if ${ac_cv_path_HEAD+:} false; then :
7826  $as_echo_n "(cached) " >&6
7827else
7828  case $HEAD in
7829  [\\/]* | ?:[\\/]*)
7830  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7831  ;;
7832  *)
7833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7834for as_dir in $PATH
7835do
7836  IFS=$as_save_IFS
7837  test -z "$as_dir" && as_dir=.
7838    for ac_exec_ext in '' $ac_executable_extensions; do
7839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7840    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7842    break 2
7843  fi
7844done
7845  done
7846IFS=$as_save_IFS
7847
7848  ;;
7849esac
7850fi
7851HEAD=$ac_cv_path_HEAD
7852if test -n "$HEAD"; then
7853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7854$as_echo "$HEAD" >&6; }
7855else
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7857$as_echo "no" >&6; }
7858fi
7859
7860
7861  test -n "$HEAD" && break
7862done
7863
7864    else
7865      # If it succeeded, then it was overridden by the user. We will use it
7866      # for the tool.
7867
7868      # First remove it from the list of overridden variables, so we can test
7869      # for unknown variables in the end.
7870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7871
7872      # Check if we try to supply an empty value
7873      if test "x$HEAD" = x; then
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7875$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7877$as_echo_n "checking for HEAD... " >&6; }
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7879$as_echo "disabled" >&6; }
7880      else
7881        # Check if the provided tool contains a complete path.
7882        tool_specified="$HEAD"
7883        tool_basename="${tool_specified##*/}"
7884        if test "x$tool_basename" = "x$tool_specified"; then
7885          # A command without a complete path is provided, search $PATH.
7886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7887$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7888          # Extract the first word of "$tool_basename", so it can be a program name with args.
7889set dummy $tool_basename; ac_word=$2
7890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7891$as_echo_n "checking for $ac_word... " >&6; }
7892if ${ac_cv_path_HEAD+:} false; then :
7893  $as_echo_n "(cached) " >&6
7894else
7895  case $HEAD in
7896  [\\/]* | ?:[\\/]*)
7897  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7898  ;;
7899  *)
7900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7901for as_dir in $PATH
7902do
7903  IFS=$as_save_IFS
7904  test -z "$as_dir" && as_dir=.
7905    for ac_exec_ext in '' $ac_executable_extensions; do
7906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7907    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7909    break 2
7910  fi
7911done
7912  done
7913IFS=$as_save_IFS
7914
7915  ;;
7916esac
7917fi
7918HEAD=$ac_cv_path_HEAD
7919if test -n "$HEAD"; then
7920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7921$as_echo "$HEAD" >&6; }
7922else
7923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924$as_echo "no" >&6; }
7925fi
7926
7927
7928          if test "x$HEAD" = x; then
7929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7930          fi
7931        else
7932          # Otherwise we believe it is a complete path. Use it as it is.
7933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7934$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7936$as_echo_n "checking for HEAD... " >&6; }
7937          if test ! -x "$tool_specified"; then
7938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7939$as_echo "not found" >&6; }
7940            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7941          fi
7942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7943$as_echo "$tool_specified" >&6; }
7944        fi
7945      fi
7946    fi
7947
7948  fi
7949
7950
7951
7952  if test "x$HEAD" = x; then
7953    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7954  fi
7955
7956
7957
7958
7959
7960  # Publish this variable in the help.
7961
7962
7963  if [ -z "${LN+x}" ]; then
7964    # The variable is not set by user, try to locate tool using the code snippet
7965    for ac_prog in ln
7966do
7967  # Extract the first word of "$ac_prog", so it can be a program name with args.
7968set dummy $ac_prog; ac_word=$2
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7970$as_echo_n "checking for $ac_word... " >&6; }
7971if ${ac_cv_path_LN+:} false; then :
7972  $as_echo_n "(cached) " >&6
7973else
7974  case $LN in
7975  [\\/]* | ?:[\\/]*)
7976  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7977  ;;
7978  *)
7979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7980for as_dir in $PATH
7981do
7982  IFS=$as_save_IFS
7983  test -z "$as_dir" && as_dir=.
7984    for ac_exec_ext in '' $ac_executable_extensions; do
7985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7986    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7988    break 2
7989  fi
7990done
7991  done
7992IFS=$as_save_IFS
7993
7994  ;;
7995esac
7996fi
7997LN=$ac_cv_path_LN
7998if test -n "$LN"; then
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8000$as_echo "$LN" >&6; }
8001else
8002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
8004fi
8005
8006
8007  test -n "$LN" && break
8008done
8009
8010  else
8011    # The variable is set, but is it from the command line or the environment?
8012
8013    # Try to remove the string !LN! from our list.
8014    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8015    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8016      # If it failed, the variable was not from the command line. Ignore it,
8017      # but warn the user (except for BASH, which is always set by the calling BASH).
8018      if test "xLN" != xBASH; then
8019        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8020$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8021      fi
8022      # Try to locate tool using the code snippet
8023      for ac_prog in ln
8024do
8025  # Extract the first word of "$ac_prog", so it can be a program name with args.
8026set dummy $ac_prog; ac_word=$2
8027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8028$as_echo_n "checking for $ac_word... " >&6; }
8029if ${ac_cv_path_LN+:} false; then :
8030  $as_echo_n "(cached) " >&6
8031else
8032  case $LN in
8033  [\\/]* | ?:[\\/]*)
8034  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8035  ;;
8036  *)
8037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8038for as_dir in $PATH
8039do
8040  IFS=$as_save_IFS
8041  test -z "$as_dir" && as_dir=.
8042    for ac_exec_ext in '' $ac_executable_extensions; do
8043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8044    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8046    break 2
8047  fi
8048done
8049  done
8050IFS=$as_save_IFS
8051
8052  ;;
8053esac
8054fi
8055LN=$ac_cv_path_LN
8056if test -n "$LN"; then
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8058$as_echo "$LN" >&6; }
8059else
8060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8061$as_echo "no" >&6; }
8062fi
8063
8064
8065  test -n "$LN" && break
8066done
8067
8068    else
8069      # If it succeeded, then it was overridden by the user. We will use it
8070      # for the tool.
8071
8072      # First remove it from the list of overridden variables, so we can test
8073      # for unknown variables in the end.
8074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8075
8076      # Check if we try to supply an empty value
8077      if test "x$LN" = x; then
8078        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8079$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8080        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8081$as_echo_n "checking for LN... " >&6; }
8082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8083$as_echo "disabled" >&6; }
8084      else
8085        # Check if the provided tool contains a complete path.
8086        tool_specified="$LN"
8087        tool_basename="${tool_specified##*/}"
8088        if test "x$tool_basename" = "x$tool_specified"; then
8089          # A command without a complete path is provided, search $PATH.
8090          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8091$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8092          # Extract the first word of "$tool_basename", so it can be a program name with args.
8093set dummy $tool_basename; ac_word=$2
8094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8095$as_echo_n "checking for $ac_word... " >&6; }
8096if ${ac_cv_path_LN+:} false; then :
8097  $as_echo_n "(cached) " >&6
8098else
8099  case $LN in
8100  [\\/]* | ?:[\\/]*)
8101  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8102  ;;
8103  *)
8104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8105for as_dir in $PATH
8106do
8107  IFS=$as_save_IFS
8108  test -z "$as_dir" && as_dir=.
8109    for ac_exec_ext in '' $ac_executable_extensions; do
8110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8111    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8113    break 2
8114  fi
8115done
8116  done
8117IFS=$as_save_IFS
8118
8119  ;;
8120esac
8121fi
8122LN=$ac_cv_path_LN
8123if test -n "$LN"; then
8124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8125$as_echo "$LN" >&6; }
8126else
8127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8128$as_echo "no" >&6; }
8129fi
8130
8131
8132          if test "x$LN" = x; then
8133            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8134          fi
8135        else
8136          # Otherwise we believe it is a complete path. Use it as it is.
8137          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8138$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8139          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8140$as_echo_n "checking for LN... " >&6; }
8141          if test ! -x "$tool_specified"; then
8142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8143$as_echo "not found" >&6; }
8144            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8145          fi
8146          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8147$as_echo "$tool_specified" >&6; }
8148        fi
8149      fi
8150    fi
8151
8152  fi
8153
8154
8155
8156  if test "x$LN" = x; then
8157    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8158  fi
8159
8160
8161
8162
8163
8164  # Publish this variable in the help.
8165
8166
8167  if [ -z "${LS+x}" ]; then
8168    # The variable is not set by user, try to locate tool using the code snippet
8169    for ac_prog in ls
8170do
8171  # Extract the first word of "$ac_prog", so it can be a program name with args.
8172set dummy $ac_prog; ac_word=$2
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8174$as_echo_n "checking for $ac_word... " >&6; }
8175if ${ac_cv_path_LS+:} false; then :
8176  $as_echo_n "(cached) " >&6
8177else
8178  case $LS in
8179  [\\/]* | ?:[\\/]*)
8180  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8181  ;;
8182  *)
8183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184for as_dir in $PATH
8185do
8186  IFS=$as_save_IFS
8187  test -z "$as_dir" && as_dir=.
8188    for ac_exec_ext in '' $ac_executable_extensions; do
8189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8190    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8192    break 2
8193  fi
8194done
8195  done
8196IFS=$as_save_IFS
8197
8198  ;;
8199esac
8200fi
8201LS=$ac_cv_path_LS
8202if test -n "$LS"; then
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8204$as_echo "$LS" >&6; }
8205else
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207$as_echo "no" >&6; }
8208fi
8209
8210
8211  test -n "$LS" && break
8212done
8213
8214  else
8215    # The variable is set, but is it from the command line or the environment?
8216
8217    # Try to remove the string !LS! from our list.
8218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8220      # If it failed, the variable was not from the command line. Ignore it,
8221      # but warn the user (except for BASH, which is always set by the calling BASH).
8222      if test "xLS" != xBASH; then
8223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8224$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8225      fi
8226      # Try to locate tool using the code snippet
8227      for ac_prog in ls
8228do
8229  # Extract the first word of "$ac_prog", so it can be a program name with args.
8230set dummy $ac_prog; ac_word=$2
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8232$as_echo_n "checking for $ac_word... " >&6; }
8233if ${ac_cv_path_LS+:} false; then :
8234  $as_echo_n "(cached) " >&6
8235else
8236  case $LS in
8237  [\\/]* | ?:[\\/]*)
8238  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8239  ;;
8240  *)
8241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8242for as_dir in $PATH
8243do
8244  IFS=$as_save_IFS
8245  test -z "$as_dir" && as_dir=.
8246    for ac_exec_ext in '' $ac_executable_extensions; do
8247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8248    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8250    break 2
8251  fi
8252done
8253  done
8254IFS=$as_save_IFS
8255
8256  ;;
8257esac
8258fi
8259LS=$ac_cv_path_LS
8260if test -n "$LS"; then
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8262$as_echo "$LS" >&6; }
8263else
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265$as_echo "no" >&6; }
8266fi
8267
8268
8269  test -n "$LS" && break
8270done
8271
8272    else
8273      # If it succeeded, then it was overridden by the user. We will use it
8274      # for the tool.
8275
8276      # First remove it from the list of overridden variables, so we can test
8277      # for unknown variables in the end.
8278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8279
8280      # Check if we try to supply an empty value
8281      if test "x$LS" = x; then
8282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8283$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8285$as_echo_n "checking for LS... " >&6; }
8286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8287$as_echo "disabled" >&6; }
8288      else
8289        # Check if the provided tool contains a complete path.
8290        tool_specified="$LS"
8291        tool_basename="${tool_specified##*/}"
8292        if test "x$tool_basename" = "x$tool_specified"; then
8293          # A command without a complete path is provided, search $PATH.
8294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8295$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8296          # Extract the first word of "$tool_basename", so it can be a program name with args.
8297set dummy $tool_basename; ac_word=$2
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8299$as_echo_n "checking for $ac_word... " >&6; }
8300if ${ac_cv_path_LS+:} false; then :
8301  $as_echo_n "(cached) " >&6
8302else
8303  case $LS in
8304  [\\/]* | ?:[\\/]*)
8305  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8306  ;;
8307  *)
8308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8309for as_dir in $PATH
8310do
8311  IFS=$as_save_IFS
8312  test -z "$as_dir" && as_dir=.
8313    for ac_exec_ext in '' $ac_executable_extensions; do
8314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8315    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8317    break 2
8318  fi
8319done
8320  done
8321IFS=$as_save_IFS
8322
8323  ;;
8324esac
8325fi
8326LS=$ac_cv_path_LS
8327if test -n "$LS"; then
8328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8329$as_echo "$LS" >&6; }
8330else
8331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8332$as_echo "no" >&6; }
8333fi
8334
8335
8336          if test "x$LS" = x; then
8337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8338          fi
8339        else
8340          # Otherwise we believe it is a complete path. Use it as it is.
8341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8342$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8344$as_echo_n "checking for LS... " >&6; }
8345          if test ! -x "$tool_specified"; then
8346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8347$as_echo "not found" >&6; }
8348            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8349          fi
8350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8351$as_echo "$tool_specified" >&6; }
8352        fi
8353      fi
8354    fi
8355
8356  fi
8357
8358
8359
8360  if test "x$LS" = x; then
8361    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8362  fi
8363
8364
8365
8366
8367
8368  # Publish this variable in the help.
8369
8370
8371  if [ -z "${MKDIR+x}" ]; then
8372    # The variable is not set by user, try to locate tool using the code snippet
8373    for ac_prog in mkdir
8374do
8375  # Extract the first word of "$ac_prog", so it can be a program name with args.
8376set dummy $ac_prog; ac_word=$2
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378$as_echo_n "checking for $ac_word... " >&6; }
8379if ${ac_cv_path_MKDIR+:} false; then :
8380  $as_echo_n "(cached) " >&6
8381else
8382  case $MKDIR in
8383  [\\/]* | ?:[\\/]*)
8384  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8385  ;;
8386  *)
8387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388for as_dir in $PATH
8389do
8390  IFS=$as_save_IFS
8391  test -z "$as_dir" && as_dir=.
8392    for ac_exec_ext in '' $ac_executable_extensions; do
8393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396    break 2
8397  fi
8398done
8399  done
8400IFS=$as_save_IFS
8401
8402  ;;
8403esac
8404fi
8405MKDIR=$ac_cv_path_MKDIR
8406if test -n "$MKDIR"; then
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8408$as_echo "$MKDIR" >&6; }
8409else
8410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411$as_echo "no" >&6; }
8412fi
8413
8414
8415  test -n "$MKDIR" && break
8416done
8417
8418  else
8419    # The variable is set, but is it from the command line or the environment?
8420
8421    # Try to remove the string !MKDIR! from our list.
8422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8424      # If it failed, the variable was not from the command line. Ignore it,
8425      # but warn the user (except for BASH, which is always set by the calling BASH).
8426      if test "xMKDIR" != xBASH; then
8427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8428$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8429      fi
8430      # Try to locate tool using the code snippet
8431      for ac_prog in mkdir
8432do
8433  # Extract the first word of "$ac_prog", so it can be a program name with args.
8434set dummy $ac_prog; ac_word=$2
8435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8436$as_echo_n "checking for $ac_word... " >&6; }
8437if ${ac_cv_path_MKDIR+:} false; then :
8438  $as_echo_n "(cached) " >&6
8439else
8440  case $MKDIR in
8441  [\\/]* | ?:[\\/]*)
8442  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8443  ;;
8444  *)
8445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8446for as_dir in $PATH
8447do
8448  IFS=$as_save_IFS
8449  test -z "$as_dir" && as_dir=.
8450    for ac_exec_ext in '' $ac_executable_extensions; do
8451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8452    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8454    break 2
8455  fi
8456done
8457  done
8458IFS=$as_save_IFS
8459
8460  ;;
8461esac
8462fi
8463MKDIR=$ac_cv_path_MKDIR
8464if test -n "$MKDIR"; then
8465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8466$as_echo "$MKDIR" >&6; }
8467else
8468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469$as_echo "no" >&6; }
8470fi
8471
8472
8473  test -n "$MKDIR" && break
8474done
8475
8476    else
8477      # If it succeeded, then it was overridden by the user. We will use it
8478      # for the tool.
8479
8480      # First remove it from the list of overridden variables, so we can test
8481      # for unknown variables in the end.
8482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8483
8484      # Check if we try to supply an empty value
8485      if test "x$MKDIR" = x; then
8486        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8487$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8489$as_echo_n "checking for MKDIR... " >&6; }
8490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8491$as_echo "disabled" >&6; }
8492      else
8493        # Check if the provided tool contains a complete path.
8494        tool_specified="$MKDIR"
8495        tool_basename="${tool_specified##*/}"
8496        if test "x$tool_basename" = "x$tool_specified"; then
8497          # A command without a complete path is provided, search $PATH.
8498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8499$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8500          # Extract the first word of "$tool_basename", so it can be a program name with args.
8501set dummy $tool_basename; ac_word=$2
8502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8503$as_echo_n "checking for $ac_word... " >&6; }
8504if ${ac_cv_path_MKDIR+:} false; then :
8505  $as_echo_n "(cached) " >&6
8506else
8507  case $MKDIR in
8508  [\\/]* | ?:[\\/]*)
8509  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8510  ;;
8511  *)
8512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8513for as_dir in $PATH
8514do
8515  IFS=$as_save_IFS
8516  test -z "$as_dir" && as_dir=.
8517    for ac_exec_ext in '' $ac_executable_extensions; do
8518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8519    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8521    break 2
8522  fi
8523done
8524  done
8525IFS=$as_save_IFS
8526
8527  ;;
8528esac
8529fi
8530MKDIR=$ac_cv_path_MKDIR
8531if test -n "$MKDIR"; then
8532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8533$as_echo "$MKDIR" >&6; }
8534else
8535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8536$as_echo "no" >&6; }
8537fi
8538
8539
8540          if test "x$MKDIR" = x; then
8541            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8542          fi
8543        else
8544          # Otherwise we believe it is a complete path. Use it as it is.
8545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8546$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8547          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8548$as_echo_n "checking for MKDIR... " >&6; }
8549          if test ! -x "$tool_specified"; then
8550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8551$as_echo "not found" >&6; }
8552            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8553          fi
8554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8555$as_echo "$tool_specified" >&6; }
8556        fi
8557      fi
8558    fi
8559
8560  fi
8561
8562
8563
8564  if test "x$MKDIR" = x; then
8565    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8566  fi
8567
8568
8569
8570
8571
8572  # Publish this variable in the help.
8573
8574
8575  if [ -z "${MKTEMP+x}" ]; then
8576    # The variable is not set by user, try to locate tool using the code snippet
8577    for ac_prog in mktemp
8578do
8579  # Extract the first word of "$ac_prog", so it can be a program name with args.
8580set dummy $ac_prog; ac_word=$2
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8582$as_echo_n "checking for $ac_word... " >&6; }
8583if ${ac_cv_path_MKTEMP+:} false; then :
8584  $as_echo_n "(cached) " >&6
8585else
8586  case $MKTEMP in
8587  [\\/]* | ?:[\\/]*)
8588  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8589  ;;
8590  *)
8591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8592for as_dir in $PATH
8593do
8594  IFS=$as_save_IFS
8595  test -z "$as_dir" && as_dir=.
8596    for ac_exec_ext in '' $ac_executable_extensions; do
8597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8598    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8600    break 2
8601  fi
8602done
8603  done
8604IFS=$as_save_IFS
8605
8606  ;;
8607esac
8608fi
8609MKTEMP=$ac_cv_path_MKTEMP
8610if test -n "$MKTEMP"; then
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8612$as_echo "$MKTEMP" >&6; }
8613else
8614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
8616fi
8617
8618
8619  test -n "$MKTEMP" && break
8620done
8621
8622  else
8623    # The variable is set, but is it from the command line or the environment?
8624
8625    # Try to remove the string !MKTEMP! from our list.
8626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8628      # If it failed, the variable was not from the command line. Ignore it,
8629      # but warn the user (except for BASH, which is always set by the calling BASH).
8630      if test "xMKTEMP" != xBASH; then
8631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8632$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8633      fi
8634      # Try to locate tool using the code snippet
8635      for ac_prog in mktemp
8636do
8637  # Extract the first word of "$ac_prog", so it can be a program name with args.
8638set dummy $ac_prog; ac_word=$2
8639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8640$as_echo_n "checking for $ac_word... " >&6; }
8641if ${ac_cv_path_MKTEMP+:} false; then :
8642  $as_echo_n "(cached) " >&6
8643else
8644  case $MKTEMP in
8645  [\\/]* | ?:[\\/]*)
8646  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8647  ;;
8648  *)
8649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8650for as_dir in $PATH
8651do
8652  IFS=$as_save_IFS
8653  test -z "$as_dir" && as_dir=.
8654    for ac_exec_ext in '' $ac_executable_extensions; do
8655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8656    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8658    break 2
8659  fi
8660done
8661  done
8662IFS=$as_save_IFS
8663
8664  ;;
8665esac
8666fi
8667MKTEMP=$ac_cv_path_MKTEMP
8668if test -n "$MKTEMP"; then
8669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8670$as_echo "$MKTEMP" >&6; }
8671else
8672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8673$as_echo "no" >&6; }
8674fi
8675
8676
8677  test -n "$MKTEMP" && break
8678done
8679
8680    else
8681      # If it succeeded, then it was overridden by the user. We will use it
8682      # for the tool.
8683
8684      # First remove it from the list of overridden variables, so we can test
8685      # for unknown variables in the end.
8686      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8687
8688      # Check if we try to supply an empty value
8689      if test "x$MKTEMP" = x; then
8690        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8691$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8693$as_echo_n "checking for MKTEMP... " >&6; }
8694        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8695$as_echo "disabled" >&6; }
8696      else
8697        # Check if the provided tool contains a complete path.
8698        tool_specified="$MKTEMP"
8699        tool_basename="${tool_specified##*/}"
8700        if test "x$tool_basename" = "x$tool_specified"; then
8701          # A command without a complete path is provided, search $PATH.
8702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8703$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8704          # Extract the first word of "$tool_basename", so it can be a program name with args.
8705set dummy $tool_basename; ac_word=$2
8706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8707$as_echo_n "checking for $ac_word... " >&6; }
8708if ${ac_cv_path_MKTEMP+:} false; then :
8709  $as_echo_n "(cached) " >&6
8710else
8711  case $MKTEMP in
8712  [\\/]* | ?:[\\/]*)
8713  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8714  ;;
8715  *)
8716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8717for as_dir in $PATH
8718do
8719  IFS=$as_save_IFS
8720  test -z "$as_dir" && as_dir=.
8721    for ac_exec_ext in '' $ac_executable_extensions; do
8722  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8723    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8724    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8725    break 2
8726  fi
8727done
8728  done
8729IFS=$as_save_IFS
8730
8731  ;;
8732esac
8733fi
8734MKTEMP=$ac_cv_path_MKTEMP
8735if test -n "$MKTEMP"; then
8736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8737$as_echo "$MKTEMP" >&6; }
8738else
8739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8740$as_echo "no" >&6; }
8741fi
8742
8743
8744          if test "x$MKTEMP" = x; then
8745            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8746          fi
8747        else
8748          # Otherwise we believe it is a complete path. Use it as it is.
8749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8750$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8751          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8752$as_echo_n "checking for MKTEMP... " >&6; }
8753          if test ! -x "$tool_specified"; then
8754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8755$as_echo "not found" >&6; }
8756            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8757          fi
8758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8759$as_echo "$tool_specified" >&6; }
8760        fi
8761      fi
8762    fi
8763
8764  fi
8765
8766
8767
8768  if test "x$MKTEMP" = x; then
8769    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8770  fi
8771
8772
8773
8774
8775
8776  # Publish this variable in the help.
8777
8778
8779  if [ -z "${MV+x}" ]; then
8780    # The variable is not set by user, try to locate tool using the code snippet
8781    for ac_prog in mv
8782do
8783  # Extract the first word of "$ac_prog", so it can be a program name with args.
8784set dummy $ac_prog; ac_word=$2
8785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786$as_echo_n "checking for $ac_word... " >&6; }
8787if ${ac_cv_path_MV+:} false; then :
8788  $as_echo_n "(cached) " >&6
8789else
8790  case $MV in
8791  [\\/]* | ?:[\\/]*)
8792  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8793  ;;
8794  *)
8795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8796for as_dir in $PATH
8797do
8798  IFS=$as_save_IFS
8799  test -z "$as_dir" && as_dir=.
8800    for ac_exec_ext in '' $ac_executable_extensions; do
8801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8802    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8804    break 2
8805  fi
8806done
8807  done
8808IFS=$as_save_IFS
8809
8810  ;;
8811esac
8812fi
8813MV=$ac_cv_path_MV
8814if test -n "$MV"; then
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8816$as_echo "$MV" >&6; }
8817else
8818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
8820fi
8821
8822
8823  test -n "$MV" && break
8824done
8825
8826  else
8827    # The variable is set, but is it from the command line or the environment?
8828
8829    # Try to remove the string !MV! from our list.
8830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8832      # If it failed, the variable was not from the command line. Ignore it,
8833      # but warn the user (except for BASH, which is always set by the calling BASH).
8834      if test "xMV" != xBASH; then
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8836$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8837      fi
8838      # Try to locate tool using the code snippet
8839      for ac_prog in mv
8840do
8841  # Extract the first word of "$ac_prog", so it can be a program name with args.
8842set dummy $ac_prog; ac_word=$2
8843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8844$as_echo_n "checking for $ac_word... " >&6; }
8845if ${ac_cv_path_MV+:} false; then :
8846  $as_echo_n "(cached) " >&6
8847else
8848  case $MV in
8849  [\\/]* | ?:[\\/]*)
8850  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8851  ;;
8852  *)
8853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8854for as_dir in $PATH
8855do
8856  IFS=$as_save_IFS
8857  test -z "$as_dir" && as_dir=.
8858    for ac_exec_ext in '' $ac_executable_extensions; do
8859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8860    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8862    break 2
8863  fi
8864done
8865  done
8866IFS=$as_save_IFS
8867
8868  ;;
8869esac
8870fi
8871MV=$ac_cv_path_MV
8872if test -n "$MV"; then
8873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8874$as_echo "$MV" >&6; }
8875else
8876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8877$as_echo "no" >&6; }
8878fi
8879
8880
8881  test -n "$MV" && break
8882done
8883
8884    else
8885      # If it succeeded, then it was overridden by the user. We will use it
8886      # for the tool.
8887
8888      # First remove it from the list of overridden variables, so we can test
8889      # for unknown variables in the end.
8890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8891
8892      # Check if we try to supply an empty value
8893      if test "x$MV" = x; then
8894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8895$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8897$as_echo_n "checking for MV... " >&6; }
8898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8899$as_echo "disabled" >&6; }
8900      else
8901        # Check if the provided tool contains a complete path.
8902        tool_specified="$MV"
8903        tool_basename="${tool_specified##*/}"
8904        if test "x$tool_basename" = "x$tool_specified"; then
8905          # A command without a complete path is provided, search $PATH.
8906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8907$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8908          # Extract the first word of "$tool_basename", so it can be a program name with args.
8909set dummy $tool_basename; ac_word=$2
8910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8911$as_echo_n "checking for $ac_word... " >&6; }
8912if ${ac_cv_path_MV+:} false; then :
8913  $as_echo_n "(cached) " >&6
8914else
8915  case $MV in
8916  [\\/]* | ?:[\\/]*)
8917  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8918  ;;
8919  *)
8920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8921for as_dir in $PATH
8922do
8923  IFS=$as_save_IFS
8924  test -z "$as_dir" && as_dir=.
8925    for ac_exec_ext in '' $ac_executable_extensions; do
8926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8927    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8929    break 2
8930  fi
8931done
8932  done
8933IFS=$as_save_IFS
8934
8935  ;;
8936esac
8937fi
8938MV=$ac_cv_path_MV
8939if test -n "$MV"; then
8940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8941$as_echo "$MV" >&6; }
8942else
8943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8944$as_echo "no" >&6; }
8945fi
8946
8947
8948          if test "x$MV" = x; then
8949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8950          fi
8951        else
8952          # Otherwise we believe it is a complete path. Use it as it is.
8953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8954$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8956$as_echo_n "checking for MV... " >&6; }
8957          if test ! -x "$tool_specified"; then
8958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8959$as_echo "not found" >&6; }
8960            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8961          fi
8962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8963$as_echo "$tool_specified" >&6; }
8964        fi
8965      fi
8966    fi
8967
8968  fi
8969
8970
8971
8972  if test "x$MV" = x; then
8973    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8974  fi
8975
8976
8977
8978
8979
8980  # Publish this variable in the help.
8981
8982
8983  if [ -z "${NAWK+x}" ]; then
8984    # The variable is not set by user, try to locate tool using the code snippet
8985    for ac_prog in nawk gawk awk
8986do
8987  # Extract the first word of "$ac_prog", so it can be a program name with args.
8988set dummy $ac_prog; ac_word=$2
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8990$as_echo_n "checking for $ac_word... " >&6; }
8991if ${ac_cv_path_NAWK+:} false; then :
8992  $as_echo_n "(cached) " >&6
8993else
8994  case $NAWK in
8995  [\\/]* | ?:[\\/]*)
8996  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8997  ;;
8998  *)
8999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9000for as_dir in $PATH
9001do
9002  IFS=$as_save_IFS
9003  test -z "$as_dir" && as_dir=.
9004    for ac_exec_ext in '' $ac_executable_extensions; do
9005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9006    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9008    break 2
9009  fi
9010done
9011  done
9012IFS=$as_save_IFS
9013
9014  ;;
9015esac
9016fi
9017NAWK=$ac_cv_path_NAWK
9018if test -n "$NAWK"; then
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9020$as_echo "$NAWK" >&6; }
9021else
9022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
9024fi
9025
9026
9027  test -n "$NAWK" && break
9028done
9029
9030  else
9031    # The variable is set, but is it from the command line or the environment?
9032
9033    # Try to remove the string !NAWK! from our list.
9034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9036      # If it failed, the variable was not from the command line. Ignore it,
9037      # but warn the user (except for BASH, which is always set by the calling BASH).
9038      if test "xNAWK" != xBASH; then
9039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9040$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9041      fi
9042      # Try to locate tool using the code snippet
9043      for ac_prog in nawk gawk awk
9044do
9045  # Extract the first word of "$ac_prog", so it can be a program name with args.
9046set dummy $ac_prog; ac_word=$2
9047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9048$as_echo_n "checking for $ac_word... " >&6; }
9049if ${ac_cv_path_NAWK+:} false; then :
9050  $as_echo_n "(cached) " >&6
9051else
9052  case $NAWK in
9053  [\\/]* | ?:[\\/]*)
9054  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9055  ;;
9056  *)
9057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9058for as_dir in $PATH
9059do
9060  IFS=$as_save_IFS
9061  test -z "$as_dir" && as_dir=.
9062    for ac_exec_ext in '' $ac_executable_extensions; do
9063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9064    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9066    break 2
9067  fi
9068done
9069  done
9070IFS=$as_save_IFS
9071
9072  ;;
9073esac
9074fi
9075NAWK=$ac_cv_path_NAWK
9076if test -n "$NAWK"; then
9077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9078$as_echo "$NAWK" >&6; }
9079else
9080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
9082fi
9083
9084
9085  test -n "$NAWK" && break
9086done
9087
9088    else
9089      # If it succeeded, then it was overridden by the user. We will use it
9090      # for the tool.
9091
9092      # First remove it from the list of overridden variables, so we can test
9093      # for unknown variables in the end.
9094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9095
9096      # Check if we try to supply an empty value
9097      if test "x$NAWK" = x; then
9098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9099$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9101$as_echo_n "checking for NAWK... " >&6; }
9102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9103$as_echo "disabled" >&6; }
9104      else
9105        # Check if the provided tool contains a complete path.
9106        tool_specified="$NAWK"
9107        tool_basename="${tool_specified##*/}"
9108        if test "x$tool_basename" = "x$tool_specified"; then
9109          # A command without a complete path is provided, search $PATH.
9110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9111$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9112          # Extract the first word of "$tool_basename", so it can be a program name with args.
9113set dummy $tool_basename; ac_word=$2
9114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9115$as_echo_n "checking for $ac_word... " >&6; }
9116if ${ac_cv_path_NAWK+:} false; then :
9117  $as_echo_n "(cached) " >&6
9118else
9119  case $NAWK in
9120  [\\/]* | ?:[\\/]*)
9121  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9122  ;;
9123  *)
9124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9125for as_dir in $PATH
9126do
9127  IFS=$as_save_IFS
9128  test -z "$as_dir" && as_dir=.
9129    for ac_exec_ext in '' $ac_executable_extensions; do
9130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9131    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9133    break 2
9134  fi
9135done
9136  done
9137IFS=$as_save_IFS
9138
9139  ;;
9140esac
9141fi
9142NAWK=$ac_cv_path_NAWK
9143if test -n "$NAWK"; then
9144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9145$as_echo "$NAWK" >&6; }
9146else
9147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
9149fi
9150
9151
9152          if test "x$NAWK" = x; then
9153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9154          fi
9155        else
9156          # Otherwise we believe it is a complete path. Use it as it is.
9157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9158$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9160$as_echo_n "checking for NAWK... " >&6; }
9161          if test ! -x "$tool_specified"; then
9162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9163$as_echo "not found" >&6; }
9164            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9165          fi
9166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9167$as_echo "$tool_specified" >&6; }
9168        fi
9169      fi
9170    fi
9171
9172  fi
9173
9174
9175
9176  if test "x$NAWK" = x; then
9177    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9178  fi
9179
9180
9181
9182
9183
9184  # Publish this variable in the help.
9185
9186
9187  if [ -z "${PRINTF+x}" ]; then
9188    # The variable is not set by user, try to locate tool using the code snippet
9189    for ac_prog in printf
9190do
9191  # Extract the first word of "$ac_prog", so it can be a program name with args.
9192set dummy $ac_prog; ac_word=$2
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194$as_echo_n "checking for $ac_word... " >&6; }
9195if ${ac_cv_path_PRINTF+:} false; then :
9196  $as_echo_n "(cached) " >&6
9197else
9198  case $PRINTF in
9199  [\\/]* | ?:[\\/]*)
9200  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9201  ;;
9202  *)
9203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204for as_dir in $PATH
9205do
9206  IFS=$as_save_IFS
9207  test -z "$as_dir" && as_dir=.
9208    for ac_exec_ext in '' $ac_executable_extensions; do
9209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212    break 2
9213  fi
9214done
9215  done
9216IFS=$as_save_IFS
9217
9218  ;;
9219esac
9220fi
9221PRINTF=$ac_cv_path_PRINTF
9222if test -n "$PRINTF"; then
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9224$as_echo "$PRINTF" >&6; }
9225else
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
9229
9230
9231  test -n "$PRINTF" && break
9232done
9233
9234  else
9235    # The variable is set, but is it from the command line or the environment?
9236
9237    # Try to remove the string !PRINTF! from our list.
9238    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9239    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9240      # If it failed, the variable was not from the command line. Ignore it,
9241      # but warn the user (except for BASH, which is always set by the calling BASH).
9242      if test "xPRINTF" != xBASH; then
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9244$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9245      fi
9246      # Try to locate tool using the code snippet
9247      for ac_prog in printf
9248do
9249  # Extract the first word of "$ac_prog", so it can be a program name with args.
9250set dummy $ac_prog; ac_word=$2
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9252$as_echo_n "checking for $ac_word... " >&6; }
9253if ${ac_cv_path_PRINTF+:} false; then :
9254  $as_echo_n "(cached) " >&6
9255else
9256  case $PRINTF in
9257  [\\/]* | ?:[\\/]*)
9258  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9259  ;;
9260  *)
9261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9262for as_dir in $PATH
9263do
9264  IFS=$as_save_IFS
9265  test -z "$as_dir" && as_dir=.
9266    for ac_exec_ext in '' $ac_executable_extensions; do
9267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9268    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9270    break 2
9271  fi
9272done
9273  done
9274IFS=$as_save_IFS
9275
9276  ;;
9277esac
9278fi
9279PRINTF=$ac_cv_path_PRINTF
9280if test -n "$PRINTF"; then
9281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9282$as_echo "$PRINTF" >&6; }
9283else
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285$as_echo "no" >&6; }
9286fi
9287
9288
9289  test -n "$PRINTF" && break
9290done
9291
9292    else
9293      # If it succeeded, then it was overridden by the user. We will use it
9294      # for the tool.
9295
9296      # First remove it from the list of overridden variables, so we can test
9297      # for unknown variables in the end.
9298      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9299
9300      # Check if we try to supply an empty value
9301      if test "x$PRINTF" = x; then
9302        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9303$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9305$as_echo_n "checking for PRINTF... " >&6; }
9306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9307$as_echo "disabled" >&6; }
9308      else
9309        # Check if the provided tool contains a complete path.
9310        tool_specified="$PRINTF"
9311        tool_basename="${tool_specified##*/}"
9312        if test "x$tool_basename" = "x$tool_specified"; then
9313          # A command without a complete path is provided, search $PATH.
9314          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9315$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9316          # Extract the first word of "$tool_basename", so it can be a program name with args.
9317set dummy $tool_basename; ac_word=$2
9318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9319$as_echo_n "checking for $ac_word... " >&6; }
9320if ${ac_cv_path_PRINTF+:} false; then :
9321  $as_echo_n "(cached) " >&6
9322else
9323  case $PRINTF in
9324  [\\/]* | ?:[\\/]*)
9325  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9326  ;;
9327  *)
9328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9329for as_dir in $PATH
9330do
9331  IFS=$as_save_IFS
9332  test -z "$as_dir" && as_dir=.
9333    for ac_exec_ext in '' $ac_executable_extensions; do
9334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9335    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9337    break 2
9338  fi
9339done
9340  done
9341IFS=$as_save_IFS
9342
9343  ;;
9344esac
9345fi
9346PRINTF=$ac_cv_path_PRINTF
9347if test -n "$PRINTF"; then
9348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9349$as_echo "$PRINTF" >&6; }
9350else
9351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
9353fi
9354
9355
9356          if test "x$PRINTF" = x; then
9357            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9358          fi
9359        else
9360          # Otherwise we believe it is a complete path. Use it as it is.
9361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9362$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9363          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9364$as_echo_n "checking for PRINTF... " >&6; }
9365          if test ! -x "$tool_specified"; then
9366            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9367$as_echo "not found" >&6; }
9368            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9369          fi
9370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9371$as_echo "$tool_specified" >&6; }
9372        fi
9373      fi
9374    fi
9375
9376  fi
9377
9378
9379
9380  if test "x$PRINTF" = x; then
9381    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9382  fi
9383
9384
9385
9386
9387
9388  # Publish this variable in the help.
9389
9390
9391  if [ -z "${RM+x}" ]; then
9392    # The variable is not set by user, try to locate tool using the code snippet
9393    for ac_prog in rm
9394do
9395  # Extract the first word of "$ac_prog", so it can be a program name with args.
9396set dummy $ac_prog; ac_word=$2
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398$as_echo_n "checking for $ac_word... " >&6; }
9399if ${ac_cv_path_RM+:} false; then :
9400  $as_echo_n "(cached) " >&6
9401else
9402  case $RM in
9403  [\\/]* | ?:[\\/]*)
9404  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9405  ;;
9406  *)
9407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408for as_dir in $PATH
9409do
9410  IFS=$as_save_IFS
9411  test -z "$as_dir" && as_dir=.
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422  ;;
9423esac
9424fi
9425RM=$ac_cv_path_RM
9426if test -n "$RM"; then
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9428$as_echo "$RM" >&6; }
9429else
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
9432fi
9433
9434
9435  test -n "$RM" && break
9436done
9437
9438  else
9439    # The variable is set, but is it from the command line or the environment?
9440
9441    # Try to remove the string !RM! from our list.
9442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9444      # If it failed, the variable was not from the command line. Ignore it,
9445      # but warn the user (except for BASH, which is always set by the calling BASH).
9446      if test "xRM" != xBASH; then
9447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9448$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9449      fi
9450      # Try to locate tool using the code snippet
9451      for ac_prog in rm
9452do
9453  # Extract the first word of "$ac_prog", so it can be a program name with args.
9454set dummy $ac_prog; ac_word=$2
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9456$as_echo_n "checking for $ac_word... " >&6; }
9457if ${ac_cv_path_RM+:} false; then :
9458  $as_echo_n "(cached) " >&6
9459else
9460  case $RM in
9461  [\\/]* | ?:[\\/]*)
9462  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9463  ;;
9464  *)
9465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9466for as_dir in $PATH
9467do
9468  IFS=$as_save_IFS
9469  test -z "$as_dir" && as_dir=.
9470    for ac_exec_ext in '' $ac_executable_extensions; do
9471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9472    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9474    break 2
9475  fi
9476done
9477  done
9478IFS=$as_save_IFS
9479
9480  ;;
9481esac
9482fi
9483RM=$ac_cv_path_RM
9484if test -n "$RM"; then
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9486$as_echo "$RM" >&6; }
9487else
9488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9489$as_echo "no" >&6; }
9490fi
9491
9492
9493  test -n "$RM" && break
9494done
9495
9496    else
9497      # If it succeeded, then it was overridden by the user. We will use it
9498      # for the tool.
9499
9500      # First remove it from the list of overridden variables, so we can test
9501      # for unknown variables in the end.
9502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9503
9504      # Check if we try to supply an empty value
9505      if test "x$RM" = x; then
9506        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9507$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9509$as_echo_n "checking for RM... " >&6; }
9510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9511$as_echo "disabled" >&6; }
9512      else
9513        # Check if the provided tool contains a complete path.
9514        tool_specified="$RM"
9515        tool_basename="${tool_specified##*/}"
9516        if test "x$tool_basename" = "x$tool_specified"; then
9517          # A command without a complete path is provided, search $PATH.
9518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9519$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9520          # Extract the first word of "$tool_basename", so it can be a program name with args.
9521set dummy $tool_basename; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if ${ac_cv_path_RM+:} false; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $RM in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9539    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550RM=$ac_cv_path_RM
9551if test -n "$RM"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9553$as_echo "$RM" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560          if test "x$RM" = x; then
9561            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9562          fi
9563        else
9564          # Otherwise we believe it is a complete path. Use it as it is.
9565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9566$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9567          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9568$as_echo_n "checking for RM... " >&6; }
9569          if test ! -x "$tool_specified"; then
9570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9571$as_echo "not found" >&6; }
9572            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9573          fi
9574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9575$as_echo "$tool_specified" >&6; }
9576        fi
9577      fi
9578    fi
9579
9580  fi
9581
9582
9583
9584  if test "x$RM" = x; then
9585    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9586  fi
9587
9588
9589
9590
9591
9592  # Publish this variable in the help.
9593
9594
9595  if [ -z "${RMDIR+x}" ]; then
9596    # The variable is not set by user, try to locate tool using the code snippet
9597    for ac_prog in rmdir
9598do
9599  # Extract the first word of "$ac_prog", so it can be a program name with args.
9600set dummy $ac_prog; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if ${ac_cv_path_RMDIR+:} false; then :
9604  $as_echo_n "(cached) " >&6
9605else
9606  case $RMDIR in
9607  [\\/]* | ?:[\\/]*)
9608  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9609  ;;
9610  *)
9611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614  IFS=$as_save_IFS
9615  test -z "$as_dir" && as_dir=.
9616    for ac_exec_ext in '' $ac_executable_extensions; do
9617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620    break 2
9621  fi
9622done
9623  done
9624IFS=$as_save_IFS
9625
9626  ;;
9627esac
9628fi
9629RMDIR=$ac_cv_path_RMDIR
9630if test -n "$RMDIR"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9632$as_echo "$RMDIR" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639  test -n "$RMDIR" && break
9640done
9641
9642  else
9643    # The variable is set, but is it from the command line or the environment?
9644
9645    # Try to remove the string !RMDIR! from our list.
9646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9648      # If it failed, the variable was not from the command line. Ignore it,
9649      # but warn the user (except for BASH, which is always set by the calling BASH).
9650      if test "xRMDIR" != xBASH; then
9651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9652$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9653      fi
9654      # Try to locate tool using the code snippet
9655      for ac_prog in rmdir
9656do
9657  # Extract the first word of "$ac_prog", so it can be a program name with args.
9658set dummy $ac_prog; ac_word=$2
9659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9660$as_echo_n "checking for $ac_word... " >&6; }
9661if ${ac_cv_path_RMDIR+:} false; then :
9662  $as_echo_n "(cached) " >&6
9663else
9664  case $RMDIR in
9665  [\\/]* | ?:[\\/]*)
9666  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9667  ;;
9668  *)
9669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9670for as_dir in $PATH
9671do
9672  IFS=$as_save_IFS
9673  test -z "$as_dir" && as_dir=.
9674    for ac_exec_ext in '' $ac_executable_extensions; do
9675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9676    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9678    break 2
9679  fi
9680done
9681  done
9682IFS=$as_save_IFS
9683
9684  ;;
9685esac
9686fi
9687RMDIR=$ac_cv_path_RMDIR
9688if test -n "$RMDIR"; then
9689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9690$as_echo "$RMDIR" >&6; }
9691else
9692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694fi
9695
9696
9697  test -n "$RMDIR" && break
9698done
9699
9700    else
9701      # If it succeeded, then it was overridden by the user. We will use it
9702      # for the tool.
9703
9704      # First remove it from the list of overridden variables, so we can test
9705      # for unknown variables in the end.
9706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9707
9708      # Check if we try to supply an empty value
9709      if test "x$RMDIR" = x; then
9710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9711$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9713$as_echo_n "checking for RMDIR... " >&6; }
9714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9715$as_echo "disabled" >&6; }
9716      else
9717        # Check if the provided tool contains a complete path.
9718        tool_specified="$RMDIR"
9719        tool_basename="${tool_specified##*/}"
9720        if test "x$tool_basename" = "x$tool_specified"; then
9721          # A command without a complete path is provided, search $PATH.
9722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9723$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9724          # Extract the first word of "$tool_basename", so it can be a program name with args.
9725set dummy $tool_basename; ac_word=$2
9726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9727$as_echo_n "checking for $ac_word... " >&6; }
9728if ${ac_cv_path_RMDIR+:} false; then :
9729  $as_echo_n "(cached) " >&6
9730else
9731  case $RMDIR in
9732  [\\/]* | ?:[\\/]*)
9733  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9734  ;;
9735  *)
9736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9737for as_dir in $PATH
9738do
9739  IFS=$as_save_IFS
9740  test -z "$as_dir" && as_dir=.
9741    for ac_exec_ext in '' $ac_executable_extensions; do
9742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9743    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9745    break 2
9746  fi
9747done
9748  done
9749IFS=$as_save_IFS
9750
9751  ;;
9752esac
9753fi
9754RMDIR=$ac_cv_path_RMDIR
9755if test -n "$RMDIR"; then
9756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9757$as_echo "$RMDIR" >&6; }
9758else
9759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9760$as_echo "no" >&6; }
9761fi
9762
9763
9764          if test "x$RMDIR" = x; then
9765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9766          fi
9767        else
9768          # Otherwise we believe it is a complete path. Use it as it is.
9769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9770$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9772$as_echo_n "checking for RMDIR... " >&6; }
9773          if test ! -x "$tool_specified"; then
9774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9775$as_echo "not found" >&6; }
9776            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9777          fi
9778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9779$as_echo "$tool_specified" >&6; }
9780        fi
9781      fi
9782    fi
9783
9784  fi
9785
9786
9787
9788  if test "x$RMDIR" = x; then
9789    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9790  fi
9791
9792
9793
9794
9795
9796  # Publish this variable in the help.
9797
9798
9799  if [ -z "${SH+x}" ]; then
9800    # The variable is not set by user, try to locate tool using the code snippet
9801    for ac_prog in sh
9802do
9803  # Extract the first word of "$ac_prog", so it can be a program name with args.
9804set dummy $ac_prog; ac_word=$2
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806$as_echo_n "checking for $ac_word... " >&6; }
9807if ${ac_cv_path_SH+:} false; then :
9808  $as_echo_n "(cached) " >&6
9809else
9810  case $SH in
9811  [\\/]* | ?:[\\/]*)
9812  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9813  ;;
9814  *)
9815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9816for as_dir in $PATH
9817do
9818  IFS=$as_save_IFS
9819  test -z "$as_dir" && as_dir=.
9820    for ac_exec_ext in '' $ac_executable_extensions; do
9821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9822    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9824    break 2
9825  fi
9826done
9827  done
9828IFS=$as_save_IFS
9829
9830  ;;
9831esac
9832fi
9833SH=$ac_cv_path_SH
9834if test -n "$SH"; then
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9836$as_echo "$SH" >&6; }
9837else
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842
9843  test -n "$SH" && break
9844done
9845
9846  else
9847    # The variable is set, but is it from the command line or the environment?
9848
9849    # Try to remove the string !SH! from our list.
9850    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9851    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9852      # If it failed, the variable was not from the command line. Ignore it,
9853      # but warn the user (except for BASH, which is always set by the calling BASH).
9854      if test "xSH" != xBASH; then
9855        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9856$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9857      fi
9858      # Try to locate tool using the code snippet
9859      for ac_prog in sh
9860do
9861  # Extract the first word of "$ac_prog", so it can be a program name with args.
9862set dummy $ac_prog; ac_word=$2
9863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9864$as_echo_n "checking for $ac_word... " >&6; }
9865if ${ac_cv_path_SH+:} false; then :
9866  $as_echo_n "(cached) " >&6
9867else
9868  case $SH in
9869  [\\/]* | ?:[\\/]*)
9870  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9871  ;;
9872  *)
9873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9874for as_dir in $PATH
9875do
9876  IFS=$as_save_IFS
9877  test -z "$as_dir" && as_dir=.
9878    for ac_exec_ext in '' $ac_executable_extensions; do
9879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9880    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9882    break 2
9883  fi
9884done
9885  done
9886IFS=$as_save_IFS
9887
9888  ;;
9889esac
9890fi
9891SH=$ac_cv_path_SH
9892if test -n "$SH"; then
9893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9894$as_echo "$SH" >&6; }
9895else
9896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9897$as_echo "no" >&6; }
9898fi
9899
9900
9901  test -n "$SH" && break
9902done
9903
9904    else
9905      # If it succeeded, then it was overridden by the user. We will use it
9906      # for the tool.
9907
9908      # First remove it from the list of overridden variables, so we can test
9909      # for unknown variables in the end.
9910      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9911
9912      # Check if we try to supply an empty value
9913      if test "x$SH" = x; then
9914        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9915$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9916        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9917$as_echo_n "checking for SH... " >&6; }
9918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9919$as_echo "disabled" >&6; }
9920      else
9921        # Check if the provided tool contains a complete path.
9922        tool_specified="$SH"
9923        tool_basename="${tool_specified##*/}"
9924        if test "x$tool_basename" = "x$tool_specified"; then
9925          # A command without a complete path is provided, search $PATH.
9926          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9927$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9928          # Extract the first word of "$tool_basename", so it can be a program name with args.
9929set dummy $tool_basename; ac_word=$2
9930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9931$as_echo_n "checking for $ac_word... " >&6; }
9932if ${ac_cv_path_SH+:} false; then :
9933  $as_echo_n "(cached) " >&6
9934else
9935  case $SH in
9936  [\\/]* | ?:[\\/]*)
9937  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9938  ;;
9939  *)
9940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9941for as_dir in $PATH
9942do
9943  IFS=$as_save_IFS
9944  test -z "$as_dir" && as_dir=.
9945    for ac_exec_ext in '' $ac_executable_extensions; do
9946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9947    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9949    break 2
9950  fi
9951done
9952  done
9953IFS=$as_save_IFS
9954
9955  ;;
9956esac
9957fi
9958SH=$ac_cv_path_SH
9959if test -n "$SH"; then
9960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9961$as_echo "$SH" >&6; }
9962else
9963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9964$as_echo "no" >&6; }
9965fi
9966
9967
9968          if test "x$SH" = x; then
9969            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9970          fi
9971        else
9972          # Otherwise we believe it is a complete path. Use it as it is.
9973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9974$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9975          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9976$as_echo_n "checking for SH... " >&6; }
9977          if test ! -x "$tool_specified"; then
9978            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9979$as_echo "not found" >&6; }
9980            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9981          fi
9982          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9983$as_echo "$tool_specified" >&6; }
9984        fi
9985      fi
9986    fi
9987
9988  fi
9989
9990
9991
9992  if test "x$SH" = x; then
9993    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9994  fi
9995
9996
9997
9998
9999
10000  # Publish this variable in the help.
10001
10002
10003  if [ -z "${SORT+x}" ]; then
10004    # The variable is not set by user, try to locate tool using the code snippet
10005    for ac_prog in sort
10006do
10007  # Extract the first word of "$ac_prog", so it can be a program name with args.
10008set dummy $ac_prog; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if ${ac_cv_path_SORT+:} false; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $SORT in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10026    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037SORT=$ac_cv_path_SORT
10038if test -n "$SORT"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10040$as_echo "$SORT" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047  test -n "$SORT" && break
10048done
10049
10050  else
10051    # The variable is set, but is it from the command line or the environment?
10052
10053    # Try to remove the string !SORT! from our list.
10054    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10055    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10056      # If it failed, the variable was not from the command line. Ignore it,
10057      # but warn the user (except for BASH, which is always set by the calling BASH).
10058      if test "xSORT" != xBASH; then
10059        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10060$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10061      fi
10062      # Try to locate tool using the code snippet
10063      for ac_prog in sort
10064do
10065  # Extract the first word of "$ac_prog", so it can be a program name with args.
10066set dummy $ac_prog; ac_word=$2
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10068$as_echo_n "checking for $ac_word... " >&6; }
10069if ${ac_cv_path_SORT+:} false; then :
10070  $as_echo_n "(cached) " >&6
10071else
10072  case $SORT in
10073  [\\/]* | ?:[\\/]*)
10074  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10075  ;;
10076  *)
10077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10078for as_dir in $PATH
10079do
10080  IFS=$as_save_IFS
10081  test -z "$as_dir" && as_dir=.
10082    for ac_exec_ext in '' $ac_executable_extensions; do
10083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10084    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10086    break 2
10087  fi
10088done
10089  done
10090IFS=$as_save_IFS
10091
10092  ;;
10093esac
10094fi
10095SORT=$ac_cv_path_SORT
10096if test -n "$SORT"; then
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10098$as_echo "$SORT" >&6; }
10099else
10100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
10102fi
10103
10104
10105  test -n "$SORT" && break
10106done
10107
10108    else
10109      # If it succeeded, then it was overridden by the user. We will use it
10110      # for the tool.
10111
10112      # First remove it from the list of overridden variables, so we can test
10113      # for unknown variables in the end.
10114      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10115
10116      # Check if we try to supply an empty value
10117      if test "x$SORT" = x; then
10118        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10119$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10121$as_echo_n "checking for SORT... " >&6; }
10122        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10123$as_echo "disabled" >&6; }
10124      else
10125        # Check if the provided tool contains a complete path.
10126        tool_specified="$SORT"
10127        tool_basename="${tool_specified##*/}"
10128        if test "x$tool_basename" = "x$tool_specified"; then
10129          # A command without a complete path is provided, search $PATH.
10130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10131$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10132          # Extract the first word of "$tool_basename", so it can be a program name with args.
10133set dummy $tool_basename; ac_word=$2
10134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10135$as_echo_n "checking for $ac_word... " >&6; }
10136if ${ac_cv_path_SORT+:} false; then :
10137  $as_echo_n "(cached) " >&6
10138else
10139  case $SORT in
10140  [\\/]* | ?:[\\/]*)
10141  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10142  ;;
10143  *)
10144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10145for as_dir in $PATH
10146do
10147  IFS=$as_save_IFS
10148  test -z "$as_dir" && as_dir=.
10149    for ac_exec_ext in '' $ac_executable_extensions; do
10150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10151    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10153    break 2
10154  fi
10155done
10156  done
10157IFS=$as_save_IFS
10158
10159  ;;
10160esac
10161fi
10162SORT=$ac_cv_path_SORT
10163if test -n "$SORT"; then
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10165$as_echo "$SORT" >&6; }
10166else
10167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10168$as_echo "no" >&6; }
10169fi
10170
10171
10172          if test "x$SORT" = x; then
10173            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10174          fi
10175        else
10176          # Otherwise we believe it is a complete path. Use it as it is.
10177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10178$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10179          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10180$as_echo_n "checking for SORT... " >&6; }
10181          if test ! -x "$tool_specified"; then
10182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10183$as_echo "not found" >&6; }
10184            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10185          fi
10186          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10187$as_echo "$tool_specified" >&6; }
10188        fi
10189      fi
10190    fi
10191
10192  fi
10193
10194
10195
10196  if test "x$SORT" = x; then
10197    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10198  fi
10199
10200
10201
10202
10203
10204  # Publish this variable in the help.
10205
10206
10207  if [ -z "${TAIL+x}" ]; then
10208    # The variable is not set by user, try to locate tool using the code snippet
10209    for ac_prog in tail
10210do
10211  # Extract the first word of "$ac_prog", so it can be a program name with args.
10212set dummy $ac_prog; ac_word=$2
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10214$as_echo_n "checking for $ac_word... " >&6; }
10215if ${ac_cv_path_TAIL+:} false; then :
10216  $as_echo_n "(cached) " >&6
10217else
10218  case $TAIL in
10219  [\\/]* | ?:[\\/]*)
10220  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10221  ;;
10222  *)
10223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10224for as_dir in $PATH
10225do
10226  IFS=$as_save_IFS
10227  test -z "$as_dir" && as_dir=.
10228    for ac_exec_ext in '' $ac_executable_extensions; do
10229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10230    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10232    break 2
10233  fi
10234done
10235  done
10236IFS=$as_save_IFS
10237
10238  ;;
10239esac
10240fi
10241TAIL=$ac_cv_path_TAIL
10242if test -n "$TAIL"; then
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10244$as_echo "$TAIL" >&6; }
10245else
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
10248fi
10249
10250
10251  test -n "$TAIL" && break
10252done
10253
10254  else
10255    # The variable is set, but is it from the command line or the environment?
10256
10257    # Try to remove the string !TAIL! from our list.
10258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10260      # If it failed, the variable was not from the command line. Ignore it,
10261      # but warn the user (except for BASH, which is always set by the calling BASH).
10262      if test "xTAIL" != xBASH; then
10263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10264$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10265      fi
10266      # Try to locate tool using the code snippet
10267      for ac_prog in tail
10268do
10269  # Extract the first word of "$ac_prog", so it can be a program name with args.
10270set dummy $ac_prog; ac_word=$2
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10272$as_echo_n "checking for $ac_word... " >&6; }
10273if ${ac_cv_path_TAIL+:} false; then :
10274  $as_echo_n "(cached) " >&6
10275else
10276  case $TAIL in
10277  [\\/]* | ?:[\\/]*)
10278  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10279  ;;
10280  *)
10281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282for as_dir in $PATH
10283do
10284  IFS=$as_save_IFS
10285  test -z "$as_dir" && as_dir=.
10286    for ac_exec_ext in '' $ac_executable_extensions; do
10287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10288    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10290    break 2
10291  fi
10292done
10293  done
10294IFS=$as_save_IFS
10295
10296  ;;
10297esac
10298fi
10299TAIL=$ac_cv_path_TAIL
10300if test -n "$TAIL"; then
10301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10302$as_echo "$TAIL" >&6; }
10303else
10304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
10306fi
10307
10308
10309  test -n "$TAIL" && break
10310done
10311
10312    else
10313      # If it succeeded, then it was overridden by the user. We will use it
10314      # for the tool.
10315
10316      # First remove it from the list of overridden variables, so we can test
10317      # for unknown variables in the end.
10318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10319
10320      # Check if we try to supply an empty value
10321      if test "x$TAIL" = x; then
10322        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10323$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10325$as_echo_n "checking for TAIL... " >&6; }
10326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10327$as_echo "disabled" >&6; }
10328      else
10329        # Check if the provided tool contains a complete path.
10330        tool_specified="$TAIL"
10331        tool_basename="${tool_specified##*/}"
10332        if test "x$tool_basename" = "x$tool_specified"; then
10333          # A command without a complete path is provided, search $PATH.
10334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10335$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10336          # Extract the first word of "$tool_basename", so it can be a program name with args.
10337set dummy $tool_basename; ac_word=$2
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10339$as_echo_n "checking for $ac_word... " >&6; }
10340if ${ac_cv_path_TAIL+:} false; then :
10341  $as_echo_n "(cached) " >&6
10342else
10343  case $TAIL in
10344  [\\/]* | ?:[\\/]*)
10345  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10346  ;;
10347  *)
10348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10349for as_dir in $PATH
10350do
10351  IFS=$as_save_IFS
10352  test -z "$as_dir" && as_dir=.
10353    for ac_exec_ext in '' $ac_executable_extensions; do
10354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10355    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10357    break 2
10358  fi
10359done
10360  done
10361IFS=$as_save_IFS
10362
10363  ;;
10364esac
10365fi
10366TAIL=$ac_cv_path_TAIL
10367if test -n "$TAIL"; then
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10369$as_echo "$TAIL" >&6; }
10370else
10371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10372$as_echo "no" >&6; }
10373fi
10374
10375
10376          if test "x$TAIL" = x; then
10377            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10378          fi
10379        else
10380          # Otherwise we believe it is a complete path. Use it as it is.
10381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10382$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10383          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10384$as_echo_n "checking for TAIL... " >&6; }
10385          if test ! -x "$tool_specified"; then
10386            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10387$as_echo "not found" >&6; }
10388            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10389          fi
10390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10391$as_echo "$tool_specified" >&6; }
10392        fi
10393      fi
10394    fi
10395
10396  fi
10397
10398
10399
10400  if test "x$TAIL" = x; then
10401    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10402  fi
10403
10404
10405
10406
10407
10408  # Publish this variable in the help.
10409
10410
10411  if [ -z "${TAR+x}" ]; then
10412    # The variable is not set by user, try to locate tool using the code snippet
10413    for ac_prog in tar
10414do
10415  # Extract the first word of "$ac_prog", so it can be a program name with args.
10416set dummy $ac_prog; ac_word=$2
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418$as_echo_n "checking for $ac_word... " >&6; }
10419if ${ac_cv_path_TAR+:} false; then :
10420  $as_echo_n "(cached) " >&6
10421else
10422  case $TAR in
10423  [\\/]* | ?:[\\/]*)
10424  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10425  ;;
10426  *)
10427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428for as_dir in $PATH
10429do
10430  IFS=$as_save_IFS
10431  test -z "$as_dir" && as_dir=.
10432    for ac_exec_ext in '' $ac_executable_extensions; do
10433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436    break 2
10437  fi
10438done
10439  done
10440IFS=$as_save_IFS
10441
10442  ;;
10443esac
10444fi
10445TAR=$ac_cv_path_TAR
10446if test -n "$TAR"; then
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10448$as_echo "$TAR" >&6; }
10449else
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
10452fi
10453
10454
10455  test -n "$TAR" && break
10456done
10457
10458  else
10459    # The variable is set, but is it from the command line or the environment?
10460
10461    # Try to remove the string !TAR! from our list.
10462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10464      # If it failed, the variable was not from the command line. Ignore it,
10465      # but warn the user (except for BASH, which is always set by the calling BASH).
10466      if test "xTAR" != xBASH; then
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10468$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10469      fi
10470      # Try to locate tool using the code snippet
10471      for ac_prog in tar
10472do
10473  # Extract the first word of "$ac_prog", so it can be a program name with args.
10474set dummy $ac_prog; ac_word=$2
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10476$as_echo_n "checking for $ac_word... " >&6; }
10477if ${ac_cv_path_TAR+:} false; then :
10478  $as_echo_n "(cached) " >&6
10479else
10480  case $TAR in
10481  [\\/]* | ?:[\\/]*)
10482  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10483  ;;
10484  *)
10485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486for as_dir in $PATH
10487do
10488  IFS=$as_save_IFS
10489  test -z "$as_dir" && as_dir=.
10490    for ac_exec_ext in '' $ac_executable_extensions; do
10491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10492    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10494    break 2
10495  fi
10496done
10497  done
10498IFS=$as_save_IFS
10499
10500  ;;
10501esac
10502fi
10503TAR=$ac_cv_path_TAR
10504if test -n "$TAR"; then
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10506$as_echo "$TAR" >&6; }
10507else
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
10510fi
10511
10512
10513  test -n "$TAR" && break
10514done
10515
10516    else
10517      # If it succeeded, then it was overridden by the user. We will use it
10518      # for the tool.
10519
10520      # First remove it from the list of overridden variables, so we can test
10521      # for unknown variables in the end.
10522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10523
10524      # Check if we try to supply an empty value
10525      if test "x$TAR" = x; then
10526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10527$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10529$as_echo_n "checking for TAR... " >&6; }
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10531$as_echo "disabled" >&6; }
10532      else
10533        # Check if the provided tool contains a complete path.
10534        tool_specified="$TAR"
10535        tool_basename="${tool_specified##*/}"
10536        if test "x$tool_basename" = "x$tool_specified"; then
10537          # A command without a complete path is provided, search $PATH.
10538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10539$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10540          # Extract the first word of "$tool_basename", so it can be a program name with args.
10541set dummy $tool_basename; ac_word=$2
10542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10543$as_echo_n "checking for $ac_word... " >&6; }
10544if ${ac_cv_path_TAR+:} false; then :
10545  $as_echo_n "(cached) " >&6
10546else
10547  case $TAR in
10548  [\\/]* | ?:[\\/]*)
10549  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10550  ;;
10551  *)
10552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10553for as_dir in $PATH
10554do
10555  IFS=$as_save_IFS
10556  test -z "$as_dir" && as_dir=.
10557    for ac_exec_ext in '' $ac_executable_extensions; do
10558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10559    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10561    break 2
10562  fi
10563done
10564  done
10565IFS=$as_save_IFS
10566
10567  ;;
10568esac
10569fi
10570TAR=$ac_cv_path_TAR
10571if test -n "$TAR"; then
10572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10573$as_echo "$TAR" >&6; }
10574else
10575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10576$as_echo "no" >&6; }
10577fi
10578
10579
10580          if test "x$TAR" = x; then
10581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10582          fi
10583        else
10584          # Otherwise we believe it is a complete path. Use it as it is.
10585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10586$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10588$as_echo_n "checking for TAR... " >&6; }
10589          if test ! -x "$tool_specified"; then
10590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10591$as_echo "not found" >&6; }
10592            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10593          fi
10594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10595$as_echo "$tool_specified" >&6; }
10596        fi
10597      fi
10598    fi
10599
10600  fi
10601
10602
10603
10604  if test "x$TAR" = x; then
10605    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10606  fi
10607
10608
10609
10610
10611
10612  # Publish this variable in the help.
10613
10614
10615  if [ -z "${TEE+x}" ]; then
10616    # The variable is not set by user, try to locate tool using the code snippet
10617    for ac_prog in tee
10618do
10619  # Extract the first word of "$ac_prog", so it can be a program name with args.
10620set dummy $ac_prog; ac_word=$2
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
10623if ${ac_cv_path_TEE+:} false; then :
10624  $as_echo_n "(cached) " >&6
10625else
10626  case $TEE in
10627  [\\/]* | ?:[\\/]*)
10628  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10629  ;;
10630  *)
10631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632for as_dir in $PATH
10633do
10634  IFS=$as_save_IFS
10635  test -z "$as_dir" && as_dir=.
10636    for ac_exec_ext in '' $ac_executable_extensions; do
10637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640    break 2
10641  fi
10642done
10643  done
10644IFS=$as_save_IFS
10645
10646  ;;
10647esac
10648fi
10649TEE=$ac_cv_path_TEE
10650if test -n "$TEE"; then
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10652$as_echo "$TEE" >&6; }
10653else
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656fi
10657
10658
10659  test -n "$TEE" && break
10660done
10661
10662  else
10663    # The variable is set, but is it from the command line or the environment?
10664
10665    # Try to remove the string !TEE! from our list.
10666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10668      # If it failed, the variable was not from the command line. Ignore it,
10669      # but warn the user (except for BASH, which is always set by the calling BASH).
10670      if test "xTEE" != xBASH; then
10671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10672$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10673      fi
10674      # Try to locate tool using the code snippet
10675      for ac_prog in tee
10676do
10677  # Extract the first word of "$ac_prog", so it can be a program name with args.
10678set dummy $ac_prog; ac_word=$2
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10680$as_echo_n "checking for $ac_word... " >&6; }
10681if ${ac_cv_path_TEE+:} false; then :
10682  $as_echo_n "(cached) " >&6
10683else
10684  case $TEE in
10685  [\\/]* | ?:[\\/]*)
10686  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10687  ;;
10688  *)
10689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10690for as_dir in $PATH
10691do
10692  IFS=$as_save_IFS
10693  test -z "$as_dir" && as_dir=.
10694    for ac_exec_ext in '' $ac_executable_extensions; do
10695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10696    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10698    break 2
10699  fi
10700done
10701  done
10702IFS=$as_save_IFS
10703
10704  ;;
10705esac
10706fi
10707TEE=$ac_cv_path_TEE
10708if test -n "$TEE"; then
10709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10710$as_echo "$TEE" >&6; }
10711else
10712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714fi
10715
10716
10717  test -n "$TEE" && break
10718done
10719
10720    else
10721      # If it succeeded, then it was overridden by the user. We will use it
10722      # for the tool.
10723
10724      # First remove it from the list of overridden variables, so we can test
10725      # for unknown variables in the end.
10726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10727
10728      # Check if we try to supply an empty value
10729      if test "x$TEE" = x; then
10730        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10731$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10732        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10733$as_echo_n "checking for TEE... " >&6; }
10734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10735$as_echo "disabled" >&6; }
10736      else
10737        # Check if the provided tool contains a complete path.
10738        tool_specified="$TEE"
10739        tool_basename="${tool_specified##*/}"
10740        if test "x$tool_basename" = "x$tool_specified"; then
10741          # A command without a complete path is provided, search $PATH.
10742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10743$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10744          # Extract the first word of "$tool_basename", so it can be a program name with args.
10745set dummy $tool_basename; ac_word=$2
10746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10747$as_echo_n "checking for $ac_word... " >&6; }
10748if ${ac_cv_path_TEE+:} false; then :
10749  $as_echo_n "(cached) " >&6
10750else
10751  case $TEE in
10752  [\\/]* | ?:[\\/]*)
10753  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10754  ;;
10755  *)
10756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10757for as_dir in $PATH
10758do
10759  IFS=$as_save_IFS
10760  test -z "$as_dir" && as_dir=.
10761    for ac_exec_ext in '' $ac_executable_extensions; do
10762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10763    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10765    break 2
10766  fi
10767done
10768  done
10769IFS=$as_save_IFS
10770
10771  ;;
10772esac
10773fi
10774TEE=$ac_cv_path_TEE
10775if test -n "$TEE"; then
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10777$as_echo "$TEE" >&6; }
10778else
10779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10780$as_echo "no" >&6; }
10781fi
10782
10783
10784          if test "x$TEE" = x; then
10785            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10786          fi
10787        else
10788          # Otherwise we believe it is a complete path. Use it as it is.
10789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10790$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10791          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10792$as_echo_n "checking for TEE... " >&6; }
10793          if test ! -x "$tool_specified"; then
10794            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10795$as_echo "not found" >&6; }
10796            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10797          fi
10798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10799$as_echo "$tool_specified" >&6; }
10800        fi
10801      fi
10802    fi
10803
10804  fi
10805
10806
10807
10808  if test "x$TEE" = x; then
10809    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10810  fi
10811
10812
10813
10814
10815
10816  # Publish this variable in the help.
10817
10818
10819  if [ -z "${TOUCH+x}" ]; then
10820    # The variable is not set by user, try to locate tool using the code snippet
10821    for ac_prog in touch
10822do
10823  # Extract the first word of "$ac_prog", so it can be a program name with args.
10824set dummy $ac_prog; ac_word=$2
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10826$as_echo_n "checking for $ac_word... " >&6; }
10827if ${ac_cv_path_TOUCH+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  case $TOUCH in
10831  [\\/]* | ?:[\\/]*)
10832  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10833  ;;
10834  *)
10835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10836for as_dir in $PATH
10837do
10838  IFS=$as_save_IFS
10839  test -z "$as_dir" && as_dir=.
10840    for ac_exec_ext in '' $ac_executable_extensions; do
10841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10842    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10844    break 2
10845  fi
10846done
10847  done
10848IFS=$as_save_IFS
10849
10850  ;;
10851esac
10852fi
10853TOUCH=$ac_cv_path_TOUCH
10854if test -n "$TOUCH"; then
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10856$as_echo "$TOUCH" >&6; }
10857else
10858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10859$as_echo "no" >&6; }
10860fi
10861
10862
10863  test -n "$TOUCH" && break
10864done
10865
10866  else
10867    # The variable is set, but is it from the command line or the environment?
10868
10869    # Try to remove the string !TOUCH! from our list.
10870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10872      # If it failed, the variable was not from the command line. Ignore it,
10873      # but warn the user (except for BASH, which is always set by the calling BASH).
10874      if test "xTOUCH" != xBASH; then
10875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10876$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10877      fi
10878      # Try to locate tool using the code snippet
10879      for ac_prog in touch
10880do
10881  # Extract the first word of "$ac_prog", so it can be a program name with args.
10882set dummy $ac_prog; ac_word=$2
10883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10884$as_echo_n "checking for $ac_word... " >&6; }
10885if ${ac_cv_path_TOUCH+:} false; then :
10886  $as_echo_n "(cached) " >&6
10887else
10888  case $TOUCH in
10889  [\\/]* | ?:[\\/]*)
10890  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10891  ;;
10892  *)
10893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10894for as_dir in $PATH
10895do
10896  IFS=$as_save_IFS
10897  test -z "$as_dir" && as_dir=.
10898    for ac_exec_ext in '' $ac_executable_extensions; do
10899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10900    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10902    break 2
10903  fi
10904done
10905  done
10906IFS=$as_save_IFS
10907
10908  ;;
10909esac
10910fi
10911TOUCH=$ac_cv_path_TOUCH
10912if test -n "$TOUCH"; then
10913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10914$as_echo "$TOUCH" >&6; }
10915else
10916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918fi
10919
10920
10921  test -n "$TOUCH" && break
10922done
10923
10924    else
10925      # If it succeeded, then it was overridden by the user. We will use it
10926      # for the tool.
10927
10928      # First remove it from the list of overridden variables, so we can test
10929      # for unknown variables in the end.
10930      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10931
10932      # Check if we try to supply an empty value
10933      if test "x$TOUCH" = x; then
10934        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
10935$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
10936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10937$as_echo_n "checking for TOUCH... " >&6; }
10938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10939$as_echo "disabled" >&6; }
10940      else
10941        # Check if the provided tool contains a complete path.
10942        tool_specified="$TOUCH"
10943        tool_basename="${tool_specified##*/}"
10944        if test "x$tool_basename" = "x$tool_specified"; then
10945          # A command without a complete path is provided, search $PATH.
10946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10947$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10948          # Extract the first word of "$tool_basename", so it can be a program name with args.
10949set dummy $tool_basename; ac_word=$2
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10951$as_echo_n "checking for $ac_word... " >&6; }
10952if ${ac_cv_path_TOUCH+:} false; then :
10953  $as_echo_n "(cached) " >&6
10954else
10955  case $TOUCH in
10956  [\\/]* | ?:[\\/]*)
10957  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10958  ;;
10959  *)
10960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10961for as_dir in $PATH
10962do
10963  IFS=$as_save_IFS
10964  test -z "$as_dir" && as_dir=.
10965    for ac_exec_ext in '' $ac_executable_extensions; do
10966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10967    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10969    break 2
10970  fi
10971done
10972  done
10973IFS=$as_save_IFS
10974
10975  ;;
10976esac
10977fi
10978TOUCH=$ac_cv_path_TOUCH
10979if test -n "$TOUCH"; then
10980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10981$as_echo "$TOUCH" >&6; }
10982else
10983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10984$as_echo "no" >&6; }
10985fi
10986
10987
10988          if test "x$TOUCH" = x; then
10989            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10990          fi
10991        else
10992          # Otherwise we believe it is a complete path. Use it as it is.
10993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10994$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10995          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10996$as_echo_n "checking for TOUCH... " >&6; }
10997          if test ! -x "$tool_specified"; then
10998            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10999$as_echo "not found" >&6; }
11000            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11001          fi
11002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11003$as_echo "$tool_specified" >&6; }
11004        fi
11005      fi
11006    fi
11007
11008  fi
11009
11010
11011
11012  if test "x$TOUCH" = x; then
11013    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11014  fi
11015
11016
11017
11018
11019
11020  # Publish this variable in the help.
11021
11022
11023  if [ -z "${TR+x}" ]; then
11024    # The variable is not set by user, try to locate tool using the code snippet
11025    for ac_prog in tr
11026do
11027  # Extract the first word of "$ac_prog", so it can be a program name with args.
11028set dummy $ac_prog; ac_word=$2
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11030$as_echo_n "checking for $ac_word... " >&6; }
11031if ${ac_cv_path_TR+:} false; then :
11032  $as_echo_n "(cached) " >&6
11033else
11034  case $TR in
11035  [\\/]* | ?:[\\/]*)
11036  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11037  ;;
11038  *)
11039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042  IFS=$as_save_IFS
11043  test -z "$as_dir" && as_dir=.
11044    for ac_exec_ext in '' $ac_executable_extensions; do
11045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11046    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11048    break 2
11049  fi
11050done
11051  done
11052IFS=$as_save_IFS
11053
11054  ;;
11055esac
11056fi
11057TR=$ac_cv_path_TR
11058if test -n "$TR"; then
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11060$as_echo "$TR" >&6; }
11061else
11062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063$as_echo "no" >&6; }
11064fi
11065
11066
11067  test -n "$TR" && break
11068done
11069
11070  else
11071    # The variable is set, but is it from the command line or the environment?
11072
11073    # Try to remove the string !TR! from our list.
11074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11076      # If it failed, the variable was not from the command line. Ignore it,
11077      # but warn the user (except for BASH, which is always set by the calling BASH).
11078      if test "xTR" != xBASH; then
11079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11080$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11081      fi
11082      # Try to locate tool using the code snippet
11083      for ac_prog in tr
11084do
11085  # Extract the first word of "$ac_prog", so it can be a program name with args.
11086set dummy $ac_prog; ac_word=$2
11087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11088$as_echo_n "checking for $ac_word... " >&6; }
11089if ${ac_cv_path_TR+:} false; then :
11090  $as_echo_n "(cached) " >&6
11091else
11092  case $TR in
11093  [\\/]* | ?:[\\/]*)
11094  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11095  ;;
11096  *)
11097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11098for as_dir in $PATH
11099do
11100  IFS=$as_save_IFS
11101  test -z "$as_dir" && as_dir=.
11102    for ac_exec_ext in '' $ac_executable_extensions; do
11103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11104    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11106    break 2
11107  fi
11108done
11109  done
11110IFS=$as_save_IFS
11111
11112  ;;
11113esac
11114fi
11115TR=$ac_cv_path_TR
11116if test -n "$TR"; then
11117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11118$as_echo "$TR" >&6; }
11119else
11120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
11122fi
11123
11124
11125  test -n "$TR" && break
11126done
11127
11128    else
11129      # If it succeeded, then it was overridden by the user. We will use it
11130      # for the tool.
11131
11132      # First remove it from the list of overridden variables, so we can test
11133      # for unknown variables in the end.
11134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11135
11136      # Check if we try to supply an empty value
11137      if test "x$TR" = x; then
11138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11139$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11141$as_echo_n "checking for TR... " >&6; }
11142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11143$as_echo "disabled" >&6; }
11144      else
11145        # Check if the provided tool contains a complete path.
11146        tool_specified="$TR"
11147        tool_basename="${tool_specified##*/}"
11148        if test "x$tool_basename" = "x$tool_specified"; then
11149          # A command without a complete path is provided, search $PATH.
11150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11151$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11152          # Extract the first word of "$tool_basename", so it can be a program name with args.
11153set dummy $tool_basename; ac_word=$2
11154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11155$as_echo_n "checking for $ac_word... " >&6; }
11156if ${ac_cv_path_TR+:} false; then :
11157  $as_echo_n "(cached) " >&6
11158else
11159  case $TR in
11160  [\\/]* | ?:[\\/]*)
11161  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11162  ;;
11163  *)
11164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11165for as_dir in $PATH
11166do
11167  IFS=$as_save_IFS
11168  test -z "$as_dir" && as_dir=.
11169    for ac_exec_ext in '' $ac_executable_extensions; do
11170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11171    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11173    break 2
11174  fi
11175done
11176  done
11177IFS=$as_save_IFS
11178
11179  ;;
11180esac
11181fi
11182TR=$ac_cv_path_TR
11183if test -n "$TR"; then
11184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11185$as_echo "$TR" >&6; }
11186else
11187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
11189fi
11190
11191
11192          if test "x$TR" = x; then
11193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11194          fi
11195        else
11196          # Otherwise we believe it is a complete path. Use it as it is.
11197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11198$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11200$as_echo_n "checking for TR... " >&6; }
11201          if test ! -x "$tool_specified"; then
11202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11203$as_echo "not found" >&6; }
11204            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11205          fi
11206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11207$as_echo "$tool_specified" >&6; }
11208        fi
11209      fi
11210    fi
11211
11212  fi
11213
11214
11215
11216  if test "x$TR" = x; then
11217    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11218  fi
11219
11220
11221
11222
11223
11224  # Publish this variable in the help.
11225
11226
11227  if [ -z "${UNAME+x}" ]; then
11228    # The variable is not set by user, try to locate tool using the code snippet
11229    for ac_prog in uname
11230do
11231  # Extract the first word of "$ac_prog", so it can be a program name with args.
11232set dummy $ac_prog; ac_word=$2
11233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11234$as_echo_n "checking for $ac_word... " >&6; }
11235if ${ac_cv_path_UNAME+:} false; then :
11236  $as_echo_n "(cached) " >&6
11237else
11238  case $UNAME in
11239  [\\/]* | ?:[\\/]*)
11240  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11241  ;;
11242  *)
11243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11244for as_dir in $PATH
11245do
11246  IFS=$as_save_IFS
11247  test -z "$as_dir" && as_dir=.
11248    for ac_exec_ext in '' $ac_executable_extensions; do
11249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11250    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11252    break 2
11253  fi
11254done
11255  done
11256IFS=$as_save_IFS
11257
11258  ;;
11259esac
11260fi
11261UNAME=$ac_cv_path_UNAME
11262if test -n "$UNAME"; then
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11264$as_echo "$UNAME" >&6; }
11265else
11266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
11268fi
11269
11270
11271  test -n "$UNAME" && break
11272done
11273
11274  else
11275    # The variable is set, but is it from the command line or the environment?
11276
11277    # Try to remove the string !UNAME! from our list.
11278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11280      # If it failed, the variable was not from the command line. Ignore it,
11281      # but warn the user (except for BASH, which is always set by the calling BASH).
11282      if test "xUNAME" != xBASH; then
11283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11284$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11285      fi
11286      # Try to locate tool using the code snippet
11287      for ac_prog in uname
11288do
11289  # Extract the first word of "$ac_prog", so it can be a program name with args.
11290set dummy $ac_prog; ac_word=$2
11291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11292$as_echo_n "checking for $ac_word... " >&6; }
11293if ${ac_cv_path_UNAME+:} false; then :
11294  $as_echo_n "(cached) " >&6
11295else
11296  case $UNAME in
11297  [\\/]* | ?:[\\/]*)
11298  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11299  ;;
11300  *)
11301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11302for as_dir in $PATH
11303do
11304  IFS=$as_save_IFS
11305  test -z "$as_dir" && as_dir=.
11306    for ac_exec_ext in '' $ac_executable_extensions; do
11307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11308    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11310    break 2
11311  fi
11312done
11313  done
11314IFS=$as_save_IFS
11315
11316  ;;
11317esac
11318fi
11319UNAME=$ac_cv_path_UNAME
11320if test -n "$UNAME"; then
11321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11322$as_echo "$UNAME" >&6; }
11323else
11324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11325$as_echo "no" >&6; }
11326fi
11327
11328
11329  test -n "$UNAME" && break
11330done
11331
11332    else
11333      # If it succeeded, then it was overridden by the user. We will use it
11334      # for the tool.
11335
11336      # First remove it from the list of overridden variables, so we can test
11337      # for unknown variables in the end.
11338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11339
11340      # Check if we try to supply an empty value
11341      if test "x$UNAME" = x; then
11342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11343$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11345$as_echo_n "checking for UNAME... " >&6; }
11346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11347$as_echo "disabled" >&6; }
11348      else
11349        # Check if the provided tool contains a complete path.
11350        tool_specified="$UNAME"
11351        tool_basename="${tool_specified##*/}"
11352        if test "x$tool_basename" = "x$tool_specified"; then
11353          # A command without a complete path is provided, search $PATH.
11354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11355$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11356          # Extract the first word of "$tool_basename", so it can be a program name with args.
11357set dummy $tool_basename; ac_word=$2
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11359$as_echo_n "checking for $ac_word... " >&6; }
11360if ${ac_cv_path_UNAME+:} false; then :
11361  $as_echo_n "(cached) " >&6
11362else
11363  case $UNAME in
11364  [\\/]* | ?:[\\/]*)
11365  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11366  ;;
11367  *)
11368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11369for as_dir in $PATH
11370do
11371  IFS=$as_save_IFS
11372  test -z "$as_dir" && as_dir=.
11373    for ac_exec_ext in '' $ac_executable_extensions; do
11374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11375    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11377    break 2
11378  fi
11379done
11380  done
11381IFS=$as_save_IFS
11382
11383  ;;
11384esac
11385fi
11386UNAME=$ac_cv_path_UNAME
11387if test -n "$UNAME"; then
11388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11389$as_echo "$UNAME" >&6; }
11390else
11391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
11393fi
11394
11395
11396          if test "x$UNAME" = x; then
11397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11398          fi
11399        else
11400          # Otherwise we believe it is a complete path. Use it as it is.
11401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11402$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11404$as_echo_n "checking for UNAME... " >&6; }
11405          if test ! -x "$tool_specified"; then
11406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11407$as_echo "not found" >&6; }
11408            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11409          fi
11410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11411$as_echo "$tool_specified" >&6; }
11412        fi
11413      fi
11414    fi
11415
11416  fi
11417
11418
11419
11420  if test "x$UNAME" = x; then
11421    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11422  fi
11423
11424
11425
11426
11427
11428  # Publish this variable in the help.
11429
11430
11431  if [ -z "${UNIQ+x}" ]; then
11432    # The variable is not set by user, try to locate tool using the code snippet
11433    for ac_prog in uniq
11434do
11435  # Extract the first word of "$ac_prog", so it can be a program name with args.
11436set dummy $ac_prog; ac_word=$2
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11438$as_echo_n "checking for $ac_word... " >&6; }
11439if ${ac_cv_path_UNIQ+:} false; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  case $UNIQ in
11443  [\\/]* | ?:[\\/]*)
11444  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11445  ;;
11446  *)
11447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11448for as_dir in $PATH
11449do
11450  IFS=$as_save_IFS
11451  test -z "$as_dir" && as_dir=.
11452    for ac_exec_ext in '' $ac_executable_extensions; do
11453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11454    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11456    break 2
11457  fi
11458done
11459  done
11460IFS=$as_save_IFS
11461
11462  ;;
11463esac
11464fi
11465UNIQ=$ac_cv_path_UNIQ
11466if test -n "$UNIQ"; then
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11468$as_echo "$UNIQ" >&6; }
11469else
11470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
11472fi
11473
11474
11475  test -n "$UNIQ" && break
11476done
11477
11478  else
11479    # The variable is set, but is it from the command line or the environment?
11480
11481    # Try to remove the string !UNIQ! from our list.
11482    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11483    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11484      # If it failed, the variable was not from the command line. Ignore it,
11485      # but warn the user (except for BASH, which is always set by the calling BASH).
11486      if test "xUNIQ" != xBASH; then
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11488$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11489      fi
11490      # Try to locate tool using the code snippet
11491      for ac_prog in uniq
11492do
11493  # Extract the first word of "$ac_prog", so it can be a program name with args.
11494set dummy $ac_prog; ac_word=$2
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11496$as_echo_n "checking for $ac_word... " >&6; }
11497if ${ac_cv_path_UNIQ+:} false; then :
11498  $as_echo_n "(cached) " >&6
11499else
11500  case $UNIQ in
11501  [\\/]* | ?:[\\/]*)
11502  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11503  ;;
11504  *)
11505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11506for as_dir in $PATH
11507do
11508  IFS=$as_save_IFS
11509  test -z "$as_dir" && as_dir=.
11510    for ac_exec_ext in '' $ac_executable_extensions; do
11511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11512    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11514    break 2
11515  fi
11516done
11517  done
11518IFS=$as_save_IFS
11519
11520  ;;
11521esac
11522fi
11523UNIQ=$ac_cv_path_UNIQ
11524if test -n "$UNIQ"; then
11525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11526$as_echo "$UNIQ" >&6; }
11527else
11528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
11530fi
11531
11532
11533  test -n "$UNIQ" && break
11534done
11535
11536    else
11537      # If it succeeded, then it was overridden by the user. We will use it
11538      # for the tool.
11539
11540      # First remove it from the list of overridden variables, so we can test
11541      # for unknown variables in the end.
11542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11543
11544      # Check if we try to supply an empty value
11545      if test "x$UNIQ" = x; then
11546        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11547$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11548        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11549$as_echo_n "checking for UNIQ... " >&6; }
11550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11551$as_echo "disabled" >&6; }
11552      else
11553        # Check if the provided tool contains a complete path.
11554        tool_specified="$UNIQ"
11555        tool_basename="${tool_specified##*/}"
11556        if test "x$tool_basename" = "x$tool_specified"; then
11557          # A command without a complete path is provided, search $PATH.
11558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11559$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11560          # Extract the first word of "$tool_basename", so it can be a program name with args.
11561set dummy $tool_basename; ac_word=$2
11562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11563$as_echo_n "checking for $ac_word... " >&6; }
11564if ${ac_cv_path_UNIQ+:} false; then :
11565  $as_echo_n "(cached) " >&6
11566else
11567  case $UNIQ in
11568  [\\/]* | ?:[\\/]*)
11569  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11570  ;;
11571  *)
11572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11573for as_dir in $PATH
11574do
11575  IFS=$as_save_IFS
11576  test -z "$as_dir" && as_dir=.
11577    for ac_exec_ext in '' $ac_executable_extensions; do
11578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11579    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11581    break 2
11582  fi
11583done
11584  done
11585IFS=$as_save_IFS
11586
11587  ;;
11588esac
11589fi
11590UNIQ=$ac_cv_path_UNIQ
11591if test -n "$UNIQ"; then
11592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11593$as_echo "$UNIQ" >&6; }
11594else
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
11597fi
11598
11599
11600          if test "x$UNIQ" = x; then
11601            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11602          fi
11603        else
11604          # Otherwise we believe it is a complete path. Use it as it is.
11605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11606$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11607          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11608$as_echo_n "checking for UNIQ... " >&6; }
11609          if test ! -x "$tool_specified"; then
11610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11611$as_echo "not found" >&6; }
11612            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11613          fi
11614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11615$as_echo "$tool_specified" >&6; }
11616        fi
11617      fi
11618    fi
11619
11620  fi
11621
11622
11623
11624  if test "x$UNIQ" = x; then
11625    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11626  fi
11627
11628
11629
11630
11631
11632  # Publish this variable in the help.
11633
11634
11635  if [ -z "${WC+x}" ]; then
11636    # The variable is not set by user, try to locate tool using the code snippet
11637    for ac_prog in wc
11638do
11639  # Extract the first word of "$ac_prog", so it can be a program name with args.
11640set dummy $ac_prog; ac_word=$2
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11642$as_echo_n "checking for $ac_word... " >&6; }
11643if ${ac_cv_path_WC+:} false; then :
11644  $as_echo_n "(cached) " >&6
11645else
11646  case $WC in
11647  [\\/]* | ?:[\\/]*)
11648  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11649  ;;
11650  *)
11651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11652for as_dir in $PATH
11653do
11654  IFS=$as_save_IFS
11655  test -z "$as_dir" && as_dir=.
11656    for ac_exec_ext in '' $ac_executable_extensions; do
11657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11658    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11660    break 2
11661  fi
11662done
11663  done
11664IFS=$as_save_IFS
11665
11666  ;;
11667esac
11668fi
11669WC=$ac_cv_path_WC
11670if test -n "$WC"; then
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11672$as_echo "$WC" >&6; }
11673else
11674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
11676fi
11677
11678
11679  test -n "$WC" && break
11680done
11681
11682  else
11683    # The variable is set, but is it from the command line or the environment?
11684
11685    # Try to remove the string !WC! from our list.
11686    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11687    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11688      # If it failed, the variable was not from the command line. Ignore it,
11689      # but warn the user (except for BASH, which is always set by the calling BASH).
11690      if test "xWC" != xBASH; then
11691        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11692$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11693      fi
11694      # Try to locate tool using the code snippet
11695      for ac_prog in wc
11696do
11697  # Extract the first word of "$ac_prog", so it can be a program name with args.
11698set dummy $ac_prog; ac_word=$2
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11700$as_echo_n "checking for $ac_word... " >&6; }
11701if ${ac_cv_path_WC+:} false; then :
11702  $as_echo_n "(cached) " >&6
11703else
11704  case $WC in
11705  [\\/]* | ?:[\\/]*)
11706  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11707  ;;
11708  *)
11709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11710for as_dir in $PATH
11711do
11712  IFS=$as_save_IFS
11713  test -z "$as_dir" && as_dir=.
11714    for ac_exec_ext in '' $ac_executable_extensions; do
11715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11716    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11718    break 2
11719  fi
11720done
11721  done
11722IFS=$as_save_IFS
11723
11724  ;;
11725esac
11726fi
11727WC=$ac_cv_path_WC
11728if test -n "$WC"; then
11729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11730$as_echo "$WC" >&6; }
11731else
11732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
11734fi
11735
11736
11737  test -n "$WC" && break
11738done
11739
11740    else
11741      # If it succeeded, then it was overridden by the user. We will use it
11742      # for the tool.
11743
11744      # First remove it from the list of overridden variables, so we can test
11745      # for unknown variables in the end.
11746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11747
11748      # Check if we try to supply an empty value
11749      if test "x$WC" = x; then
11750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11751$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11753$as_echo_n "checking for WC... " >&6; }
11754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11755$as_echo "disabled" >&6; }
11756      else
11757        # Check if the provided tool contains a complete path.
11758        tool_specified="$WC"
11759        tool_basename="${tool_specified##*/}"
11760        if test "x$tool_basename" = "x$tool_specified"; then
11761          # A command without a complete path is provided, search $PATH.
11762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11763$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11764          # Extract the first word of "$tool_basename", so it can be a program name with args.
11765set dummy $tool_basename; ac_word=$2
11766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11767$as_echo_n "checking for $ac_word... " >&6; }
11768if ${ac_cv_path_WC+:} false; then :
11769  $as_echo_n "(cached) " >&6
11770else
11771  case $WC in
11772  [\\/]* | ?:[\\/]*)
11773  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11774  ;;
11775  *)
11776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11777for as_dir in $PATH
11778do
11779  IFS=$as_save_IFS
11780  test -z "$as_dir" && as_dir=.
11781    for ac_exec_ext in '' $ac_executable_extensions; do
11782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11783    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11785    break 2
11786  fi
11787done
11788  done
11789IFS=$as_save_IFS
11790
11791  ;;
11792esac
11793fi
11794WC=$ac_cv_path_WC
11795if test -n "$WC"; then
11796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11797$as_echo "$WC" >&6; }
11798else
11799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11800$as_echo "no" >&6; }
11801fi
11802
11803
11804          if test "x$WC" = x; then
11805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11806          fi
11807        else
11808          # Otherwise we believe it is a complete path. Use it as it is.
11809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11810$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11812$as_echo_n "checking for WC... " >&6; }
11813          if test ! -x "$tool_specified"; then
11814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11815$as_echo "not found" >&6; }
11816            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11817          fi
11818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11819$as_echo "$tool_specified" >&6; }
11820        fi
11821      fi
11822    fi
11823
11824  fi
11825
11826
11827
11828  if test "x$WC" = x; then
11829    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11830  fi
11831
11832
11833
11834
11835
11836  # Publish this variable in the help.
11837
11838
11839  if [ -z "${WHICH+x}" ]; then
11840    # The variable is not set by user, try to locate tool using the code snippet
11841    for ac_prog in which
11842do
11843  # Extract the first word of "$ac_prog", so it can be a program name with args.
11844set dummy $ac_prog; ac_word=$2
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11846$as_echo_n "checking for $ac_word... " >&6; }
11847if ${ac_cv_path_WHICH+:} false; then :
11848  $as_echo_n "(cached) " >&6
11849else
11850  case $WHICH in
11851  [\\/]* | ?:[\\/]*)
11852  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11853  ;;
11854  *)
11855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11856for as_dir in $PATH
11857do
11858  IFS=$as_save_IFS
11859  test -z "$as_dir" && as_dir=.
11860    for ac_exec_ext in '' $ac_executable_extensions; do
11861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11862    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11864    break 2
11865  fi
11866done
11867  done
11868IFS=$as_save_IFS
11869
11870  ;;
11871esac
11872fi
11873WHICH=$ac_cv_path_WHICH
11874if test -n "$WHICH"; then
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11876$as_echo "$WHICH" >&6; }
11877else
11878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11879$as_echo "no" >&6; }
11880fi
11881
11882
11883  test -n "$WHICH" && break
11884done
11885
11886  else
11887    # The variable is set, but is it from the command line or the environment?
11888
11889    # Try to remove the string !WHICH! from our list.
11890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11892      # If it failed, the variable was not from the command line. Ignore it,
11893      # but warn the user (except for BASH, which is always set by the calling BASH).
11894      if test "xWHICH" != xBASH; then
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11896$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11897      fi
11898      # Try to locate tool using the code snippet
11899      for ac_prog in which
11900do
11901  # Extract the first word of "$ac_prog", so it can be a program name with args.
11902set dummy $ac_prog; ac_word=$2
11903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11904$as_echo_n "checking for $ac_word... " >&6; }
11905if ${ac_cv_path_WHICH+:} false; then :
11906  $as_echo_n "(cached) " >&6
11907else
11908  case $WHICH in
11909  [\\/]* | ?:[\\/]*)
11910  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11911  ;;
11912  *)
11913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11914for as_dir in $PATH
11915do
11916  IFS=$as_save_IFS
11917  test -z "$as_dir" && as_dir=.
11918    for ac_exec_ext in '' $ac_executable_extensions; do
11919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11920    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11922    break 2
11923  fi
11924done
11925  done
11926IFS=$as_save_IFS
11927
11928  ;;
11929esac
11930fi
11931WHICH=$ac_cv_path_WHICH
11932if test -n "$WHICH"; then
11933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11934$as_echo "$WHICH" >&6; }
11935else
11936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11937$as_echo "no" >&6; }
11938fi
11939
11940
11941  test -n "$WHICH" && break
11942done
11943
11944    else
11945      # If it succeeded, then it was overridden by the user. We will use it
11946      # for the tool.
11947
11948      # First remove it from the list of overridden variables, so we can test
11949      # for unknown variables in the end.
11950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11951
11952      # Check if we try to supply an empty value
11953      if test "x$WHICH" = x; then
11954        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
11955$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
11956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11957$as_echo_n "checking for WHICH... " >&6; }
11958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11959$as_echo "disabled" >&6; }
11960      else
11961        # Check if the provided tool contains a complete path.
11962        tool_specified="$WHICH"
11963        tool_basename="${tool_specified##*/}"
11964        if test "x$tool_basename" = "x$tool_specified"; then
11965          # A command without a complete path is provided, search $PATH.
11966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11967$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11968          # Extract the first word of "$tool_basename", so it can be a program name with args.
11969set dummy $tool_basename; ac_word=$2
11970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11971$as_echo_n "checking for $ac_word... " >&6; }
11972if ${ac_cv_path_WHICH+:} false; then :
11973  $as_echo_n "(cached) " >&6
11974else
11975  case $WHICH in
11976  [\\/]* | ?:[\\/]*)
11977  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11978  ;;
11979  *)
11980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11981for as_dir in $PATH
11982do
11983  IFS=$as_save_IFS
11984  test -z "$as_dir" && as_dir=.
11985    for ac_exec_ext in '' $ac_executable_extensions; do
11986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11987    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11989    break 2
11990  fi
11991done
11992  done
11993IFS=$as_save_IFS
11994
11995  ;;
11996esac
11997fi
11998WHICH=$ac_cv_path_WHICH
11999if test -n "$WHICH"; then
12000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12001$as_echo "$WHICH" >&6; }
12002else
12003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12004$as_echo "no" >&6; }
12005fi
12006
12007
12008          if test "x$WHICH" = x; then
12009            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12010          fi
12011        else
12012          # Otherwise we believe it is a complete path. Use it as it is.
12013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12014$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12015          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12016$as_echo_n "checking for WHICH... " >&6; }
12017          if test ! -x "$tool_specified"; then
12018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12019$as_echo "not found" >&6; }
12020            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12021          fi
12022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12023$as_echo "$tool_specified" >&6; }
12024        fi
12025      fi
12026    fi
12027
12028  fi
12029
12030
12031
12032  if test "x$WHICH" = x; then
12033    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12034  fi
12035
12036
12037
12038
12039
12040  # Publish this variable in the help.
12041
12042
12043  if [ -z "${XARGS+x}" ]; then
12044    # The variable is not set by user, try to locate tool using the code snippet
12045    for ac_prog in xargs
12046do
12047  # Extract the first word of "$ac_prog", so it can be a program name with args.
12048set dummy $ac_prog; ac_word=$2
12049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12050$as_echo_n "checking for $ac_word... " >&6; }
12051if ${ac_cv_path_XARGS+:} false; then :
12052  $as_echo_n "(cached) " >&6
12053else
12054  case $XARGS in
12055  [\\/]* | ?:[\\/]*)
12056  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12057  ;;
12058  *)
12059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12060for as_dir in $PATH
12061do
12062  IFS=$as_save_IFS
12063  test -z "$as_dir" && as_dir=.
12064    for ac_exec_ext in '' $ac_executable_extensions; do
12065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12066    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12068    break 2
12069  fi
12070done
12071  done
12072IFS=$as_save_IFS
12073
12074  ;;
12075esac
12076fi
12077XARGS=$ac_cv_path_XARGS
12078if test -n "$XARGS"; then
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12080$as_echo "$XARGS" >&6; }
12081else
12082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
12084fi
12085
12086
12087  test -n "$XARGS" && break
12088done
12089
12090  else
12091    # The variable is set, but is it from the command line or the environment?
12092
12093    # Try to remove the string !XARGS! from our list.
12094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12096      # If it failed, the variable was not from the command line. Ignore it,
12097      # but warn the user (except for BASH, which is always set by the calling BASH).
12098      if test "xXARGS" != xBASH; then
12099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12100$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12101      fi
12102      # Try to locate tool using the code snippet
12103      for ac_prog in xargs
12104do
12105  # Extract the first word of "$ac_prog", so it can be a program name with args.
12106set dummy $ac_prog; ac_word=$2
12107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12108$as_echo_n "checking for $ac_word... " >&6; }
12109if ${ac_cv_path_XARGS+:} false; then :
12110  $as_echo_n "(cached) " >&6
12111else
12112  case $XARGS in
12113  [\\/]* | ?:[\\/]*)
12114  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12115  ;;
12116  *)
12117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12118for as_dir in $PATH
12119do
12120  IFS=$as_save_IFS
12121  test -z "$as_dir" && as_dir=.
12122    for ac_exec_ext in '' $ac_executable_extensions; do
12123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12124    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12126    break 2
12127  fi
12128done
12129  done
12130IFS=$as_save_IFS
12131
12132  ;;
12133esac
12134fi
12135XARGS=$ac_cv_path_XARGS
12136if test -n "$XARGS"; then
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12138$as_echo "$XARGS" >&6; }
12139else
12140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12141$as_echo "no" >&6; }
12142fi
12143
12144
12145  test -n "$XARGS" && break
12146done
12147
12148    else
12149      # If it succeeded, then it was overridden by the user. We will use it
12150      # for the tool.
12151
12152      # First remove it from the list of overridden variables, so we can test
12153      # for unknown variables in the end.
12154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12155
12156      # Check if we try to supply an empty value
12157      if test "x$XARGS" = x; then
12158        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12159$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12161$as_echo_n "checking for XARGS... " >&6; }
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12163$as_echo "disabled" >&6; }
12164      else
12165        # Check if the provided tool contains a complete path.
12166        tool_specified="$XARGS"
12167        tool_basename="${tool_specified##*/}"
12168        if test "x$tool_basename" = "x$tool_specified"; then
12169          # A command without a complete path is provided, search $PATH.
12170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12171$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12172          # Extract the first word of "$tool_basename", so it can be a program name with args.
12173set dummy $tool_basename; ac_word=$2
12174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12175$as_echo_n "checking for $ac_word... " >&6; }
12176if ${ac_cv_path_XARGS+:} false; then :
12177  $as_echo_n "(cached) " >&6
12178else
12179  case $XARGS in
12180  [\\/]* | ?:[\\/]*)
12181  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12182  ;;
12183  *)
12184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12185for as_dir in $PATH
12186do
12187  IFS=$as_save_IFS
12188  test -z "$as_dir" && as_dir=.
12189    for ac_exec_ext in '' $ac_executable_extensions; do
12190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12191    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12193    break 2
12194  fi
12195done
12196  done
12197IFS=$as_save_IFS
12198
12199  ;;
12200esac
12201fi
12202XARGS=$ac_cv_path_XARGS
12203if test -n "$XARGS"; then
12204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12205$as_echo "$XARGS" >&6; }
12206else
12207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12208$as_echo "no" >&6; }
12209fi
12210
12211
12212          if test "x$XARGS" = x; then
12213            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12214          fi
12215        else
12216          # Otherwise we believe it is a complete path. Use it as it is.
12217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12218$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12219          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12220$as_echo_n "checking for XARGS... " >&6; }
12221          if test ! -x "$tool_specified"; then
12222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12223$as_echo "not found" >&6; }
12224            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12225          fi
12226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12227$as_echo "$tool_specified" >&6; }
12228        fi
12229      fi
12230    fi
12231
12232  fi
12233
12234
12235
12236  if test "x$XARGS" = x; then
12237    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12238  fi
12239
12240
12241
12242  # Then required tools that require some special treatment.
12243
12244
12245  # Publish this variable in the help.
12246
12247
12248  if [ -z "${AWK+x}" ]; then
12249    # The variable is not set by user, try to locate tool using the code snippet
12250    for ac_prog in gawk mawk nawk awk
12251do
12252  # Extract the first word of "$ac_prog", so it can be a program name with args.
12253set dummy $ac_prog; ac_word=$2
12254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12255$as_echo_n "checking for $ac_word... " >&6; }
12256if ${ac_cv_prog_AWK+:} false; then :
12257  $as_echo_n "(cached) " >&6
12258else
12259  if test -n "$AWK"; then
12260  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12261else
12262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12263for as_dir in $PATH
12264do
12265  IFS=$as_save_IFS
12266  test -z "$as_dir" && as_dir=.
12267    for ac_exec_ext in '' $ac_executable_extensions; do
12268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12269    ac_cv_prog_AWK="$ac_prog"
12270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12271    break 2
12272  fi
12273done
12274  done
12275IFS=$as_save_IFS
12276
12277fi
12278fi
12279AWK=$ac_cv_prog_AWK
12280if test -n "$AWK"; then
12281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12282$as_echo "$AWK" >&6; }
12283else
12284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285$as_echo "no" >&6; }
12286fi
12287
12288
12289  test -n "$AWK" && break
12290done
12291
12292  else
12293    # The variable is set, but is it from the command line or the environment?
12294
12295    # Try to remove the string !AWK! from our list.
12296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12298      # If it failed, the variable was not from the command line. Ignore it,
12299      # but warn the user (except for BASH, which is always set by the calling BASH).
12300      if test "xAWK" != xBASH; then
12301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12302$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12303      fi
12304      # Try to locate tool using the code snippet
12305      for ac_prog in gawk mawk nawk awk
12306do
12307  # Extract the first word of "$ac_prog", so it can be a program name with args.
12308set dummy $ac_prog; ac_word=$2
12309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12310$as_echo_n "checking for $ac_word... " >&6; }
12311if ${ac_cv_prog_AWK+:} false; then :
12312  $as_echo_n "(cached) " >&6
12313else
12314  if test -n "$AWK"; then
12315  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12316else
12317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12324    ac_cv_prog_AWK="$ac_prog"
12325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12326    break 2
12327  fi
12328done
12329  done
12330IFS=$as_save_IFS
12331
12332fi
12333fi
12334AWK=$ac_cv_prog_AWK
12335if test -n "$AWK"; then
12336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12337$as_echo "$AWK" >&6; }
12338else
12339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340$as_echo "no" >&6; }
12341fi
12342
12343
12344  test -n "$AWK" && break
12345done
12346
12347    else
12348      # If it succeeded, then it was overridden by the user. We will use it
12349      # for the tool.
12350
12351      # First remove it from the list of overridden variables, so we can test
12352      # for unknown variables in the end.
12353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12354
12355      # Check if we try to supply an empty value
12356      if test "x$AWK" = x; then
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12358$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12360$as_echo_n "checking for AWK... " >&6; }
12361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12362$as_echo "disabled" >&6; }
12363      else
12364        # Check if the provided tool contains a complete path.
12365        tool_specified="$AWK"
12366        tool_basename="${tool_specified##*/}"
12367        if test "x$tool_basename" = "x$tool_specified"; then
12368          # A command without a complete path is provided, search $PATH.
12369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12370$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12371          # Extract the first word of "$tool_basename", so it can be a program name with args.
12372set dummy $tool_basename; ac_word=$2
12373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12374$as_echo_n "checking for $ac_word... " >&6; }
12375if ${ac_cv_path_AWK+:} false; then :
12376  $as_echo_n "(cached) " >&6
12377else
12378  case $AWK in
12379  [\\/]* | ?:[\\/]*)
12380  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12381  ;;
12382  *)
12383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12384for as_dir in $PATH
12385do
12386  IFS=$as_save_IFS
12387  test -z "$as_dir" && as_dir=.
12388    for ac_exec_ext in '' $ac_executable_extensions; do
12389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12390    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12392    break 2
12393  fi
12394done
12395  done
12396IFS=$as_save_IFS
12397
12398  ;;
12399esac
12400fi
12401AWK=$ac_cv_path_AWK
12402if test -n "$AWK"; then
12403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12404$as_echo "$AWK" >&6; }
12405else
12406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12407$as_echo "no" >&6; }
12408fi
12409
12410
12411          if test "x$AWK" = x; then
12412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12413          fi
12414        else
12415          # Otherwise we believe it is a complete path. Use it as it is.
12416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12417$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12419$as_echo_n "checking for AWK... " >&6; }
12420          if test ! -x "$tool_specified"; then
12421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12422$as_echo "not found" >&6; }
12423            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12424          fi
12425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12426$as_echo "$tool_specified" >&6; }
12427        fi
12428      fi
12429    fi
12430
12431  fi
12432
12433
12434  if test "x$AWK" = x; then
12435    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12436  fi
12437
12438
12439
12440
12441  # Publish this variable in the help.
12442
12443
12444  if [ -z "${GREP+x}" ]; then
12445    # The variable is not set by user, try to locate tool using the code snippet
12446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12447$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12448if ${ac_cv_path_GREP+:} false; then :
12449  $as_echo_n "(cached) " >&6
12450else
12451  if test -z "$GREP"; then
12452  ac_path_GREP_found=false
12453  # Loop through the user's path and test for each of PROGNAME-LIST
12454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12455for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12456do
12457  IFS=$as_save_IFS
12458  test -z "$as_dir" && as_dir=.
12459    for ac_prog in grep ggrep; do
12460    for ac_exec_ext in '' $ac_executable_extensions; do
12461      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12462      as_fn_executable_p "$ac_path_GREP" || continue
12463# Check for GNU ac_path_GREP and select it if it is found.
12464  # Check for GNU $ac_path_GREP
12465case `"$ac_path_GREP" --version 2>&1` in
12466*GNU*)
12467  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12468*)
12469  ac_count=0
12470  $as_echo_n 0123456789 >"conftest.in"
12471  while :
12472  do
12473    cat "conftest.in" "conftest.in" >"conftest.tmp"
12474    mv "conftest.tmp" "conftest.in"
12475    cp "conftest.in" "conftest.nl"
12476    $as_echo 'GREP' >> "conftest.nl"
12477    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12478    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12479    as_fn_arith $ac_count + 1 && ac_count=$as_val
12480    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12481      # Best one so far, save it but keep looking for a better one
12482      ac_cv_path_GREP="$ac_path_GREP"
12483      ac_path_GREP_max=$ac_count
12484    fi
12485    # 10*(2^10) chars as input seems more than enough
12486    test $ac_count -gt 10 && break
12487  done
12488  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12489esac
12490
12491      $ac_path_GREP_found && break 3
12492    done
12493  done
12494  done
12495IFS=$as_save_IFS
12496  if test -z "$ac_cv_path_GREP"; then
12497    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12498  fi
12499else
12500  ac_cv_path_GREP=$GREP
12501fi
12502
12503fi
12504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12505$as_echo "$ac_cv_path_GREP" >&6; }
12506 GREP="$ac_cv_path_GREP"
12507
12508
12509  else
12510    # The variable is set, but is it from the command line or the environment?
12511
12512    # Try to remove the string !GREP! from our list.
12513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12515      # If it failed, the variable was not from the command line. Ignore it,
12516      # but warn the user (except for BASH, which is always set by the calling BASH).
12517      if test "xGREP" != xBASH; then
12518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12519$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12520      fi
12521      # Try to locate tool using the code snippet
12522      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12523$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12524if ${ac_cv_path_GREP+:} false; then :
12525  $as_echo_n "(cached) " >&6
12526else
12527  if test -z "$GREP"; then
12528  ac_path_GREP_found=false
12529  # Loop through the user's path and test for each of PROGNAME-LIST
12530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12531for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12532do
12533  IFS=$as_save_IFS
12534  test -z "$as_dir" && as_dir=.
12535    for ac_prog in grep ggrep; do
12536    for ac_exec_ext in '' $ac_executable_extensions; do
12537      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12538      as_fn_executable_p "$ac_path_GREP" || continue
12539# Check for GNU ac_path_GREP and select it if it is found.
12540  # Check for GNU $ac_path_GREP
12541case `"$ac_path_GREP" --version 2>&1` in
12542*GNU*)
12543  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12544*)
12545  ac_count=0
12546  $as_echo_n 0123456789 >"conftest.in"
12547  while :
12548  do
12549    cat "conftest.in" "conftest.in" >"conftest.tmp"
12550    mv "conftest.tmp" "conftest.in"
12551    cp "conftest.in" "conftest.nl"
12552    $as_echo 'GREP' >> "conftest.nl"
12553    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12554    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12555    as_fn_arith $ac_count + 1 && ac_count=$as_val
12556    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12557      # Best one so far, save it but keep looking for a better one
12558      ac_cv_path_GREP="$ac_path_GREP"
12559      ac_path_GREP_max=$ac_count
12560    fi
12561    # 10*(2^10) chars as input seems more than enough
12562    test $ac_count -gt 10 && break
12563  done
12564  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12565esac
12566
12567      $ac_path_GREP_found && break 3
12568    done
12569  done
12570  done
12571IFS=$as_save_IFS
12572  if test -z "$ac_cv_path_GREP"; then
12573    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12574  fi
12575else
12576  ac_cv_path_GREP=$GREP
12577fi
12578
12579fi
12580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12581$as_echo "$ac_cv_path_GREP" >&6; }
12582 GREP="$ac_cv_path_GREP"
12583
12584
12585    else
12586      # If it succeeded, then it was overridden by the user. We will use it
12587      # for the tool.
12588
12589      # First remove it from the list of overridden variables, so we can test
12590      # for unknown variables in the end.
12591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12592
12593      # Check if we try to supply an empty value
12594      if test "x$GREP" = x; then
12595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12596$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12598$as_echo_n "checking for GREP... " >&6; }
12599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12600$as_echo "disabled" >&6; }
12601      else
12602        # Check if the provided tool contains a complete path.
12603        tool_specified="$GREP"
12604        tool_basename="${tool_specified##*/}"
12605        if test "x$tool_basename" = "x$tool_specified"; then
12606          # A command without a complete path is provided, search $PATH.
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12608$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12609          # Extract the first word of "$tool_basename", so it can be a program name with args.
12610set dummy $tool_basename; ac_word=$2
12611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12612$as_echo_n "checking for $ac_word... " >&6; }
12613if ${ac_cv_path_GREP+:} false; then :
12614  $as_echo_n "(cached) " >&6
12615else
12616  case $GREP in
12617  [\\/]* | ?:[\\/]*)
12618  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12619  ;;
12620  *)
12621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12622for as_dir in $PATH
12623do
12624  IFS=$as_save_IFS
12625  test -z "$as_dir" && as_dir=.
12626    for ac_exec_ext in '' $ac_executable_extensions; do
12627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12628    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12630    break 2
12631  fi
12632done
12633  done
12634IFS=$as_save_IFS
12635
12636  ;;
12637esac
12638fi
12639GREP=$ac_cv_path_GREP
12640if test -n "$GREP"; then
12641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12642$as_echo "$GREP" >&6; }
12643else
12644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645$as_echo "no" >&6; }
12646fi
12647
12648
12649          if test "x$GREP" = x; then
12650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12651          fi
12652        else
12653          # Otherwise we believe it is a complete path. Use it as it is.
12654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12655$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12657$as_echo_n "checking for GREP... " >&6; }
12658          if test ! -x "$tool_specified"; then
12659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12660$as_echo "not found" >&6; }
12661            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12662          fi
12663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12664$as_echo "$tool_specified" >&6; }
12665        fi
12666      fi
12667    fi
12668
12669  fi
12670
12671
12672  if test "x$GREP" = x; then
12673    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12674  fi
12675
12676
12677
12678
12679  # Publish this variable in the help.
12680
12681
12682  if [ -z "${EGREP+x}" ]; then
12683    # The variable is not set by user, try to locate tool using the code snippet
12684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12685$as_echo_n "checking for egrep... " >&6; }
12686if ${ac_cv_path_EGREP+:} false; then :
12687  $as_echo_n "(cached) " >&6
12688else
12689  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12690   then ac_cv_path_EGREP="$GREP -E"
12691   else
12692     if test -z "$EGREP"; then
12693  ac_path_EGREP_found=false
12694  # Loop through the user's path and test for each of PROGNAME-LIST
12695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12696for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12697do
12698  IFS=$as_save_IFS
12699  test -z "$as_dir" && as_dir=.
12700    for ac_prog in egrep; do
12701    for ac_exec_ext in '' $ac_executable_extensions; do
12702      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12703      as_fn_executable_p "$ac_path_EGREP" || continue
12704# Check for GNU ac_path_EGREP and select it if it is found.
12705  # Check for GNU $ac_path_EGREP
12706case `"$ac_path_EGREP" --version 2>&1` in
12707*GNU*)
12708  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12709*)
12710  ac_count=0
12711  $as_echo_n 0123456789 >"conftest.in"
12712  while :
12713  do
12714    cat "conftest.in" "conftest.in" >"conftest.tmp"
12715    mv "conftest.tmp" "conftest.in"
12716    cp "conftest.in" "conftest.nl"
12717    $as_echo 'EGREP' >> "conftest.nl"
12718    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12719    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12720    as_fn_arith $ac_count + 1 && ac_count=$as_val
12721    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12722      # Best one so far, save it but keep looking for a better one
12723      ac_cv_path_EGREP="$ac_path_EGREP"
12724      ac_path_EGREP_max=$ac_count
12725    fi
12726    # 10*(2^10) chars as input seems more than enough
12727    test $ac_count -gt 10 && break
12728  done
12729  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12730esac
12731
12732      $ac_path_EGREP_found && break 3
12733    done
12734  done
12735  done
12736IFS=$as_save_IFS
12737  if test -z "$ac_cv_path_EGREP"; then
12738    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12739  fi
12740else
12741  ac_cv_path_EGREP=$EGREP
12742fi
12743
12744   fi
12745fi
12746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12747$as_echo "$ac_cv_path_EGREP" >&6; }
12748 EGREP="$ac_cv_path_EGREP"
12749
12750
12751  else
12752    # The variable is set, but is it from the command line or the environment?
12753
12754    # Try to remove the string !EGREP! from our list.
12755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12757      # If it failed, the variable was not from the command line. Ignore it,
12758      # but warn the user (except for BASH, which is always set by the calling BASH).
12759      if test "xEGREP" != xBASH; then
12760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12761$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12762      fi
12763      # Try to locate tool using the code snippet
12764      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12765$as_echo_n "checking for egrep... " >&6; }
12766if ${ac_cv_path_EGREP+:} false; then :
12767  $as_echo_n "(cached) " >&6
12768else
12769  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12770   then ac_cv_path_EGREP="$GREP -E"
12771   else
12772     if test -z "$EGREP"; then
12773  ac_path_EGREP_found=false
12774  # Loop through the user's path and test for each of PROGNAME-LIST
12775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12776for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12777do
12778  IFS=$as_save_IFS
12779  test -z "$as_dir" && as_dir=.
12780    for ac_prog in egrep; do
12781    for ac_exec_ext in '' $ac_executable_extensions; do
12782      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12783      as_fn_executable_p "$ac_path_EGREP" || continue
12784# Check for GNU ac_path_EGREP and select it if it is found.
12785  # Check for GNU $ac_path_EGREP
12786case `"$ac_path_EGREP" --version 2>&1` in
12787*GNU*)
12788  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12789*)
12790  ac_count=0
12791  $as_echo_n 0123456789 >"conftest.in"
12792  while :
12793  do
12794    cat "conftest.in" "conftest.in" >"conftest.tmp"
12795    mv "conftest.tmp" "conftest.in"
12796    cp "conftest.in" "conftest.nl"
12797    $as_echo 'EGREP' >> "conftest.nl"
12798    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12799    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12800    as_fn_arith $ac_count + 1 && ac_count=$as_val
12801    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12802      # Best one so far, save it but keep looking for a better one
12803      ac_cv_path_EGREP="$ac_path_EGREP"
12804      ac_path_EGREP_max=$ac_count
12805    fi
12806    # 10*(2^10) chars as input seems more than enough
12807    test $ac_count -gt 10 && break
12808  done
12809  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12810esac
12811
12812      $ac_path_EGREP_found && break 3
12813    done
12814  done
12815  done
12816IFS=$as_save_IFS
12817  if test -z "$ac_cv_path_EGREP"; then
12818    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12819  fi
12820else
12821  ac_cv_path_EGREP=$EGREP
12822fi
12823
12824   fi
12825fi
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12827$as_echo "$ac_cv_path_EGREP" >&6; }
12828 EGREP="$ac_cv_path_EGREP"
12829
12830
12831    else
12832      # If it succeeded, then it was overridden by the user. We will use it
12833      # for the tool.
12834
12835      # First remove it from the list of overridden variables, so we can test
12836      # for unknown variables in the end.
12837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12838
12839      # Check if we try to supply an empty value
12840      if test "x$EGREP" = x; then
12841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12842$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12844$as_echo_n "checking for EGREP... " >&6; }
12845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12846$as_echo "disabled" >&6; }
12847      else
12848        # Check if the provided tool contains a complete path.
12849        tool_specified="$EGREP"
12850        tool_basename="${tool_specified##*/}"
12851        if test "x$tool_basename" = "x$tool_specified"; then
12852          # A command without a complete path is provided, search $PATH.
12853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12854$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12855          # Extract the first word of "$tool_basename", so it can be a program name with args.
12856set dummy $tool_basename; ac_word=$2
12857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12858$as_echo_n "checking for $ac_word... " >&6; }
12859if ${ac_cv_path_EGREP+:} false; then :
12860  $as_echo_n "(cached) " >&6
12861else
12862  case $EGREP in
12863  [\\/]* | ?:[\\/]*)
12864  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12865  ;;
12866  *)
12867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12868for as_dir in $PATH
12869do
12870  IFS=$as_save_IFS
12871  test -z "$as_dir" && as_dir=.
12872    for ac_exec_ext in '' $ac_executable_extensions; do
12873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12874    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12876    break 2
12877  fi
12878done
12879  done
12880IFS=$as_save_IFS
12881
12882  ;;
12883esac
12884fi
12885EGREP=$ac_cv_path_EGREP
12886if test -n "$EGREP"; then
12887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12888$as_echo "$EGREP" >&6; }
12889else
12890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12891$as_echo "no" >&6; }
12892fi
12893
12894
12895          if test "x$EGREP" = x; then
12896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12897          fi
12898        else
12899          # Otherwise we believe it is a complete path. Use it as it is.
12900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12901$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12903$as_echo_n "checking for EGREP... " >&6; }
12904          if test ! -x "$tool_specified"; then
12905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12906$as_echo "not found" >&6; }
12907            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12908          fi
12909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12910$as_echo "$tool_specified" >&6; }
12911        fi
12912      fi
12913    fi
12914
12915  fi
12916
12917
12918  if test "x$EGREP" = x; then
12919    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12920  fi
12921
12922
12923
12924
12925  # Publish this variable in the help.
12926
12927
12928  if [ -z "${FGREP+x}" ]; then
12929    # The variable is not set by user, try to locate tool using the code snippet
12930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12931$as_echo_n "checking for fgrep... " >&6; }
12932if ${ac_cv_path_FGREP+:} false; then :
12933  $as_echo_n "(cached) " >&6
12934else
12935  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12936   then ac_cv_path_FGREP="$GREP -F"
12937   else
12938     if test -z "$FGREP"; then
12939  ac_path_FGREP_found=false
12940  # Loop through the user's path and test for each of PROGNAME-LIST
12941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12942for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12943do
12944  IFS=$as_save_IFS
12945  test -z "$as_dir" && as_dir=.
12946    for ac_prog in fgrep; do
12947    for ac_exec_ext in '' $ac_executable_extensions; do
12948      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12949      as_fn_executable_p "$ac_path_FGREP" || continue
12950# Check for GNU ac_path_FGREP and select it if it is found.
12951  # Check for GNU $ac_path_FGREP
12952case `"$ac_path_FGREP" --version 2>&1` in
12953*GNU*)
12954  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12955*)
12956  ac_count=0
12957  $as_echo_n 0123456789 >"conftest.in"
12958  while :
12959  do
12960    cat "conftest.in" "conftest.in" >"conftest.tmp"
12961    mv "conftest.tmp" "conftest.in"
12962    cp "conftest.in" "conftest.nl"
12963    $as_echo 'FGREP' >> "conftest.nl"
12964    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12965    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12966    as_fn_arith $ac_count + 1 && ac_count=$as_val
12967    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12968      # Best one so far, save it but keep looking for a better one
12969      ac_cv_path_FGREP="$ac_path_FGREP"
12970      ac_path_FGREP_max=$ac_count
12971    fi
12972    # 10*(2^10) chars as input seems more than enough
12973    test $ac_count -gt 10 && break
12974  done
12975  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12976esac
12977
12978      $ac_path_FGREP_found && break 3
12979    done
12980  done
12981  done
12982IFS=$as_save_IFS
12983  if test -z "$ac_cv_path_FGREP"; then
12984    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12985  fi
12986else
12987  ac_cv_path_FGREP=$FGREP
12988fi
12989
12990   fi
12991fi
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12993$as_echo "$ac_cv_path_FGREP" >&6; }
12994 FGREP="$ac_cv_path_FGREP"
12995
12996
12997  else
12998    # The variable is set, but is it from the command line or the environment?
12999
13000    # Try to remove the string !FGREP! from our list.
13001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13003      # If it failed, the variable was not from the command line. Ignore it,
13004      # but warn the user (except for BASH, which is always set by the calling BASH).
13005      if test "xFGREP" != xBASH; then
13006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13007$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13008      fi
13009      # Try to locate tool using the code snippet
13010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13011$as_echo_n "checking for fgrep... " >&6; }
13012if ${ac_cv_path_FGREP+:} false; then :
13013  $as_echo_n "(cached) " >&6
13014else
13015  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13016   then ac_cv_path_FGREP="$GREP -F"
13017   else
13018     if test -z "$FGREP"; then
13019  ac_path_FGREP_found=false
13020  # Loop through the user's path and test for each of PROGNAME-LIST
13021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13023do
13024  IFS=$as_save_IFS
13025  test -z "$as_dir" && as_dir=.
13026    for ac_prog in fgrep; do
13027    for ac_exec_ext in '' $ac_executable_extensions; do
13028      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13029      as_fn_executable_p "$ac_path_FGREP" || continue
13030# Check for GNU ac_path_FGREP and select it if it is found.
13031  # Check for GNU $ac_path_FGREP
13032case `"$ac_path_FGREP" --version 2>&1` in
13033*GNU*)
13034  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13035*)
13036  ac_count=0
13037  $as_echo_n 0123456789 >"conftest.in"
13038  while :
13039  do
13040    cat "conftest.in" "conftest.in" >"conftest.tmp"
13041    mv "conftest.tmp" "conftest.in"
13042    cp "conftest.in" "conftest.nl"
13043    $as_echo 'FGREP' >> "conftest.nl"
13044    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13045    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13046    as_fn_arith $ac_count + 1 && ac_count=$as_val
13047    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13048      # Best one so far, save it but keep looking for a better one
13049      ac_cv_path_FGREP="$ac_path_FGREP"
13050      ac_path_FGREP_max=$ac_count
13051    fi
13052    # 10*(2^10) chars as input seems more than enough
13053    test $ac_count -gt 10 && break
13054  done
13055  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13056esac
13057
13058      $ac_path_FGREP_found && break 3
13059    done
13060  done
13061  done
13062IFS=$as_save_IFS
13063  if test -z "$ac_cv_path_FGREP"; then
13064    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13065  fi
13066else
13067  ac_cv_path_FGREP=$FGREP
13068fi
13069
13070   fi
13071fi
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13073$as_echo "$ac_cv_path_FGREP" >&6; }
13074 FGREP="$ac_cv_path_FGREP"
13075
13076
13077    else
13078      # If it succeeded, then it was overridden by the user. We will use it
13079      # for the tool.
13080
13081      # First remove it from the list of overridden variables, so we can test
13082      # for unknown variables in the end.
13083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13084
13085      # Check if we try to supply an empty value
13086      if test "x$FGREP" = x; then
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13088$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13090$as_echo_n "checking for FGREP... " >&6; }
13091        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13092$as_echo "disabled" >&6; }
13093      else
13094        # Check if the provided tool contains a complete path.
13095        tool_specified="$FGREP"
13096        tool_basename="${tool_specified##*/}"
13097        if test "x$tool_basename" = "x$tool_specified"; then
13098          # A command without a complete path is provided, search $PATH.
13099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13100$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13101          # Extract the first word of "$tool_basename", so it can be a program name with args.
13102set dummy $tool_basename; ac_word=$2
13103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13104$as_echo_n "checking for $ac_word... " >&6; }
13105if ${ac_cv_path_FGREP+:} false; then :
13106  $as_echo_n "(cached) " >&6
13107else
13108  case $FGREP in
13109  [\\/]* | ?:[\\/]*)
13110  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13111  ;;
13112  *)
13113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13114for as_dir in $PATH
13115do
13116  IFS=$as_save_IFS
13117  test -z "$as_dir" && as_dir=.
13118    for ac_exec_ext in '' $ac_executable_extensions; do
13119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13120    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13122    break 2
13123  fi
13124done
13125  done
13126IFS=$as_save_IFS
13127
13128  ;;
13129esac
13130fi
13131FGREP=$ac_cv_path_FGREP
13132if test -n "$FGREP"; then
13133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13134$as_echo "$FGREP" >&6; }
13135else
13136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13137$as_echo "no" >&6; }
13138fi
13139
13140
13141          if test "x$FGREP" = x; then
13142            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13143          fi
13144        else
13145          # Otherwise we believe it is a complete path. Use it as it is.
13146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13147$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13148          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13149$as_echo_n "checking for FGREP... " >&6; }
13150          if test ! -x "$tool_specified"; then
13151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13152$as_echo "not found" >&6; }
13153            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13154          fi
13155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13156$as_echo "$tool_specified" >&6; }
13157        fi
13158      fi
13159    fi
13160
13161  fi
13162
13163
13164  if test "x$FGREP" = x; then
13165    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13166  fi
13167
13168
13169
13170
13171  # Publish this variable in the help.
13172
13173
13174  if [ -z "${SED+x}" ]; then
13175    # The variable is not set by user, try to locate tool using the code snippet
13176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13177$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13178if ${ac_cv_path_SED+:} false; then :
13179  $as_echo_n "(cached) " >&6
13180else
13181            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13182     for ac_i in 1 2 3 4 5 6 7; do
13183       ac_script="$ac_script$as_nl$ac_script"
13184     done
13185     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13186     { ac_script=; unset ac_script;}
13187     if test -z "$SED"; then
13188  ac_path_SED_found=false
13189  # Loop through the user's path and test for each of PROGNAME-LIST
13190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13191for as_dir in $PATH
13192do
13193  IFS=$as_save_IFS
13194  test -z "$as_dir" && as_dir=.
13195    for ac_prog in sed gsed; do
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13198      as_fn_executable_p "$ac_path_SED" || continue
13199# Check for GNU ac_path_SED and select it if it is found.
13200  # Check for GNU $ac_path_SED
13201case `"$ac_path_SED" --version 2>&1` in
13202*GNU*)
13203  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13204*)
13205  ac_count=0
13206  $as_echo_n 0123456789 >"conftest.in"
13207  while :
13208  do
13209    cat "conftest.in" "conftest.in" >"conftest.tmp"
13210    mv "conftest.tmp" "conftest.in"
13211    cp "conftest.in" "conftest.nl"
13212    $as_echo '' >> "conftest.nl"
13213    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13214    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13215    as_fn_arith $ac_count + 1 && ac_count=$as_val
13216    if test $ac_count -gt ${ac_path_SED_max-0}; then
13217      # Best one so far, save it but keep looking for a better one
13218      ac_cv_path_SED="$ac_path_SED"
13219      ac_path_SED_max=$ac_count
13220    fi
13221    # 10*(2^10) chars as input seems more than enough
13222    test $ac_count -gt 10 && break
13223  done
13224  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13225esac
13226
13227      $ac_path_SED_found && break 3
13228    done
13229  done
13230  done
13231IFS=$as_save_IFS
13232  if test -z "$ac_cv_path_SED"; then
13233    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13234  fi
13235else
13236  ac_cv_path_SED=$SED
13237fi
13238
13239fi
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13241$as_echo "$ac_cv_path_SED" >&6; }
13242 SED="$ac_cv_path_SED"
13243  rm -f conftest.sed
13244
13245  else
13246    # The variable is set, but is it from the command line or the environment?
13247
13248    # Try to remove the string !SED! from our list.
13249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13251      # If it failed, the variable was not from the command line. Ignore it,
13252      # but warn the user (except for BASH, which is always set by the calling BASH).
13253      if test "xSED" != xBASH; then
13254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13255$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13256      fi
13257      # Try to locate tool using the code snippet
13258      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13259$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13260if ${ac_cv_path_SED+:} false; then :
13261  $as_echo_n "(cached) " >&6
13262else
13263            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13264     for ac_i in 1 2 3 4 5 6 7; do
13265       ac_script="$ac_script$as_nl$ac_script"
13266     done
13267     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13268     { ac_script=; unset ac_script;}
13269     if test -z "$SED"; then
13270  ac_path_SED_found=false
13271  # Loop through the user's path and test for each of PROGNAME-LIST
13272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275  IFS=$as_save_IFS
13276  test -z "$as_dir" && as_dir=.
13277    for ac_prog in sed gsed; do
13278    for ac_exec_ext in '' $ac_executable_extensions; do
13279      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13280      as_fn_executable_p "$ac_path_SED" || continue
13281# Check for GNU ac_path_SED and select it if it is found.
13282  # Check for GNU $ac_path_SED
13283case `"$ac_path_SED" --version 2>&1` in
13284*GNU*)
13285  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13286*)
13287  ac_count=0
13288  $as_echo_n 0123456789 >"conftest.in"
13289  while :
13290  do
13291    cat "conftest.in" "conftest.in" >"conftest.tmp"
13292    mv "conftest.tmp" "conftest.in"
13293    cp "conftest.in" "conftest.nl"
13294    $as_echo '' >> "conftest.nl"
13295    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13296    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13297    as_fn_arith $ac_count + 1 && ac_count=$as_val
13298    if test $ac_count -gt ${ac_path_SED_max-0}; then
13299      # Best one so far, save it but keep looking for a better one
13300      ac_cv_path_SED="$ac_path_SED"
13301      ac_path_SED_max=$ac_count
13302    fi
13303    # 10*(2^10) chars as input seems more than enough
13304    test $ac_count -gt 10 && break
13305  done
13306  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13307esac
13308
13309      $ac_path_SED_found && break 3
13310    done
13311  done
13312  done
13313IFS=$as_save_IFS
13314  if test -z "$ac_cv_path_SED"; then
13315    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13316  fi
13317else
13318  ac_cv_path_SED=$SED
13319fi
13320
13321fi
13322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13323$as_echo "$ac_cv_path_SED" >&6; }
13324 SED="$ac_cv_path_SED"
13325  rm -f conftest.sed
13326
13327    else
13328      # If it succeeded, then it was overridden by the user. We will use it
13329      # for the tool.
13330
13331      # First remove it from the list of overridden variables, so we can test
13332      # for unknown variables in the end.
13333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13334
13335      # Check if we try to supply an empty value
13336      if test "x$SED" = x; then
13337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13338$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13340$as_echo_n "checking for SED... " >&6; }
13341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13342$as_echo "disabled" >&6; }
13343      else
13344        # Check if the provided tool contains a complete path.
13345        tool_specified="$SED"
13346        tool_basename="${tool_specified##*/}"
13347        if test "x$tool_basename" = "x$tool_specified"; then
13348          # A command without a complete path is provided, search $PATH.
13349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13350$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13351          # Extract the first word of "$tool_basename", so it can be a program name with args.
13352set dummy $tool_basename; ac_word=$2
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13354$as_echo_n "checking for $ac_word... " >&6; }
13355if ${ac_cv_path_SED+:} false; then :
13356  $as_echo_n "(cached) " >&6
13357else
13358  case $SED in
13359  [\\/]* | ?:[\\/]*)
13360  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13361  ;;
13362  *)
13363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13364for as_dir in $PATH
13365do
13366  IFS=$as_save_IFS
13367  test -z "$as_dir" && as_dir=.
13368    for ac_exec_ext in '' $ac_executable_extensions; do
13369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13370    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13372    break 2
13373  fi
13374done
13375  done
13376IFS=$as_save_IFS
13377
13378  ;;
13379esac
13380fi
13381SED=$ac_cv_path_SED
13382if test -n "$SED"; then
13383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13384$as_echo "$SED" >&6; }
13385else
13386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13387$as_echo "no" >&6; }
13388fi
13389
13390
13391          if test "x$SED" = x; then
13392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13393          fi
13394        else
13395          # Otherwise we believe it is a complete path. Use it as it is.
13396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13397$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13399$as_echo_n "checking for SED... " >&6; }
13400          if test ! -x "$tool_specified"; then
13401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13402$as_echo "not found" >&6; }
13403            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13404          fi
13405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13406$as_echo "$tool_specified" >&6; }
13407        fi
13408      fi
13409    fi
13410
13411  fi
13412
13413
13414  if test "x$SED" = x; then
13415    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13416  fi
13417
13418
13419
13420  # Always force rm.
13421  RM="$RM -f"
13422
13423  # pwd behaves differently on various platforms and some don't support the -L flag.
13424  # Always use the bash builtin pwd to get uniform behavior.
13425  THEPWDCMD=pwd
13426
13427  # These are not required on all platforms
13428
13429
13430  # Publish this variable in the help.
13431
13432
13433  if [ -z "${CYGPATH+x}" ]; then
13434    # The variable is not set by user, try to locate tool using the code snippet
13435    for ac_prog in cygpath
13436do
13437  # Extract the first word of "$ac_prog", so it can be a program name with args.
13438set dummy $ac_prog; ac_word=$2
13439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13440$as_echo_n "checking for $ac_word... " >&6; }
13441if ${ac_cv_path_CYGPATH+:} false; then :
13442  $as_echo_n "(cached) " >&6
13443else
13444  case $CYGPATH in
13445  [\\/]* | ?:[\\/]*)
13446  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13447  ;;
13448  *)
13449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13450for as_dir in $PATH
13451do
13452  IFS=$as_save_IFS
13453  test -z "$as_dir" && as_dir=.
13454    for ac_exec_ext in '' $ac_executable_extensions; do
13455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13456    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13458    break 2
13459  fi
13460done
13461  done
13462IFS=$as_save_IFS
13463
13464  ;;
13465esac
13466fi
13467CYGPATH=$ac_cv_path_CYGPATH
13468if test -n "$CYGPATH"; then
13469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13470$as_echo "$CYGPATH" >&6; }
13471else
13472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13473$as_echo "no" >&6; }
13474fi
13475
13476
13477  test -n "$CYGPATH" && break
13478done
13479
13480  else
13481    # The variable is set, but is it from the command line or the environment?
13482
13483    # Try to remove the string !CYGPATH! from our list.
13484    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13485    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13486      # If it failed, the variable was not from the command line. Ignore it,
13487      # but warn the user (except for BASH, which is always set by the calling BASH).
13488      if test "xCYGPATH" != xBASH; then
13489        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13490$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13491      fi
13492      # Try to locate tool using the code snippet
13493      for ac_prog in cygpath
13494do
13495  # Extract the first word of "$ac_prog", so it can be a program name with args.
13496set dummy $ac_prog; ac_word=$2
13497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13498$as_echo_n "checking for $ac_word... " >&6; }
13499if ${ac_cv_path_CYGPATH+:} false; then :
13500  $as_echo_n "(cached) " >&6
13501else
13502  case $CYGPATH in
13503  [\\/]* | ?:[\\/]*)
13504  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13505  ;;
13506  *)
13507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13508for as_dir in $PATH
13509do
13510  IFS=$as_save_IFS
13511  test -z "$as_dir" && as_dir=.
13512    for ac_exec_ext in '' $ac_executable_extensions; do
13513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13514    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13516    break 2
13517  fi
13518done
13519  done
13520IFS=$as_save_IFS
13521
13522  ;;
13523esac
13524fi
13525CYGPATH=$ac_cv_path_CYGPATH
13526if test -n "$CYGPATH"; then
13527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13528$as_echo "$CYGPATH" >&6; }
13529else
13530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13531$as_echo "no" >&6; }
13532fi
13533
13534
13535  test -n "$CYGPATH" && break
13536done
13537
13538    else
13539      # If it succeeded, then it was overridden by the user. We will use it
13540      # for the tool.
13541
13542      # First remove it from the list of overridden variables, so we can test
13543      # for unknown variables in the end.
13544      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13545
13546      # Check if we try to supply an empty value
13547      if test "x$CYGPATH" = x; then
13548        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13549$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13551$as_echo_n "checking for CYGPATH... " >&6; }
13552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13553$as_echo "disabled" >&6; }
13554      else
13555        # Check if the provided tool contains a complete path.
13556        tool_specified="$CYGPATH"
13557        tool_basename="${tool_specified##*/}"
13558        if test "x$tool_basename" = "x$tool_specified"; then
13559          # A command without a complete path is provided, search $PATH.
13560          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13561$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13562          # Extract the first word of "$tool_basename", so it can be a program name with args.
13563set dummy $tool_basename; ac_word=$2
13564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13565$as_echo_n "checking for $ac_word... " >&6; }
13566if ${ac_cv_path_CYGPATH+:} false; then :
13567  $as_echo_n "(cached) " >&6
13568else
13569  case $CYGPATH in
13570  [\\/]* | ?:[\\/]*)
13571  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13572  ;;
13573  *)
13574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13575for as_dir in $PATH
13576do
13577  IFS=$as_save_IFS
13578  test -z "$as_dir" && as_dir=.
13579    for ac_exec_ext in '' $ac_executable_extensions; do
13580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13581    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13583    break 2
13584  fi
13585done
13586  done
13587IFS=$as_save_IFS
13588
13589  ;;
13590esac
13591fi
13592CYGPATH=$ac_cv_path_CYGPATH
13593if test -n "$CYGPATH"; then
13594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13595$as_echo "$CYGPATH" >&6; }
13596else
13597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13598$as_echo "no" >&6; }
13599fi
13600
13601
13602          if test "x$CYGPATH" = x; then
13603            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13604          fi
13605        else
13606          # Otherwise we believe it is a complete path. Use it as it is.
13607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13608$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13610$as_echo_n "checking for CYGPATH... " >&6; }
13611          if test ! -x "$tool_specified"; then
13612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13613$as_echo "not found" >&6; }
13614            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13615          fi
13616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13617$as_echo "$tool_specified" >&6; }
13618        fi
13619      fi
13620    fi
13621
13622  fi
13623
13624
13625
13626
13627  # Publish this variable in the help.
13628
13629
13630  if [ -z "${READLINK+x}" ]; then
13631    # The variable is not set by user, try to locate tool using the code snippet
13632    for ac_prog in greadlink readlink
13633do
13634  # Extract the first word of "$ac_prog", so it can be a program name with args.
13635set dummy $ac_prog; ac_word=$2
13636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13637$as_echo_n "checking for $ac_word... " >&6; }
13638if ${ac_cv_path_READLINK+:} false; then :
13639  $as_echo_n "(cached) " >&6
13640else
13641  case $READLINK in
13642  [\\/]* | ?:[\\/]*)
13643  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13644  ;;
13645  *)
13646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13647for as_dir in $PATH
13648do
13649  IFS=$as_save_IFS
13650  test -z "$as_dir" && as_dir=.
13651    for ac_exec_ext in '' $ac_executable_extensions; do
13652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13653    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13655    break 2
13656  fi
13657done
13658  done
13659IFS=$as_save_IFS
13660
13661  ;;
13662esac
13663fi
13664READLINK=$ac_cv_path_READLINK
13665if test -n "$READLINK"; then
13666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13667$as_echo "$READLINK" >&6; }
13668else
13669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13670$as_echo "no" >&6; }
13671fi
13672
13673
13674  test -n "$READLINK" && break
13675done
13676
13677  else
13678    # The variable is set, but is it from the command line or the environment?
13679
13680    # Try to remove the string !READLINK! from our list.
13681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13683      # If it failed, the variable was not from the command line. Ignore it,
13684      # but warn the user (except for BASH, which is always set by the calling BASH).
13685      if test "xREADLINK" != xBASH; then
13686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13687$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13688      fi
13689      # Try to locate tool using the code snippet
13690      for ac_prog in greadlink readlink
13691do
13692  # Extract the first word of "$ac_prog", so it can be a program name with args.
13693set dummy $ac_prog; ac_word=$2
13694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13695$as_echo_n "checking for $ac_word... " >&6; }
13696if ${ac_cv_path_READLINK+:} false; then :
13697  $as_echo_n "(cached) " >&6
13698else
13699  case $READLINK in
13700  [\\/]* | ?:[\\/]*)
13701  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13702  ;;
13703  *)
13704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13705for as_dir in $PATH
13706do
13707  IFS=$as_save_IFS
13708  test -z "$as_dir" && as_dir=.
13709    for ac_exec_ext in '' $ac_executable_extensions; do
13710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13711    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13713    break 2
13714  fi
13715done
13716  done
13717IFS=$as_save_IFS
13718
13719  ;;
13720esac
13721fi
13722READLINK=$ac_cv_path_READLINK
13723if test -n "$READLINK"; then
13724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13725$as_echo "$READLINK" >&6; }
13726else
13727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13728$as_echo "no" >&6; }
13729fi
13730
13731
13732  test -n "$READLINK" && break
13733done
13734
13735    else
13736      # If it succeeded, then it was overridden by the user. We will use it
13737      # for the tool.
13738
13739      # First remove it from the list of overridden variables, so we can test
13740      # for unknown variables in the end.
13741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13742
13743      # Check if we try to supply an empty value
13744      if test "x$READLINK" = x; then
13745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13746$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13748$as_echo_n "checking for READLINK... " >&6; }
13749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13750$as_echo "disabled" >&6; }
13751      else
13752        # Check if the provided tool contains a complete path.
13753        tool_specified="$READLINK"
13754        tool_basename="${tool_specified##*/}"
13755        if test "x$tool_basename" = "x$tool_specified"; then
13756          # A command without a complete path is provided, search $PATH.
13757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13758$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13759          # Extract the first word of "$tool_basename", so it can be a program name with args.
13760set dummy $tool_basename; ac_word=$2
13761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13762$as_echo_n "checking for $ac_word... " >&6; }
13763if ${ac_cv_path_READLINK+:} false; then :
13764  $as_echo_n "(cached) " >&6
13765else
13766  case $READLINK in
13767  [\\/]* | ?:[\\/]*)
13768  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13769  ;;
13770  *)
13771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13772for as_dir in $PATH
13773do
13774  IFS=$as_save_IFS
13775  test -z "$as_dir" && as_dir=.
13776    for ac_exec_ext in '' $ac_executable_extensions; do
13777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13778    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13780    break 2
13781  fi
13782done
13783  done
13784IFS=$as_save_IFS
13785
13786  ;;
13787esac
13788fi
13789READLINK=$ac_cv_path_READLINK
13790if test -n "$READLINK"; then
13791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13792$as_echo "$READLINK" >&6; }
13793else
13794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13795$as_echo "no" >&6; }
13796fi
13797
13798
13799          if test "x$READLINK" = x; then
13800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13801          fi
13802        else
13803          # Otherwise we believe it is a complete path. Use it as it is.
13804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13805$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13807$as_echo_n "checking for READLINK... " >&6; }
13808          if test ! -x "$tool_specified"; then
13809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13810$as_echo "not found" >&6; }
13811            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13812          fi
13813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13814$as_echo "$tool_specified" >&6; }
13815        fi
13816      fi
13817    fi
13818
13819  fi
13820
13821
13822
13823
13824  # Publish this variable in the help.
13825
13826
13827  if [ -z "${DF+x}" ]; then
13828    # The variable is not set by user, try to locate tool using the code snippet
13829    for ac_prog in df
13830do
13831  # Extract the first word of "$ac_prog", so it can be a program name with args.
13832set dummy $ac_prog; ac_word=$2
13833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13834$as_echo_n "checking for $ac_word... " >&6; }
13835if ${ac_cv_path_DF+:} false; then :
13836  $as_echo_n "(cached) " >&6
13837else
13838  case $DF in
13839  [\\/]* | ?:[\\/]*)
13840  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13841  ;;
13842  *)
13843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13844for as_dir in $PATH
13845do
13846  IFS=$as_save_IFS
13847  test -z "$as_dir" && as_dir=.
13848    for ac_exec_ext in '' $ac_executable_extensions; do
13849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13850    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13852    break 2
13853  fi
13854done
13855  done
13856IFS=$as_save_IFS
13857
13858  ;;
13859esac
13860fi
13861DF=$ac_cv_path_DF
13862if test -n "$DF"; then
13863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13864$as_echo "$DF" >&6; }
13865else
13866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13867$as_echo "no" >&6; }
13868fi
13869
13870
13871  test -n "$DF" && break
13872done
13873
13874  else
13875    # The variable is set, but is it from the command line or the environment?
13876
13877    # Try to remove the string !DF! from our list.
13878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13880      # If it failed, the variable was not from the command line. Ignore it,
13881      # but warn the user (except for BASH, which is always set by the calling BASH).
13882      if test "xDF" != xBASH; then
13883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13884$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13885      fi
13886      # Try to locate tool using the code snippet
13887      for ac_prog in df
13888do
13889  # Extract the first word of "$ac_prog", so it can be a program name with args.
13890set dummy $ac_prog; ac_word=$2
13891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13892$as_echo_n "checking for $ac_word... " >&6; }
13893if ${ac_cv_path_DF+:} false; then :
13894  $as_echo_n "(cached) " >&6
13895else
13896  case $DF in
13897  [\\/]* | ?:[\\/]*)
13898  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13899  ;;
13900  *)
13901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13902for as_dir in $PATH
13903do
13904  IFS=$as_save_IFS
13905  test -z "$as_dir" && as_dir=.
13906    for ac_exec_ext in '' $ac_executable_extensions; do
13907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13908    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13910    break 2
13911  fi
13912done
13913  done
13914IFS=$as_save_IFS
13915
13916  ;;
13917esac
13918fi
13919DF=$ac_cv_path_DF
13920if test -n "$DF"; then
13921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13922$as_echo "$DF" >&6; }
13923else
13924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13925$as_echo "no" >&6; }
13926fi
13927
13928
13929  test -n "$DF" && break
13930done
13931
13932    else
13933      # If it succeeded, then it was overridden by the user. We will use it
13934      # for the tool.
13935
13936      # First remove it from the list of overridden variables, so we can test
13937      # for unknown variables in the end.
13938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13939
13940      # Check if we try to supply an empty value
13941      if test "x$DF" = x; then
13942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
13943$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
13944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13945$as_echo_n "checking for DF... " >&6; }
13946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13947$as_echo "disabled" >&6; }
13948      else
13949        # Check if the provided tool contains a complete path.
13950        tool_specified="$DF"
13951        tool_basename="${tool_specified##*/}"
13952        if test "x$tool_basename" = "x$tool_specified"; then
13953          # A command without a complete path is provided, search $PATH.
13954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13955$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13956          # Extract the first word of "$tool_basename", so it can be a program name with args.
13957set dummy $tool_basename; ac_word=$2
13958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13959$as_echo_n "checking for $ac_word... " >&6; }
13960if ${ac_cv_path_DF+:} false; then :
13961  $as_echo_n "(cached) " >&6
13962else
13963  case $DF in
13964  [\\/]* | ?:[\\/]*)
13965  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13966  ;;
13967  *)
13968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13969for as_dir in $PATH
13970do
13971  IFS=$as_save_IFS
13972  test -z "$as_dir" && as_dir=.
13973    for ac_exec_ext in '' $ac_executable_extensions; do
13974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13975    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13977    break 2
13978  fi
13979done
13980  done
13981IFS=$as_save_IFS
13982
13983  ;;
13984esac
13985fi
13986DF=$ac_cv_path_DF
13987if test -n "$DF"; then
13988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13989$as_echo "$DF" >&6; }
13990else
13991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13992$as_echo "no" >&6; }
13993fi
13994
13995
13996          if test "x$DF" = x; then
13997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13998          fi
13999        else
14000          # Otherwise we believe it is a complete path. Use it as it is.
14001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14002$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14004$as_echo_n "checking for DF... " >&6; }
14005          if test ! -x "$tool_specified"; then
14006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14007$as_echo "not found" >&6; }
14008            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14009          fi
14010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14011$as_echo "$tool_specified" >&6; }
14012        fi
14013      fi
14014    fi
14015
14016  fi
14017
14018
14019
14020
14021  # Publish this variable in the help.
14022
14023
14024  if [ -z "${CPIO+x}" ]; then
14025    # The variable is not set by user, try to locate tool using the code snippet
14026    for ac_prog in cpio bsdcpio
14027do
14028  # Extract the first word of "$ac_prog", so it can be a program name with args.
14029set dummy $ac_prog; ac_word=$2
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14031$as_echo_n "checking for $ac_word... " >&6; }
14032if ${ac_cv_path_CPIO+:} false; then :
14033  $as_echo_n "(cached) " >&6
14034else
14035  case $CPIO in
14036  [\\/]* | ?:[\\/]*)
14037  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14038  ;;
14039  *)
14040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14041for as_dir in $PATH
14042do
14043  IFS=$as_save_IFS
14044  test -z "$as_dir" && as_dir=.
14045    for ac_exec_ext in '' $ac_executable_extensions; do
14046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14047    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14049    break 2
14050  fi
14051done
14052  done
14053IFS=$as_save_IFS
14054
14055  ;;
14056esac
14057fi
14058CPIO=$ac_cv_path_CPIO
14059if test -n "$CPIO"; then
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14061$as_echo "$CPIO" >&6; }
14062else
14063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14064$as_echo "no" >&6; }
14065fi
14066
14067
14068  test -n "$CPIO" && break
14069done
14070
14071  else
14072    # The variable is set, but is it from the command line or the environment?
14073
14074    # Try to remove the string !CPIO! from our list.
14075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14077      # If it failed, the variable was not from the command line. Ignore it,
14078      # but warn the user (except for BASH, which is always set by the calling BASH).
14079      if test "xCPIO" != xBASH; then
14080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14081$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14082      fi
14083      # Try to locate tool using the code snippet
14084      for ac_prog in cpio bsdcpio
14085do
14086  # Extract the first word of "$ac_prog", so it can be a program name with args.
14087set dummy $ac_prog; ac_word=$2
14088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14089$as_echo_n "checking for $ac_word... " >&6; }
14090if ${ac_cv_path_CPIO+:} false; then :
14091  $as_echo_n "(cached) " >&6
14092else
14093  case $CPIO in
14094  [\\/]* | ?:[\\/]*)
14095  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14096  ;;
14097  *)
14098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14099for as_dir in $PATH
14100do
14101  IFS=$as_save_IFS
14102  test -z "$as_dir" && as_dir=.
14103    for ac_exec_ext in '' $ac_executable_extensions; do
14104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14105    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14107    break 2
14108  fi
14109done
14110  done
14111IFS=$as_save_IFS
14112
14113  ;;
14114esac
14115fi
14116CPIO=$ac_cv_path_CPIO
14117if test -n "$CPIO"; then
14118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14119$as_echo "$CPIO" >&6; }
14120else
14121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14122$as_echo "no" >&6; }
14123fi
14124
14125
14126  test -n "$CPIO" && break
14127done
14128
14129    else
14130      # If it succeeded, then it was overridden by the user. We will use it
14131      # for the tool.
14132
14133      # First remove it from the list of overridden variables, so we can test
14134      # for unknown variables in the end.
14135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14136
14137      # Check if we try to supply an empty value
14138      if test "x$CPIO" = x; then
14139        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14140$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14141        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14142$as_echo_n "checking for CPIO... " >&6; }
14143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14144$as_echo "disabled" >&6; }
14145      else
14146        # Check if the provided tool contains a complete path.
14147        tool_specified="$CPIO"
14148        tool_basename="${tool_specified##*/}"
14149        if test "x$tool_basename" = "x$tool_specified"; then
14150          # A command without a complete path is provided, search $PATH.
14151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14152$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14153          # Extract the first word of "$tool_basename", so it can be a program name with args.
14154set dummy $tool_basename; ac_word=$2
14155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14156$as_echo_n "checking for $ac_word... " >&6; }
14157if ${ac_cv_path_CPIO+:} false; then :
14158  $as_echo_n "(cached) " >&6
14159else
14160  case $CPIO in
14161  [\\/]* | ?:[\\/]*)
14162  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14163  ;;
14164  *)
14165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14166for as_dir in $PATH
14167do
14168  IFS=$as_save_IFS
14169  test -z "$as_dir" && as_dir=.
14170    for ac_exec_ext in '' $ac_executable_extensions; do
14171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14172    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14174    break 2
14175  fi
14176done
14177  done
14178IFS=$as_save_IFS
14179
14180  ;;
14181esac
14182fi
14183CPIO=$ac_cv_path_CPIO
14184if test -n "$CPIO"; then
14185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14186$as_echo "$CPIO" >&6; }
14187else
14188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14189$as_echo "no" >&6; }
14190fi
14191
14192
14193          if test "x$CPIO" = x; then
14194            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14195          fi
14196        else
14197          # Otherwise we believe it is a complete path. Use it as it is.
14198          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14199$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14200          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14201$as_echo_n "checking for CPIO... " >&6; }
14202          if test ! -x "$tool_specified"; then
14203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14204$as_echo "not found" >&6; }
14205            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14206          fi
14207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14208$as_echo "$tool_specified" >&6; }
14209        fi
14210      fi
14211    fi
14212
14213  fi
14214
14215
14216
14217
14218  # Publish this variable in the help.
14219
14220
14221  if [ -z "${NICE+x}" ]; then
14222    # The variable is not set by user, try to locate tool using the code snippet
14223    for ac_prog in nice
14224do
14225  # Extract the first word of "$ac_prog", so it can be a program name with args.
14226set dummy $ac_prog; ac_word=$2
14227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14228$as_echo_n "checking for $ac_word... " >&6; }
14229if ${ac_cv_path_NICE+:} false; then :
14230  $as_echo_n "(cached) " >&6
14231else
14232  case $NICE in
14233  [\\/]* | ?:[\\/]*)
14234  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14235  ;;
14236  *)
14237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14238for as_dir in $PATH
14239do
14240  IFS=$as_save_IFS
14241  test -z "$as_dir" && as_dir=.
14242    for ac_exec_ext in '' $ac_executable_extensions; do
14243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14244    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14246    break 2
14247  fi
14248done
14249  done
14250IFS=$as_save_IFS
14251
14252  ;;
14253esac
14254fi
14255NICE=$ac_cv_path_NICE
14256if test -n "$NICE"; then
14257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14258$as_echo "$NICE" >&6; }
14259else
14260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14261$as_echo "no" >&6; }
14262fi
14263
14264
14265  test -n "$NICE" && break
14266done
14267
14268  else
14269    # The variable is set, but is it from the command line or the environment?
14270
14271    # Try to remove the string !NICE! from our list.
14272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14274      # If it failed, the variable was not from the command line. Ignore it,
14275      # but warn the user (except for BASH, which is always set by the calling BASH).
14276      if test "xNICE" != xBASH; then
14277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14278$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14279      fi
14280      # Try to locate tool using the code snippet
14281      for ac_prog in nice
14282do
14283  # Extract the first word of "$ac_prog", so it can be a program name with args.
14284set dummy $ac_prog; ac_word=$2
14285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14286$as_echo_n "checking for $ac_word... " >&6; }
14287if ${ac_cv_path_NICE+:} false; then :
14288  $as_echo_n "(cached) " >&6
14289else
14290  case $NICE in
14291  [\\/]* | ?:[\\/]*)
14292  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14293  ;;
14294  *)
14295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14296for as_dir in $PATH
14297do
14298  IFS=$as_save_IFS
14299  test -z "$as_dir" && as_dir=.
14300    for ac_exec_ext in '' $ac_executable_extensions; do
14301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14302    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14304    break 2
14305  fi
14306done
14307  done
14308IFS=$as_save_IFS
14309
14310  ;;
14311esac
14312fi
14313NICE=$ac_cv_path_NICE
14314if test -n "$NICE"; then
14315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14316$as_echo "$NICE" >&6; }
14317else
14318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14319$as_echo "no" >&6; }
14320fi
14321
14322
14323  test -n "$NICE" && break
14324done
14325
14326    else
14327      # If it succeeded, then it was overridden by the user. We will use it
14328      # for the tool.
14329
14330      # First remove it from the list of overridden variables, so we can test
14331      # for unknown variables in the end.
14332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14333
14334      # Check if we try to supply an empty value
14335      if test "x$NICE" = x; then
14336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14337$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14339$as_echo_n "checking for NICE... " >&6; }
14340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14341$as_echo "disabled" >&6; }
14342      else
14343        # Check if the provided tool contains a complete path.
14344        tool_specified="$NICE"
14345        tool_basename="${tool_specified##*/}"
14346        if test "x$tool_basename" = "x$tool_specified"; then
14347          # A command without a complete path is provided, search $PATH.
14348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14349$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14350          # Extract the first word of "$tool_basename", so it can be a program name with args.
14351set dummy $tool_basename; ac_word=$2
14352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14353$as_echo_n "checking for $ac_word... " >&6; }
14354if ${ac_cv_path_NICE+:} false; then :
14355  $as_echo_n "(cached) " >&6
14356else
14357  case $NICE in
14358  [\\/]* | ?:[\\/]*)
14359  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14360  ;;
14361  *)
14362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14363for as_dir in $PATH
14364do
14365  IFS=$as_save_IFS
14366  test -z "$as_dir" && as_dir=.
14367    for ac_exec_ext in '' $ac_executable_extensions; do
14368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14369    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14371    break 2
14372  fi
14373done
14374  done
14375IFS=$as_save_IFS
14376
14377  ;;
14378esac
14379fi
14380NICE=$ac_cv_path_NICE
14381if test -n "$NICE"; then
14382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14383$as_echo "$NICE" >&6; }
14384else
14385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14386$as_echo "no" >&6; }
14387fi
14388
14389
14390          if test "x$NICE" = x; then
14391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14392          fi
14393        else
14394          # Otherwise we believe it is a complete path. Use it as it is.
14395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14396$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14398$as_echo_n "checking for NICE... " >&6; }
14399          if test ! -x "$tool_specified"; then
14400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14401$as_echo "not found" >&6; }
14402            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14403          fi
14404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14405$as_echo "$tool_specified" >&6; }
14406        fi
14407      fi
14408    fi
14409
14410  fi
14411
14412
14413
14414
14415# Now we can determine OpenJDK build and target platforms. This is required to
14416# have early on.
14417# Make sure we can run config.sub.
14418$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14419  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14420
14421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14422$as_echo_n "checking build system type... " >&6; }
14423if ${ac_cv_build+:} false; then :
14424  $as_echo_n "(cached) " >&6
14425else
14426  ac_build_alias=$build_alias
14427test "x$ac_build_alias" = x &&
14428  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14429test "x$ac_build_alias" = x &&
14430  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14431ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14432  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14433
14434fi
14435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14436$as_echo "$ac_cv_build" >&6; }
14437case $ac_cv_build in
14438*-*-*) ;;
14439*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14440esac
14441build=$ac_cv_build
14442ac_save_IFS=$IFS; IFS='-'
14443set x $ac_cv_build
14444shift
14445build_cpu=$1
14446build_vendor=$2
14447shift; shift
14448# Remember, the first character of IFS is used to create $*,
14449# except with old shells:
14450build_os=$*
14451IFS=$ac_save_IFS
14452case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14453
14454
14455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14456$as_echo_n "checking host system type... " >&6; }
14457if ${ac_cv_host+:} false; then :
14458  $as_echo_n "(cached) " >&6
14459else
14460  if test "x$host_alias" = x; then
14461  ac_cv_host=$ac_cv_build
14462else
14463  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14464    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14465fi
14466
14467fi
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14469$as_echo "$ac_cv_host" >&6; }
14470case $ac_cv_host in
14471*-*-*) ;;
14472*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14473esac
14474host=$ac_cv_host
14475ac_save_IFS=$IFS; IFS='-'
14476set x $ac_cv_host
14477shift
14478host_cpu=$1
14479host_vendor=$2
14480shift; shift
14481# Remember, the first character of IFS is used to create $*,
14482# except with old shells:
14483host_os=$*
14484IFS=$ac_save_IFS
14485case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14486
14487
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14489$as_echo_n "checking target system type... " >&6; }
14490if ${ac_cv_target+:} false; then :
14491  $as_echo_n "(cached) " >&6
14492else
14493  if test "x$target_alias" = x; then
14494  ac_cv_target=$ac_cv_host
14495else
14496  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14497    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14498fi
14499
14500fi
14501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14502$as_echo "$ac_cv_target" >&6; }
14503case $ac_cv_target in
14504*-*-*) ;;
14505*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14506esac
14507target=$ac_cv_target
14508ac_save_IFS=$IFS; IFS='-'
14509set x $ac_cv_target
14510shift
14511target_cpu=$1
14512target_vendor=$2
14513shift; shift
14514# Remember, the first character of IFS is used to create $*,
14515# except with old shells:
14516target_os=$*
14517IFS=$ac_save_IFS
14518case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14519
14520
14521# The aliases save the names the user supplied, while $host etc.
14522# will get canonicalized.
14523test -n "$target_alias" &&
14524  test "$program_prefix$program_suffix$program_transform_name" = \
14525    NONENONEs,x,x, &&
14526  program_prefix=${target_alias}-
14527
14528  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14529  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14530  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14531  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14532  # to use the configure naming style.
14533
14534
14535
14536
14537
14538  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14539  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14540  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14541  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14542  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14543  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14544
14545
14546
14547  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14548
14549  case "$build_os" in
14550    *linux*)
14551      VAR_OS=linux
14552      VAR_OS_TYPE=unix
14553      ;;
14554    *solaris*)
14555      VAR_OS=solaris
14556      VAR_OS_TYPE=unix
14557      ;;
14558    *darwin*)
14559      VAR_OS=macosx
14560      VAR_OS_TYPE=unix
14561      ;;
14562    *bsd*)
14563      VAR_OS=bsd
14564      VAR_OS_TYPE=unix
14565      ;;
14566    *cygwin*)
14567      VAR_OS=windows
14568      VAR_OS_ENV=windows.cygwin
14569      ;;
14570    *mingw*)
14571      VAR_OS=windows
14572      VAR_OS_ENV=windows.msys
14573      ;;
14574    *aix*)
14575      VAR_OS=aix
14576      VAR_OS_TYPE=unix
14577      ;;
14578    *)
14579      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14580      ;;
14581  esac
14582
14583
14584  # First argument is the cpu name from the trip/quad
14585  case "$build_cpu" in
14586    x86_64)
14587      VAR_CPU=x86_64
14588      VAR_CPU_ARCH=x86
14589      VAR_CPU_BITS=64
14590      VAR_CPU_ENDIAN=little
14591      ;;
14592    i?86)
14593      VAR_CPU=x86
14594      VAR_CPU_ARCH=x86
14595      VAR_CPU_BITS=32
14596      VAR_CPU_ENDIAN=little
14597      ;;
14598    arm*)
14599      VAR_CPU=arm
14600      VAR_CPU_ARCH=arm
14601      VAR_CPU_BITS=32
14602      VAR_CPU_ENDIAN=little
14603      ;;
14604    aarch64)
14605      VAR_CPU=aarch64
14606      VAR_CPU_ARCH=aarch64
14607      VAR_CPU_BITS=64
14608      VAR_CPU_ENDIAN=little
14609      ;;
14610    powerpc)
14611      VAR_CPU=ppc
14612      VAR_CPU_ARCH=ppc
14613      VAR_CPU_BITS=32
14614      VAR_CPU_ENDIAN=big
14615      ;;
14616    powerpc64)
14617      VAR_CPU=ppc64
14618      VAR_CPU_ARCH=ppc
14619      VAR_CPU_BITS=64
14620      VAR_CPU_ENDIAN=big
14621      ;;
14622    powerpc64le)
14623      VAR_CPU=ppc64
14624      VAR_CPU_ARCH=ppc
14625      VAR_CPU_BITS=64
14626      VAR_CPU_ENDIAN=little
14627      ;;
14628    s390)
14629      VAR_CPU=s390
14630      VAR_CPU_ARCH=s390
14631      VAR_CPU_BITS=32
14632      VAR_CPU_ENDIAN=big
14633      ;;
14634    s390x)
14635      VAR_CPU=s390x
14636      VAR_CPU_ARCH=s390
14637      VAR_CPU_BITS=64
14638      VAR_CPU_ENDIAN=big
14639      ;;
14640    sparc)
14641      VAR_CPU=sparc
14642      VAR_CPU_ARCH=sparc
14643      VAR_CPU_BITS=32
14644      VAR_CPU_ENDIAN=big
14645      ;;
14646    sparcv9|sparc64)
14647      VAR_CPU=sparcv9
14648      VAR_CPU_ARCH=sparc
14649      VAR_CPU_BITS=64
14650      VAR_CPU_ENDIAN=big
14651      ;;
14652    *)
14653      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14654      ;;
14655  esac
14656
14657  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14658  OPENJDK_BUILD_OS="$VAR_OS"
14659  if test "x$VAR_OS_TYPE" != x; then
14660    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14661  else
14662    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14663  fi
14664  if test "x$VAR_OS_ENV" != x; then
14665    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14666  else
14667    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14668  fi
14669  OPENJDK_BUILD_CPU="$VAR_CPU"
14670  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14671  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14672  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14673
14674
14675
14676
14677
14678
14679
14680
14681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14682$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14684$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14685
14686  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14687
14688  case "$host_os" in
14689    *linux*)
14690      VAR_OS=linux
14691      VAR_OS_TYPE=unix
14692      ;;
14693    *solaris*)
14694      VAR_OS=solaris
14695      VAR_OS_TYPE=unix
14696      ;;
14697    *darwin*)
14698      VAR_OS=macosx
14699      VAR_OS_TYPE=unix
14700      ;;
14701    *bsd*)
14702      VAR_OS=bsd
14703      VAR_OS_TYPE=unix
14704      ;;
14705    *cygwin*)
14706      VAR_OS=windows
14707      VAR_OS_ENV=windows.cygwin
14708      ;;
14709    *mingw*)
14710      VAR_OS=windows
14711      VAR_OS_ENV=windows.msys
14712      ;;
14713    *aix*)
14714      VAR_OS=aix
14715      VAR_OS_TYPE=unix
14716      ;;
14717    *)
14718      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14719      ;;
14720  esac
14721
14722
14723  # First argument is the cpu name from the trip/quad
14724  case "$host_cpu" in
14725    x86_64)
14726      VAR_CPU=x86_64
14727      VAR_CPU_ARCH=x86
14728      VAR_CPU_BITS=64
14729      VAR_CPU_ENDIAN=little
14730      ;;
14731    i?86)
14732      VAR_CPU=x86
14733      VAR_CPU_ARCH=x86
14734      VAR_CPU_BITS=32
14735      VAR_CPU_ENDIAN=little
14736      ;;
14737    arm*)
14738      VAR_CPU=arm
14739      VAR_CPU_ARCH=arm
14740      VAR_CPU_BITS=32
14741      VAR_CPU_ENDIAN=little
14742      ;;
14743    aarch64)
14744      VAR_CPU=aarch64
14745      VAR_CPU_ARCH=aarch64
14746      VAR_CPU_BITS=64
14747      VAR_CPU_ENDIAN=little
14748      ;;
14749    powerpc)
14750      VAR_CPU=ppc
14751      VAR_CPU_ARCH=ppc
14752      VAR_CPU_BITS=32
14753      VAR_CPU_ENDIAN=big
14754      ;;
14755    powerpc64)
14756      VAR_CPU=ppc64
14757      VAR_CPU_ARCH=ppc
14758      VAR_CPU_BITS=64
14759      VAR_CPU_ENDIAN=big
14760      ;;
14761    powerpc64le)
14762      VAR_CPU=ppc64
14763      VAR_CPU_ARCH=ppc
14764      VAR_CPU_BITS=64
14765      VAR_CPU_ENDIAN=little
14766      ;;
14767    s390)
14768      VAR_CPU=s390
14769      VAR_CPU_ARCH=s390
14770      VAR_CPU_BITS=32
14771      VAR_CPU_ENDIAN=big
14772      ;;
14773    s390x)
14774      VAR_CPU=s390x
14775      VAR_CPU_ARCH=s390
14776      VAR_CPU_BITS=64
14777      VAR_CPU_ENDIAN=big
14778      ;;
14779    sparc)
14780      VAR_CPU=sparc
14781      VAR_CPU_ARCH=sparc
14782      VAR_CPU_BITS=32
14783      VAR_CPU_ENDIAN=big
14784      ;;
14785    sparcv9|sparc64)
14786      VAR_CPU=sparcv9
14787      VAR_CPU_ARCH=sparc
14788      VAR_CPU_BITS=64
14789      VAR_CPU_ENDIAN=big
14790      ;;
14791    *)
14792      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14793      ;;
14794  esac
14795
14796  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14797  OPENJDK_TARGET_OS="$VAR_OS"
14798  if test "x$VAR_OS_TYPE" != x; then
14799    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14800  else
14801    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14802  fi
14803  if test "x$VAR_OS_ENV" != x; then
14804    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14805  else
14806    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14807  fi
14808  OPENJDK_TARGET_CPU="$VAR_CPU"
14809  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14810  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14811  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14812
14813
14814
14815
14816
14817
14818
14819
14820  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14821$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14823$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14824
14825
14826
14827# Check whether --with-target-bits was given.
14828if test "${with_target_bits+set}" = set; then :
14829  withval=$with_target_bits;
14830fi
14831
14832
14833  # We have three types of compiles:
14834  # native  == normal compilation, target system == build system
14835  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14836  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14837  #
14838  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14839    # We're doing a proper cross-compilation
14840    COMPILE_TYPE="cross"
14841  else
14842    COMPILE_TYPE="native"
14843  fi
14844
14845  if test "x$with_target_bits" != x; then
14846    if test "x$COMPILE_TYPE" = "xcross"; then
14847      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14848    fi
14849
14850    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14851      # A reduced build is requested
14852      COMPILE_TYPE="reduced"
14853      OPENJDK_TARGET_CPU_BITS=32
14854      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14855        OPENJDK_TARGET_CPU=x86
14856      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14857        OPENJDK_TARGET_CPU=sparc
14858      else
14859        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14860      fi
14861    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14862      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
14863    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14864      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14865$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14866    else
14867      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14868    fi
14869  fi
14870
14871
14872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14873$as_echo_n "checking compilation type... " >&6; }
14874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14875$as_echo "$COMPILE_TYPE" >&6; }
14876
14877
14878  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14879    REQUIRED_OS_NAME=SunOS
14880    REQUIRED_OS_VERSION=5.10
14881  fi
14882  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14883    REQUIRED_OS_NAME=Linux
14884    REQUIRED_OS_VERSION=2.6
14885  fi
14886  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14887    REQUIRED_OS_NAME=Windows
14888    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14889      REQUIRED_OS_VERSION=5.2
14890    else
14891      REQUIRED_OS_VERSION=5.1
14892    fi
14893  fi
14894  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14895    REQUIRED_OS_NAME=Darwin
14896    REQUIRED_OS_VERSION=11.2
14897  fi
14898
14899
14900
14901
14902
14903  # Also store the legacy naming of the cpu.
14904  # Ie i586 and amd64 instead of x86 and x86_64
14905  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14906  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14907    OPENJDK_TARGET_CPU_LEGACY="i586"
14908  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14909    # On all platforms except MacOSX replace x86_64 with amd64.
14910    OPENJDK_TARGET_CPU_LEGACY="amd64"
14911  fi
14912
14913
14914  # And the second legacy naming of the cpu.
14915  # Ie i386 and amd64 instead of x86 and x86_64.
14916  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14917  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14918    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14919  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14920    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14921  fi
14922
14923
14924  # This is the name of the cpu (but using i386 and amd64 instead of
14925  # x86 and x86_64, respectively), preceeded by a /, to be used when
14926  # locating libraries. On macosx, it's empty, though.
14927  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
14928  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14929    OPENJDK_TARGET_CPU_LIBDIR=""
14930  fi
14931
14932
14933  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
14934  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
14935  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
14936  OPENJDK_TARGET_CPU_ISADIR=""
14937  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14938    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14939      OPENJDK_TARGET_CPU_ISADIR="/amd64"
14940    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
14941      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
14942    fi
14943  fi
14944
14945
14946  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
14947  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
14948  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
14949    # On linux only, we replace x86 with i386.
14950    OPENJDK_TARGET_CPU_OSARCH="i386"
14951  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14952    # On all platforms except macosx, we replace x86_64 with amd64.
14953    OPENJDK_TARGET_CPU_OSARCH="amd64"
14954  fi
14955
14956
14957  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
14958  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14959    OPENJDK_TARGET_CPU_JLI="i386"
14960  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14961    # On all platforms except macosx, we replace x86_64 with amd64.
14962    OPENJDK_TARGET_CPU_JLI="amd64"
14963  fi
14964  # Now setup the -D flags for building libjli.
14965  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
14966  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
14967    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
14968      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
14969    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
14970      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
14971    fi
14972  fi
14973
14974
14975  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
14976      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14977  else
14978      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14979  fi
14980
14981
14982  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14983    A_LP64="LP64:="
14984    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14985    # unpack200.exe
14986    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14987      ADD_LP64="-D_LP64=1"
14988    fi
14989  fi
14990  LP64=$A_LP64
14991
14992
14993  if test "x$COMPILE_TYPE" = "xcross"; then
14994    # FIXME: ... or should this include reduced builds..?
14995    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14996  else
14997    DEFINE_CROSS_COMPILE_ARCH=""
14998  fi
14999
15000
15001  # ZERO_ARCHDEF is used to enable architecture-specific code
15002  case "${OPENJDK_TARGET_CPU}" in
15003    ppc)     ZERO_ARCHDEF=PPC32 ;;
15004    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15005    s390*)   ZERO_ARCHDEF=S390  ;;
15006    sparc*)  ZERO_ARCHDEF=SPARC ;;
15007    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15008    x86)     ZERO_ARCHDEF=IA32  ;;
15009    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15010  esac
15011
15012
15013
15014
15015# Continue setting up basic stuff. Most remaining code require fundamental tools.
15016
15017  # Save the current directory this script was started from
15018  CURDIR="$PWD"
15019
15020  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15021  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15022  # was not available at that time.
15023  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15024  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15025    ORIGINAL_PATH="$REWRITTEN_PATH"
15026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15027$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15028  fi
15029
15030  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15031    PATH_SEP=";"
15032
15033  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15034  if test $SRC_ROOT_LENGTH -gt 100; then
15035    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15036  fi
15037
15038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15039    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15040$as_echo_n "checking cygwin release... " >&6; }
15041    CYGWIN_VERSION=`$UNAME -r`
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15043$as_echo "$CYGWIN_VERSION" >&6; }
15044    WINDOWS_ENV_VENDOR='cygwin'
15045    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15046
15047    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15048    if test "x$CYGWIN_VERSION_OLD" != x; then
15049      { $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
15050$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;}
15051      as_fn_error $? "Cannot continue" "$LINENO" 5
15052    fi
15053    if test "x$CYGPATH" = x; then
15054      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15055    fi
15056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15057$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15058    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15059    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15060    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15061    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15063$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15064    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15065    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15066    if test "x$test_cygdrive_prefix" = x; then
15067      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15068    fi
15069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15070    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15071$as_echo_n "checking msys release... " >&6; }
15072    MSYS_VERSION=`$UNAME -r`
15073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15074$as_echo "$MSYS_VERSION" >&6; }
15075
15076    WINDOWS_ENV_VENDOR='msys'
15077    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15078
15079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15080$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15081    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15082    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15083
15084  windows_path="$MSYS_ROOT_PATH"
15085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15086    unix_path=`$CYGPATH -u "$windows_path"`
15087    MSYS_ROOT_PATH="$unix_path"
15088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15090    MSYS_ROOT_PATH="$unix_path"
15091  fi
15092
15093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15094$as_echo "$MSYS_ROOT_PATH" >&6; }
15095    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15096  else
15097    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15098  fi
15099
15100  # Test if windows or unix (cygwin/msys) find is first in path.
15101  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15102$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15103  FIND_BINARY_OUTPUT=`find --version 2>&1`
15104  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15106$as_echo "unix style" >&6; }
15107  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15109$as_echo "Windows" >&6; }
15110    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15111$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15112    { $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
15113$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15114    as_fn_error $? "Cannot continue" "$LINENO" 5
15115  else
15116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15117$as_echo "unknown" >&6; }
15118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15119$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15120  fi
15121
15122  else
15123    PATH_SEP=":"
15124  fi
15125
15126
15127  # We get the top-level directory from the supporting wrappers.
15128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15129$as_echo_n "checking for top-level directory... " >&6; }
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15131$as_echo "$TOPDIR" >&6; }
15132
15133
15134  # Save the original version of TOPDIR for string comparisons
15135  ORIGINAL_TOPDIR="$TOPDIR"
15136
15137
15138  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15139
15140  # Only process if variable expands to non-empty
15141
15142  if test "x$CURDIR" != x; then
15143    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15144
15145  # Input might be given as Windows format, start by converting to
15146  # unix format.
15147  path="$CURDIR"
15148  new_path=`$CYGPATH -u "$path"`
15149
15150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15153  # "foo.exe" is OK but "foo" is an error.
15154  #
15155  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15156  # It is also a way to make sure we got the proper file name for the real test later on.
15157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15158  if test "x$test_shortpath" = x; then
15159    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15160$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15161    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15162  fi
15163
15164  # Call helper function which possibly converts this using DOS-style short mode.
15165  # If so, the updated path is stored in $new_path.
15166
15167  input_path="$new_path"
15168  # Check if we need to convert this using DOS-style short mode. If the path
15169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15170  # take no chances and rewrite it.
15171  # Note: m4 eats our [], so we need to use [ and ] instead.
15172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15173  if test "x$has_forbidden_chars" != x; then
15174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15175    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15176    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15177    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15178      # Going to short mode and back again did indeed matter. Since short mode is
15179      # case insensitive, let's make it lowercase to improve readability.
15180      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15181      # Now convert it back to Unix-style (cygpath)
15182      input_path=`$CYGPATH -u "$shortmode_path"`
15183      new_path="$input_path"
15184    fi
15185  fi
15186
15187  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15188  if test "x$test_cygdrive_prefix" = x; then
15189    # As a simple fix, exclude /usr/bin since it's not a real path.
15190    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15191      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15192      # a path prefixed by /cygdrive for fixpath to work.
15193      new_path="$CYGWIN_ROOT_PATH$input_path"
15194    fi
15195  fi
15196
15197
15198  if test "x$path" != "x$new_path"; then
15199    CURDIR="$new_path"
15200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15201$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15202  fi
15203
15204    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15205
15206  path="$CURDIR"
15207  has_colon=`$ECHO $path | $GREP ^.:`
15208  new_path="$path"
15209  if test "x$has_colon" = x; then
15210    # Not in mixed or Windows style, start by that.
15211    new_path=`cmd //c echo $path`
15212  fi
15213
15214
15215  input_path="$new_path"
15216  # Check if we need to convert this using DOS-style short mode. If the path
15217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15218  # take no chances and rewrite it.
15219  # Note: m4 eats our [], so we need to use [ and ] instead.
15220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15221  if test "x$has_forbidden_chars" != x; then
15222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15224  fi
15225
15226
15227  windows_path="$new_path"
15228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15229    unix_path=`$CYGPATH -u "$windows_path"`
15230    new_path="$unix_path"
15231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15233    new_path="$unix_path"
15234  fi
15235
15236  if test "x$path" != "x$new_path"; then
15237    CURDIR="$new_path"
15238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15239$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15240  fi
15241
15242  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15243  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15244
15245    else
15246      # We're on a unix platform. Hooray! :)
15247      path="$CURDIR"
15248      has_space=`$ECHO "$path" | $GREP " "`
15249      if test "x$has_space" != x; then
15250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15251$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15252        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15253      fi
15254
15255      # Use eval to expand a potential ~
15256      eval path="$path"
15257      if test ! -f "$path" && test ! -d "$path"; then
15258        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15259      fi
15260
15261      CURDIR="`cd "$path"; $THEPWDCMD -L`"
15262    fi
15263  fi
15264
15265
15266  # Only process if variable expands to non-empty
15267
15268  if test "x$TOPDIR" != x; then
15269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15270
15271  # Input might be given as Windows format, start by converting to
15272  # unix format.
15273  path="$TOPDIR"
15274  new_path=`$CYGPATH -u "$path"`
15275
15276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15279  # "foo.exe" is OK but "foo" is an error.
15280  #
15281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15282  # It is also a way to make sure we got the proper file name for the real test later on.
15283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15284  if test "x$test_shortpath" = x; then
15285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15286$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15287    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15288  fi
15289
15290  # Call helper function which possibly converts this using DOS-style short mode.
15291  # If so, the updated path is stored in $new_path.
15292
15293  input_path="$new_path"
15294  # Check if we need to convert this using DOS-style short mode. If the path
15295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15296  # take no chances and rewrite it.
15297  # Note: m4 eats our [], so we need to use [ and ] instead.
15298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15299  if test "x$has_forbidden_chars" != x; then
15300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15304      # Going to short mode and back again did indeed matter. Since short mode is
15305      # case insensitive, let's make it lowercase to improve readability.
15306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15307      # Now convert it back to Unix-style (cygpath)
15308      input_path=`$CYGPATH -u "$shortmode_path"`
15309      new_path="$input_path"
15310    fi
15311  fi
15312
15313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15314  if test "x$test_cygdrive_prefix" = x; then
15315    # As a simple fix, exclude /usr/bin since it's not a real path.
15316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15318      # a path prefixed by /cygdrive for fixpath to work.
15319      new_path="$CYGWIN_ROOT_PATH$input_path"
15320    fi
15321  fi
15322
15323
15324  if test "x$path" != "x$new_path"; then
15325    TOPDIR="$new_path"
15326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15327$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15328  fi
15329
15330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15331
15332  path="$TOPDIR"
15333  has_colon=`$ECHO $path | $GREP ^.:`
15334  new_path="$path"
15335  if test "x$has_colon" = x; then
15336    # Not in mixed or Windows style, start by that.
15337    new_path=`cmd //c echo $path`
15338  fi
15339
15340
15341  input_path="$new_path"
15342  # Check if we need to convert this using DOS-style short mode. If the path
15343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15344  # take no chances and rewrite it.
15345  # Note: m4 eats our [], so we need to use [ and ] instead.
15346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15347  if test "x$has_forbidden_chars" != x; then
15348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15350  fi
15351
15352
15353  windows_path="$new_path"
15354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15355    unix_path=`$CYGPATH -u "$windows_path"`
15356    new_path="$unix_path"
15357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15359    new_path="$unix_path"
15360  fi
15361
15362  if test "x$path" != "x$new_path"; then
15363    TOPDIR="$new_path"
15364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15365$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15366  fi
15367
15368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15370
15371    else
15372      # We're on a unix platform. Hooray! :)
15373      path="$TOPDIR"
15374      has_space=`$ECHO "$path" | $GREP " "`
15375      if test "x$has_space" != x; then
15376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15377$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15379      fi
15380
15381      # Use eval to expand a potential ~
15382      eval path="$path"
15383      if test ! -f "$path" && test ! -d "$path"; then
15384        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15385      fi
15386
15387      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15388    fi
15389  fi
15390
15391  # SRC_ROOT is a traditional alias for TOPDIR.
15392  SRC_ROOT=$TOPDIR
15393
15394  # Calculate a canonical version of TOPDIR for string comparisons
15395  CANONICAL_TOPDIR=$TOPDIR
15396
15397  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15398    # Follow a chain of symbolic links. Use readlink
15399    # where it exists, else fall back to horribly
15400    # complicated shell code.
15401    if test "x$READLINK_TESTED" != yes; then
15402      # On MacOSX there is a readlink tool with a different
15403      # purpose than the GNU readlink tool. Check the found readlink.
15404      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15405      if test "x$ISGNU" = x; then
15406        # A readlink that we do not know how to use.
15407        # Are there other non-GNU readlinks out there?
15408        READLINK_TESTED=yes
15409        READLINK=
15410      fi
15411    fi
15412
15413    if test "x$READLINK" != x; then
15414      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15415    else
15416      # Save the current directory for restoring afterwards
15417      STARTDIR=$PWD
15418      COUNTER=0
15419      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15420      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15421      cd $sym_link_dir
15422      # Use -P flag to resolve symlinks in directories.
15423      cd `$THEPWDCMD -P`
15424      sym_link_dir=`$THEPWDCMD -P`
15425      # Resolve file symlinks
15426      while test $COUNTER -lt 20; do
15427        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15428        if test "x$ISLINK" == x; then
15429          # This is not a symbolic link! We are done!
15430          break
15431        fi
15432        # Again resolve directory symlinks since the target of the just found
15433        # link could be in a different directory
15434        cd `$DIRNAME $ISLINK`
15435        sym_link_dir=`$THEPWDCMD -P`
15436        sym_link_file=`$BASENAME $ISLINK`
15437        let COUNTER=COUNTER+1
15438      done
15439      cd $STARTDIR
15440      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15441    fi
15442  fi
15443
15444
15445
15446  # Locate the directory of this script.
15447  AUTOCONF_DIR=$TOPDIR/common/autoconf
15448
15449
15450# Check if it's a pure open build or if custom sources are to be used.
15451
15452  # Check whether --enable-openjdk-only was given.
15453if test "${enable_openjdk_only+set}" = set; then :
15454  enableval=$enable_openjdk_only;
15455else
15456  enable_openjdk_only="no"
15457fi
15458
15459
15460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15461$as_echo_n "checking for presence of closed sources... " >&6; }
15462  if test -d "$SRC_ROOT/jdk/src/closed"; then
15463    CLOSED_SOURCE_PRESENT=yes
15464  else
15465    CLOSED_SOURCE_PRESENT=no
15466  fi
15467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15468$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15469
15470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15471$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15472  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15474$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15475
15476  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15477    OPENJDK=true
15478    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15479      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15480$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15481    fi
15482  else
15483    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15484      OPENJDK=true
15485    else
15486      OPENJDK=false
15487    fi
15488  fi
15489
15490  if test "x$OPENJDK" = "xtrue"; then
15491    SET_OPENJDK="OPENJDK=true"
15492  fi
15493
15494
15495
15496  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15497  # the IncludeCustomExtension macro.
15498
15499
15500# Check whether --with-custom-make-dir was given.
15501if test "${with_custom_make_dir+set}" = set; then :
15502  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
15503$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15504fi
15505
15506
15507
15508
15509# These are needed to be able to create a configuration name (and thus the output directory)
15510
15511  ###############################################################################
15512  #
15513  # Check which variant of the JDK that we want to build.
15514  # Currently we have:
15515  #    normal:   standard edition
15516  # but the custom make system may add other variants
15517  #
15518  # Effectively the JDK variant gives a name to a specific set of
15519  # modules to compile into the JDK. In the future, these modules
15520  # might even be Jigsaw modules.
15521  #
15522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15523$as_echo_n "checking which variant of the JDK to build... " >&6; }
15524
15525# Check whether --with-jdk-variant was given.
15526if test "${with_jdk_variant+set}" = set; then :
15527  withval=$with_jdk_variant;
15528fi
15529
15530
15531  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15532    JDK_VARIANT="normal"
15533  else
15534    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15535  fi
15536
15537
15538
15539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15540$as_echo "$JDK_VARIANT" >&6; }
15541
15542
15543###############################################################################
15544#
15545# Check which interpreter of the JVM we want to build.
15546# Currently we have:
15547#    template: Template interpreter (the default)
15548#    cpp     : C++ interpreter
15549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15550$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15551
15552# Check whether --with-jvm-interpreter was given.
15553if test "${with_jvm_interpreter+set}" = set; then :
15554  withval=$with_jvm_interpreter;
15555fi
15556
15557
15558if test "x$with_jvm_interpreter" = x; then
15559     with_jvm_interpreter="template"
15560fi
15561
15562JVM_INTERPRETER="$with_jvm_interpreter"
15563
15564if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15565   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15566fi
15567
15568
15569
15570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15571$as_echo "$with_jvm_interpreter" >&6; }
15572
15573
15574
15575  ###############################################################################
15576  #
15577  # Check which variants of the JVM that we want to build.
15578  # Currently we have:
15579  #    server: normal interpreter and a tiered C1/C2 compiler
15580  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15581  #    minimal1: reduced form of client with optional VM services and features stripped out
15582  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15583  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15584  #    zero: no machine code interpreter, no compiler
15585  #    zeroshark: zero interpreter and shark/llvm compiler backend
15586#    core: interpreter only, no compiler (only works on some platforms)
15587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15588$as_echo_n "checking which variants of the JVM to build... " >&6; }
15589
15590# Check whether --with-jvm-variants was given.
15591if test "${with_jvm_variants+set}" = set; then :
15592  withval=$with_jvm_variants;
15593fi
15594
15595
15596  if test "x$with_jvm_variants" = x; then
15597    with_jvm_variants="server"
15598  fi
15599
15600  JVM_VARIANTS=",$with_jvm_variants,"
15601  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,//'`
15602
15603  if test "x$TEST_VARIANTS" != "x,"; then
15604     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15605  fi
15606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15607$as_echo "$with_jvm_variants" >&6; }
15608
15609  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15610  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15611  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15612  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15613  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15614  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15615  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15616
15617  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15619      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15620    fi
15621  fi
15622  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15624      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15625    fi
15626  fi
15627  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15628    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15629      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15630    fi
15631  fi
15632
15633  # Replace the commas with AND for use in the build directory name.
15634  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15635  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/'`
15636  if test "x$COUNT_VARIANTS" != "x,1"; then
15637    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15638  else
15639    BUILDING_MULTIPLE_JVM_VARIANTS=no
15640  fi
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651  INCLUDE_SA=true
15652  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15653    INCLUDE_SA=false
15654  fi
15655  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15656    INCLUDE_SA=false
15657  fi
15658  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15659    INCLUDE_SA=false
15660  fi
15661  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15662    INCLUDE_SA=false
15663  fi
15664
15665
15666  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15667    MACOSX_UNIVERSAL="true"
15668  fi
15669
15670
15671
15672
15673  ###############################################################################
15674  #
15675  # Set the debug level
15676  #    release: no debug information, all optimizations, no asserts.
15677  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15678  #    fastdebug: debug information (-g), all optimizations, all asserts
15679  #    slowdebug: debug information (-g), no optimizations, all asserts
15680  #
15681  DEBUG_LEVEL="release"
15682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15683$as_echo_n "checking which debug level to use... " >&6; }
15684  # Check whether --enable-debug was given.
15685if test "${enable_debug+set}" = set; then :
15686  enableval=$enable_debug;
15687        ENABLE_DEBUG="${enableval}"
15688        DEBUG_LEVEL="fastdebug"
15689
15690else
15691  ENABLE_DEBUG="no"
15692fi
15693
15694
15695
15696# Check whether --with-debug-level was given.
15697if test "${with_debug_level+set}" = set; then :
15698  withval=$with_debug_level;
15699        DEBUG_LEVEL="${withval}"
15700        if test "x$ENABLE_DEBUG" = xyes; then
15701          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15702        fi
15703
15704fi
15705
15706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15707$as_echo "$DEBUG_LEVEL" >&6; }
15708
15709  if test "x$DEBUG_LEVEL" != xrelease && \
15710      test "x$DEBUG_LEVEL" != xoptimized && \
15711      test "x$DEBUG_LEVEL" != xfastdebug && \
15712      test "x$DEBUG_LEVEL" != xslowdebug; then
15713    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15714  fi
15715
15716
15717  ###############################################################################
15718  #
15719  # Setup legacy vars/targets and new vars to deal with different debug levels.
15720  #
15721
15722  case $DEBUG_LEVEL in
15723    release )
15724      VARIANT="OPT"
15725      FASTDEBUG="false"
15726      DEBUG_CLASSFILES="false"
15727      BUILD_VARIANT_RELEASE=""
15728      HOTSPOT_DEBUG_LEVEL="product"
15729      HOTSPOT_EXPORT="product"
15730      ;;
15731    fastdebug )
15732      VARIANT="DBG"
15733      FASTDEBUG="true"
15734      DEBUG_CLASSFILES="true"
15735      BUILD_VARIANT_RELEASE="-fastdebug"
15736      HOTSPOT_DEBUG_LEVEL="fastdebug"
15737      HOTSPOT_EXPORT="fastdebug"
15738      ;;
15739    slowdebug )
15740      VARIANT="DBG"
15741      FASTDEBUG="false"
15742      DEBUG_CLASSFILES="true"
15743      BUILD_VARIANT_RELEASE="-debug"
15744      HOTSPOT_DEBUG_LEVEL="debug"
15745      HOTSPOT_EXPORT="debug"
15746      ;;
15747    optimized )
15748      VARIANT="OPT"
15749      FASTDEBUG="false"
15750      DEBUG_CLASSFILES="false"
15751      BUILD_VARIANT_RELEASE="-optimized"
15752      HOTSPOT_DEBUG_LEVEL="optimized"
15753      HOTSPOT_EXPORT="optimized"
15754      ;;
15755  esac
15756
15757  # The debug level 'optimized' is a little special because it is currently only
15758  # applicable to the HotSpot build where it means to build a completely
15759  # optimized version of the VM without any debugging code (like for the
15760  # 'release' debug level which is called 'product' in the HotSpot build) but
15761  # with the exception that it can contain additional code which is otherwise
15762  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15763  # test new and/or experimental features which are not intended for customer
15764  # shipment. Because these new features need to be tested and benchmarked in
15765  # real world scenarios, we want to build the containing JDK at the 'release'
15766  # debug level.
15767  if test "x$DEBUG_LEVEL" = xoptimized; then
15768    DEBUG_LEVEL="release"
15769  fi
15770
15771  #####
15772  # Generate the legacy makefile targets for hotspot.
15773  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15774  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15775  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15776  # But until then ...
15777  HOTSPOT_TARGET=""
15778
15779  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15781  fi
15782
15783  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15785  fi
15786
15787  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15789  fi
15790
15791  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15793  fi
15794
15795  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15797  fi
15798
15799  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15801  fi
15802
15803  if test "x$JVM_VARIANT_CORE" = xtrue; then
15804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15805  fi
15806
15807  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15808
15809  # On Macosx universal binaries are produced, but they only contain
15810  # 64 bit intel. This invalidates control of which jvms are built
15811  # from configure, but only server is valid anyway. Fix this
15812  # when hotspot makefiles are rewritten.
15813  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15814    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15815  fi
15816
15817  #####
15818
15819
15820
15821
15822
15823
15824
15825
15826# With basic setup done, call the custom early hook.
15827
15828
15829# Check if we have devkits, extra paths or sysroot set.
15830
15831
15832# Check whether --with-devkit was given.
15833if test "${with_devkit+set}" = set; then :
15834  withval=$with_devkit;
15835
15836  # Only process if variable expands to non-empty
15837
15838  if test "x$with_devkit" != x; then
15839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15840
15841  # Input might be given as Windows format, start by converting to
15842  # unix format.
15843  path="$with_devkit"
15844  new_path=`$CYGPATH -u "$path"`
15845
15846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15849  # "foo.exe" is OK but "foo" is an error.
15850  #
15851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15852  # It is also a way to make sure we got the proper file name for the real test later on.
15853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15854  if test "x$test_shortpath" = x; then
15855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15856$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15857    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15858  fi
15859
15860  # Call helper function which possibly converts this using DOS-style short mode.
15861  # If so, the updated path is stored in $new_path.
15862
15863  input_path="$new_path"
15864  # Check if we need to convert this using DOS-style short mode. If the path
15865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15866  # take no chances and rewrite it.
15867  # Note: m4 eats our [], so we need to use [ and ] instead.
15868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15869  if test "x$has_forbidden_chars" != x; then
15870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15874      # Going to short mode and back again did indeed matter. Since short mode is
15875      # case insensitive, let's make it lowercase to improve readability.
15876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15877      # Now convert it back to Unix-style (cygpath)
15878      input_path=`$CYGPATH -u "$shortmode_path"`
15879      new_path="$input_path"
15880    fi
15881  fi
15882
15883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15884  if test "x$test_cygdrive_prefix" = x; then
15885    # As a simple fix, exclude /usr/bin since it's not a real path.
15886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15888      # a path prefixed by /cygdrive for fixpath to work.
15889      new_path="$CYGWIN_ROOT_PATH$input_path"
15890    fi
15891  fi
15892
15893
15894  if test "x$path" != "x$new_path"; then
15895    with_devkit="$new_path"
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15897$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15898  fi
15899
15900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15901
15902  path="$with_devkit"
15903  has_colon=`$ECHO $path | $GREP ^.:`
15904  new_path="$path"
15905  if test "x$has_colon" = x; then
15906    # Not in mixed or Windows style, start by that.
15907    new_path=`cmd //c echo $path`
15908  fi
15909
15910
15911  input_path="$new_path"
15912  # Check if we need to convert this using DOS-style short mode. If the path
15913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15914  # take no chances and rewrite it.
15915  # Note: m4 eats our [], so we need to use [ and ] instead.
15916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15917  if test "x$has_forbidden_chars" != x; then
15918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15920  fi
15921
15922
15923  windows_path="$new_path"
15924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15925    unix_path=`$CYGPATH -u "$windows_path"`
15926    new_path="$unix_path"
15927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15929    new_path="$unix_path"
15930  fi
15931
15932  if test "x$path" != "x$new_path"; then
15933    with_devkit="$new_path"
15934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15935$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15936  fi
15937
15938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15940
15941    else
15942      # We're on a unix platform. Hooray! :)
15943      path="$with_devkit"
15944      has_space=`$ECHO "$path" | $GREP " "`
15945      if test "x$has_space" != x; then
15946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15947$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15949      fi
15950
15951      # Use eval to expand a potential ~
15952      eval path="$path"
15953      if test ! -f "$path" && test ! -d "$path"; then
15954        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
15955      fi
15956
15957      with_devkit="`cd "$path"; $THEPWDCMD -L`"
15958    fi
15959  fi
15960
15961        DEVKIT_ROOT="$with_devkit"
15962        # Check for a meta data info file in the root of the devkit
15963        if test -f "$DEVKIT_ROOT/devkit.info"; then
15964          . $DEVKIT_ROOT/devkit.info
15965          # This potentially sets the following:
15966          # A descriptive name of the devkit
15967
15968  if test "x$DEVKIT_NAME" = x; then
15969    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
15970  fi
15971
15972          # Corresponds to --with-extra-path
15973
15974  if test "x$DEVKIT_EXTRA_PATH" = x; then
15975    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
15976  fi
15977
15978          # Corresponds to --with-toolchain-path
15979
15980  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15981    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
15982  fi
15983
15984          # Corresponds to --with-sysroot
15985
15986  if test "x$DEVKIT_SYSROOT" = x; then
15987    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
15988  fi
15989
15990
15991          # Identifies the Visual Studio version in the devkit
15992
15993  if test "x$DEVKIT_VS_VERSION" = x; then
15994    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
15995  fi
15996
15997          # The Visual Studio include environment variable
15998
15999  if test "x$DEVKIT_VS_INCLUDE" = x; then
16000    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16001  fi
16002
16003          # The Visual Studio lib environment variable
16004
16005  if test "x$DEVKIT_VS_LIB" = x; then
16006    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16007  fi
16008
16009          # Corresponds to --with-msvcr-dll
16010
16011  if test "x$DEVKIT_MSVCR_DLL" = x; then
16012    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16013  fi
16014
16015          # Corresponds to --with-msvcp-dll
16016
16017  if test "x$DEVKIT_MSVCP_DLL" = x; then
16018    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16019  fi
16020
16021        fi
16022
16023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16024$as_echo_n "checking for devkit... " >&6; }
16025        if test "x$DEVKIT_NAME" != x; then
16026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16027$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16028        else
16029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16030$as_echo "$DEVKIT_ROOT" >&6; }
16031        fi
16032
16033
16034  if test "x$DEVKIT_EXTRA_PATH" != x; then
16035    if test "x$EXTRA_PATH" = x; then
16036      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16037    else
16038      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16039    fi
16040  fi
16041
16042
16043        # Fallback default of just /bin if DEVKIT_PATH is not defined
16044        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16045          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16046        fi
16047
16048  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16049    if test "x$TOOLCHAIN_PATH" = x; then
16050      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16051    else
16052      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16053    fi
16054  fi
16055
16056
16057        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16058        # places for backwards compatiblity.
16059        if test "x$DEVKIT_SYSROOT" != x; then
16060          SYSROOT="$DEVKIT_SYSROOT"
16061        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16062          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16063        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16064          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16065        fi
16066
16067
16068fi
16069
16070
16071  # You can force the sysroot if the sysroot encoded into the compiler tools
16072  # is not correct.
16073
16074# Check whether --with-sys-root was given.
16075if test "${with_sys_root+set}" = set; then :
16076  withval=$with_sys_root; SYSROOT=$with_sys_root
16077
16078fi
16079
16080
16081
16082# Check whether --with-sysroot was given.
16083if test "${with_sysroot+set}" = set; then :
16084  withval=$with_sysroot; SYSROOT=$with_sysroot
16085
16086fi
16087
16088
16089
16090# Check whether --with-tools-dir was given.
16091if test "${with_tools_dir+set}" = set; then :
16092  withval=$with_tools_dir;
16093  if test "x$with_tools_dir" != x; then
16094    if test "x$TOOLCHAIN_PATH" = x; then
16095      TOOLCHAIN_PATH="$with_tools_dir"
16096    else
16097      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16098    fi
16099  fi
16100
16101
16102fi
16103
16104
16105
16106# Check whether --with-toolchain-path was given.
16107if test "${with_toolchain_path+set}" = set; then :
16108  withval=$with_toolchain_path;
16109  if test "x$with_toolchain_path" != x; then
16110    if test "x$TOOLCHAIN_PATH" = x; then
16111      TOOLCHAIN_PATH="$with_toolchain_path"
16112    else
16113      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16114    fi
16115  fi
16116
16117
16118fi
16119
16120
16121
16122# Check whether --with-extra-path was given.
16123if test "${with_extra_path+set}" = set; then :
16124  withval=$with_extra_path;
16125  if test "x$with_extra_path" != x; then
16126    if test "x$EXTRA_PATH" = x; then
16127      EXTRA_PATH="$with_extra_path"
16128    else
16129      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16130    fi
16131  fi
16132
16133
16134fi
16135
16136
16137  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16138    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16139    # If not, detect if Xcode is installed by running xcodebuild -version
16140    # if no Xcode installed, xcodebuild exits with 1
16141    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16142    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16143      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16144      # fall back on the stub binary in /usr/bin/xcodebuild
16145      # Extract the first word of "xcodebuild", so it can be a program name with args.
16146set dummy xcodebuild; ac_word=$2
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16148$as_echo_n "checking for $ac_word... " >&6; }
16149if ${ac_cv_path_XCODEBUILD+:} false; then :
16150  $as_echo_n "(cached) " >&6
16151else
16152  case $XCODEBUILD in
16153  [\\/]* | ?:[\\/]*)
16154  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16155  ;;
16156  *)
16157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16158for as_dir in $TOOLCHAIN_PATH
16159do
16160  IFS=$as_save_IFS
16161  test -z "$as_dir" && as_dir=.
16162    for ac_exec_ext in '' $ac_executable_extensions; do
16163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16164    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16166    break 2
16167  fi
16168done
16169  done
16170IFS=$as_save_IFS
16171
16172  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16173  ;;
16174esac
16175fi
16176XCODEBUILD=$ac_cv_path_XCODEBUILD
16177if test -n "$XCODEBUILD"; then
16178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16179$as_echo "$XCODEBUILD" >&6; }
16180else
16181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16182$as_echo "no" >&6; }
16183fi
16184
16185
16186    else
16187      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16188      # when only the command line tools are installed there are no SDKs, so headers
16189      # are copied into the system frameworks
16190      XCODEBUILD=
16191
16192    fi
16193
16194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16195$as_echo_n "checking for sdk name... " >&6; }
16196
16197# Check whether --with-sdk-name was given.
16198if test "${with_sdk_name+set}" = set; then :
16199  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16200
16201fi
16202
16203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16204$as_echo "$SDKNAME" >&6; }
16205
16206    # if toolchain path is specified then don't rely on system headers, they may not compile
16207    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16208    test -z "$TOOLCHAIN_PATH" && \
16209      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16210
16211    if test -z "$SYSROOT"; then
16212      if test -n "$XCODEBUILD"; then
16213        # if we don't have system headers, use default SDK name (last resort)
16214        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16215          SDKNAME=${SDKNAME:-macosx}
16216        fi
16217
16218        if test -n "$SDKNAME"; then
16219          # Call xcodebuild to determine SYSROOT
16220          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16221        fi
16222      else
16223        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16224          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
16225        fi
16226      fi
16227    else
16228      # warn user if --with-sdk-name was also set
16229      if test -n "$with_sdk_name"; then
16230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16231$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16232      fi
16233    fi
16234
16235    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16236      # If no system framework headers, then SYSROOT must be set, or we won't build
16237      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
16238    fi
16239
16240    # Perform a basic sanity test
16241    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16242      if test -z "$SYSROOT"; then
16243        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
16244      else
16245        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16246      fi
16247    fi
16248
16249    # set SDKROOT too, Xcode tools will pick it up
16250    SDKROOT=$SYSROOT
16251
16252  fi
16253
16254  # Prepend the extra path to the global path
16255
16256  if test "x$EXTRA_PATH" != x; then
16257    if test "x$PATH" = x; then
16258      PATH="$EXTRA_PATH"
16259    else
16260      PATH="$EXTRA_PATH:$PATH"
16261    fi
16262  fi
16263
16264
16265  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16266    # Add extra search paths on solaris for utilities like ar and as etc...
16267    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16268  fi
16269
16270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16271$as_echo_n "checking for sysroot... " >&6; }
16272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16273$as_echo "$SYSROOT" >&6; }
16274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16275$as_echo_n "checking for toolchain path... " >&6; }
16276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16277$as_echo "$TOOLCHAIN_PATH" >&6; }
16278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16279$as_echo_n "checking for extra path... " >&6; }
16280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16281$as_echo "$EXTRA_PATH" >&6; }
16282
16283
16284# To properly create a configuration name, we need to have the OpenJDK target
16285# and options (variants and debug level) parsed.
16286
16287
16288
16289# Check whether --with-conf-name was given.
16290if test "${with_conf_name+set}" = set; then :
16291  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16292fi
16293
16294
16295  # Test from where we are running configure, in or outside of src root.
16296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16297$as_echo_n "checking where to store configuration... " >&6; }
16298  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16299      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16300      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16301    # We are running configure from the src root.
16302    # Create a default ./build/target-variant-debuglevel output root.
16303    if test "x${CONF_NAME}" = x; then
16304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16305$as_echo "in default location" >&6; }
16306      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16307    else
16308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16309$as_echo "in build directory with custom name" >&6; }
16310    fi
16311    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16312    $MKDIR -p "$OUTPUT_ROOT"
16313    if test ! -d "$OUTPUT_ROOT"; then
16314      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16315    fi
16316  else
16317    # We are running configure from outside of the src dir.
16318    # Then use the current directory as output dir!
16319    # If configuration is situated in normal build directory, just use the build
16320    # directory name as configuration name, otherwise use the complete path.
16321    if test "x${CONF_NAME}" = x; then
16322      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16323    fi
16324    OUTPUT_ROOT="$CURDIR"
16325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16326$as_echo "in current directory" >&6; }
16327
16328    # WARNING: This might be a bad thing to do. You need to be sure you want to
16329    # have a configuration in this directory. Do some sanity checks!
16330
16331    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16332      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16333      # other files
16334      files_present=`$LS $OUTPUT_ROOT`
16335      # Configure has already touched config.log and confdefs.h in the current dir when this check
16336      # is performed.
16337      filtered_files=`$ECHO "$files_present" \
16338          | $SED -e 's/config.log//g' \
16339              -e 's/configure.log//g' \
16340              -e 's/confdefs.h//g' \
16341              -e 's/ //g' \
16342          | $TR -d '\n'`
16343      if test "x$filtered_files" != x; then
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16345$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16346        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16347$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16348        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16349$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16350        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16351$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16352        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16353$as_echo "$as_me: seriously mess up just about everything." >&6;}
16354        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16355$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16356        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16357$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16358        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16359      fi
16360    fi
16361  fi
16362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16363$as_echo_n "checking what configuration name to use... " >&6; }
16364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16365$as_echo "$CONF_NAME" >&6; }
16366
16367
16368  # Only process if variable expands to non-empty
16369
16370  if test "x$OUTPUT_ROOT" != x; then
16371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16372
16373  # Input might be given as Windows format, start by converting to
16374  # unix format.
16375  path="$OUTPUT_ROOT"
16376  new_path=`$CYGPATH -u "$path"`
16377
16378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16381  # "foo.exe" is OK but "foo" is an error.
16382  #
16383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16384  # It is also a way to make sure we got the proper file name for the real test later on.
16385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16386  if test "x$test_shortpath" = x; then
16387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16388$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16389    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16390  fi
16391
16392  # Call helper function which possibly converts this using DOS-style short mode.
16393  # If so, the updated path is stored in $new_path.
16394
16395  input_path="$new_path"
16396  # Check if we need to convert this using DOS-style short mode. If the path
16397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16398  # take no chances and rewrite it.
16399  # Note: m4 eats our [], so we need to use [ and ] instead.
16400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16401  if test "x$has_forbidden_chars" != x; then
16402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16406      # Going to short mode and back again did indeed matter. Since short mode is
16407      # case insensitive, let's make it lowercase to improve readability.
16408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16409      # Now convert it back to Unix-style (cygpath)
16410      input_path=`$CYGPATH -u "$shortmode_path"`
16411      new_path="$input_path"
16412    fi
16413  fi
16414
16415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16416  if test "x$test_cygdrive_prefix" = x; then
16417    # As a simple fix, exclude /usr/bin since it's not a real path.
16418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16420      # a path prefixed by /cygdrive for fixpath to work.
16421      new_path="$CYGWIN_ROOT_PATH$input_path"
16422    fi
16423  fi
16424
16425
16426  if test "x$path" != "x$new_path"; then
16427    OUTPUT_ROOT="$new_path"
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16429$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16430  fi
16431
16432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16433
16434  path="$OUTPUT_ROOT"
16435  has_colon=`$ECHO $path | $GREP ^.:`
16436  new_path="$path"
16437  if test "x$has_colon" = x; then
16438    # Not in mixed or Windows style, start by that.
16439    new_path=`cmd //c echo $path`
16440  fi
16441
16442
16443  input_path="$new_path"
16444  # Check if we need to convert this using DOS-style short mode. If the path
16445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16446  # take no chances and rewrite it.
16447  # Note: m4 eats our [], so we need to use [ and ] instead.
16448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16449  if test "x$has_forbidden_chars" != x; then
16450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16452  fi
16453
16454
16455  windows_path="$new_path"
16456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16457    unix_path=`$CYGPATH -u "$windows_path"`
16458    new_path="$unix_path"
16459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16461    new_path="$unix_path"
16462  fi
16463
16464  if test "x$path" != "x$new_path"; then
16465    OUTPUT_ROOT="$new_path"
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16467$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16468  fi
16469
16470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16472
16473    else
16474      # We're on a unix platform. Hooray! :)
16475      path="$OUTPUT_ROOT"
16476      has_space=`$ECHO "$path" | $GREP " "`
16477      if test "x$has_space" != x; then
16478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16479$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16481      fi
16482
16483      # Use eval to expand a potential ~
16484      eval path="$path"
16485      if test ! -f "$path" && test ! -d "$path"; then
16486        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16487      fi
16488
16489      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16490    fi
16491  fi
16492
16493
16494  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16495  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16496
16497  SPEC=$OUTPUT_ROOT/spec.gmk
16498
16499  CONF_NAME=$CONF_NAME
16500
16501  OUTPUT_ROOT=$OUTPUT_ROOT
16502
16503
16504
16505  # The spec.gmk file contains all variables for the make system.
16506  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16507
16508  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16509  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16510
16511  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16512  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16513
16514  # The compare.sh is used to compare the build output to other builds.
16515  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16516
16517  # The generated Makefile knows where the spec.gmk is and where the source is.
16518  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16519  # which will look for generated configurations
16520  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16521
16522
16523
16524# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16525
16526  for ac_prog in apt-get yum port pkgutil pkgadd
16527do
16528  # Extract the first word of "$ac_prog", so it can be a program name with args.
16529set dummy $ac_prog; ac_word=$2
16530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16531$as_echo_n "checking for $ac_word... " >&6; }
16532if ${ac_cv_prog_PKGHANDLER+:} false; then :
16533  $as_echo_n "(cached) " >&6
16534else
16535  if test -n "$PKGHANDLER"; then
16536  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16537else
16538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16539for as_dir in $PATH
16540do
16541  IFS=$as_save_IFS
16542  test -z "$as_dir" && as_dir=.
16543    for ac_exec_ext in '' $ac_executable_extensions; do
16544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16545    ac_cv_prog_PKGHANDLER="$ac_prog"
16546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16547    break 2
16548  fi
16549done
16550  done
16551IFS=$as_save_IFS
16552
16553fi
16554fi
16555PKGHANDLER=$ac_cv_prog_PKGHANDLER
16556if test -n "$PKGHANDLER"; then
16557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16558$as_echo "$PKGHANDLER" >&6; }
16559else
16560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16561$as_echo "no" >&6; }
16562fi
16563
16564
16565  test -n "$PKGHANDLER" && break
16566done
16567
16568
16569
16570# Setup tools that requires more complex handling, or that is not needed by the configure script.
16571
16572
16573
16574  # Publish this variable in the help.
16575
16576
16577  if [ -z "${MAKE+x}" ]; then
16578    # The variable is not set by user, try to locate tool using the code snippet
16579
16580    # Try our hardest to locate a correct version of GNU make
16581    for ac_prog in gmake
16582do
16583  # Extract the first word of "$ac_prog", so it can be a program name with args.
16584set dummy $ac_prog; ac_word=$2
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16586$as_echo_n "checking for $ac_word... " >&6; }
16587if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16588  $as_echo_n "(cached) " >&6
16589else
16590  case $CHECK_GMAKE in
16591  [\\/]* | ?:[\\/]*)
16592  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16593  ;;
16594  *)
16595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16596for as_dir in $PATH
16597do
16598  IFS=$as_save_IFS
16599  test -z "$as_dir" && as_dir=.
16600    for ac_exec_ext in '' $ac_executable_extensions; do
16601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16602    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16604    break 2
16605  fi
16606done
16607  done
16608IFS=$as_save_IFS
16609
16610  ;;
16611esac
16612fi
16613CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16614if test -n "$CHECK_GMAKE"; then
16615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16616$as_echo "$CHECK_GMAKE" >&6; }
16617else
16618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16619$as_echo "no" >&6; }
16620fi
16621
16622
16623  test -n "$CHECK_GMAKE" && break
16624done
16625
16626
16627  MAKE_CANDIDATE=""$CHECK_GMAKE""
16628  DESCRIPTION="gmake in PATH"
16629
16630  # On Cygwin, we require a newer version of make than on other platforms
16631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16632    MAKE_VERSION_EXPR="-e 4\."
16633    MAKE_REQUIRED_VERSION="4.0"
16634   else
16635    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16636    MAKE_REQUIRED_VERSION="3.81"
16637  fi
16638
16639  if test "x$MAKE_CANDIDATE" != x; then
16640    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16641$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16642    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16643    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16644    if test "x$IS_GNU_MAKE" = x; then
16645      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16646$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16647    else
16648      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16649      if test "x$IS_MODERN_MAKE" = x; then
16650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16651$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16652      else
16653        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16654          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16655            MAKE_EXPECTED_ENV='cygwin'
16656          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16657            MAKE_EXPECTED_ENV='msys'
16658          else
16659            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16660          fi
16661          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16662          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16663        else
16664          # Not relevant for non-Windows
16665          IS_MAKE_CORRECT_ENV=true
16666        fi
16667        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16668          { $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
16669$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;}
16670        else
16671          FOUND_MAKE=$MAKE_CANDIDATE
16672
16673  # Only process if variable expands to non-empty
16674
16675  if test "x$FOUND_MAKE" != x; then
16676    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16677
16678  # First separate the path from the arguments. This will split at the first
16679  # space.
16680  complete="$FOUND_MAKE"
16681  path="${complete%% *}"
16682  tmp="$complete EOL"
16683  arguments="${tmp#* }"
16684
16685  # Input might be given as Windows format, start by converting to
16686  # unix format.
16687  new_path=`$CYGPATH -u "$path"`
16688
16689  # Now try to locate executable using which
16690  new_path=`$WHICH "$new_path" 2> /dev/null`
16691  # bat and cmd files are not always considered executable in cygwin causing which
16692  # to not find them
16693  if test "x$new_path" = x \
16694      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16695      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16696    new_path=`$CYGPATH -u "$path"`
16697  fi
16698  if test "x$new_path" = x; then
16699    # Oops. Which didn't find the executable.
16700    # The splitting of arguments from the executable at a space might have been incorrect,
16701    # since paths with space are more likely in Windows. Give it another try with the whole
16702    # argument.
16703    path="$complete"
16704    arguments="EOL"
16705    new_path=`$CYGPATH -u "$path"`
16706    new_path=`$WHICH "$new_path" 2> /dev/null`
16707    # bat and cmd files are not always considered executable in cygwin causing which
16708    # to not find them
16709    if test "x$new_path" = x \
16710        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16711        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16712      new_path=`$CYGPATH -u "$path"`
16713    fi
16714    if test "x$new_path" = x; then
16715      # It's still not found. Now this is an unrecoverable error.
16716      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16717$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16718      has_space=`$ECHO "$complete" | $GREP " "`
16719      if test "x$has_space" != x; then
16720        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16721$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16722      fi
16723      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16724    fi
16725  fi
16726
16727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16730  # "foo.exe" is OK but "foo" is an error.
16731  #
16732  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16733  # It is also a way to make sure we got the proper file name for the real test later on.
16734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16735  if test "x$test_shortpath" = x; then
16736    # Short path failed, file does not exist as specified.
16737    # Try adding .exe or .cmd
16738    if test -f "${new_path}.exe"; then
16739      input_to_shortpath="${new_path}.exe"
16740    elif test -f "${new_path}.cmd"; then
16741      input_to_shortpath="${new_path}.cmd"
16742    else
16743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16744$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16745      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16746$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16748    fi
16749  else
16750    input_to_shortpath="$new_path"
16751  fi
16752
16753  # Call helper function which possibly converts this using DOS-style short mode.
16754  # If so, the updated path is stored in $new_path.
16755  new_path="$input_to_shortpath"
16756
16757  input_path="$input_to_shortpath"
16758  # Check if we need to convert this using DOS-style short mode. If the path
16759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16760  # take no chances and rewrite it.
16761  # Note: m4 eats our [], so we need to use [ and ] instead.
16762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16763  if test "x$has_forbidden_chars" != x; then
16764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16768      # Going to short mode and back again did indeed matter. Since short mode is
16769      # case insensitive, let's make it lowercase to improve readability.
16770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16771      # Now convert it back to Unix-style (cygpath)
16772      input_path=`$CYGPATH -u "$shortmode_path"`
16773      new_path="$input_path"
16774    fi
16775  fi
16776
16777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16778  if test "x$test_cygdrive_prefix" = x; then
16779    # As a simple fix, exclude /usr/bin since it's not a real path.
16780    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16782      # a path prefixed by /cygdrive for fixpath to work.
16783      new_path="$CYGWIN_ROOT_PATH$input_path"
16784    fi
16785  fi
16786
16787  # remove trailing .exe if any
16788  new_path="${new_path/%.exe/}"
16789
16790    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16791
16792  # First separate the path from the arguments. This will split at the first
16793  # space.
16794  complete="$FOUND_MAKE"
16795  path="${complete%% *}"
16796  tmp="$complete EOL"
16797  arguments="${tmp#* }"
16798
16799  # Input might be given as Windows format, start by converting to
16800  # unix format.
16801  new_path="$path"
16802
16803  windows_path="$new_path"
16804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16805    unix_path=`$CYGPATH -u "$windows_path"`
16806    new_path="$unix_path"
16807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16809    new_path="$unix_path"
16810  fi
16811
16812
16813  # Now try to locate executable using which
16814  new_path=`$WHICH "$new_path" 2> /dev/null`
16815
16816  if test "x$new_path" = x; then
16817    # Oops. Which didn't find the executable.
16818    # The splitting of arguments from the executable at a space might have been incorrect,
16819    # since paths with space are more likely in Windows. Give it another try with the whole
16820    # argument.
16821    path="$complete"
16822    arguments="EOL"
16823    new_path="$path"
16824
16825  windows_path="$new_path"
16826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16827    unix_path=`$CYGPATH -u "$windows_path"`
16828    new_path="$unix_path"
16829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16831    new_path="$unix_path"
16832  fi
16833
16834
16835    new_path=`$WHICH "$new_path" 2> /dev/null`
16836    # bat and cmd files are not always considered executable in MSYS causing which
16837    # to not find them
16838    if test "x$new_path" = x \
16839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16841      new_path="$path"
16842
16843  windows_path="$new_path"
16844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16845    unix_path=`$CYGPATH -u "$windows_path"`
16846    new_path="$unix_path"
16847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16849    new_path="$unix_path"
16850  fi
16851
16852    fi
16853
16854    if test "x$new_path" = x; then
16855      # It's still not found. Now this is an unrecoverable error.
16856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16858      has_space=`$ECHO "$complete" | $GREP " "`
16859      if test "x$has_space" != x; then
16860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16862      fi
16863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16864    fi
16865  fi
16866
16867  # Now new_path has a complete unix path to the binary
16868  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16869    # Keep paths in /bin as-is, but remove trailing .exe if any
16870    new_path="${new_path/%.exe/}"
16871    # Do not save /bin paths to all_fixpath_prefixes!
16872  else
16873    # Not in mixed or Windows style, start by that.
16874    new_path=`cmd //c echo $new_path`
16875
16876  input_path="$new_path"
16877  # Check if we need to convert this using DOS-style short mode. If the path
16878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16879  # take no chances and rewrite it.
16880  # Note: m4 eats our [], so we need to use [ and ] instead.
16881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16882  if test "x$has_forbidden_chars" != x; then
16883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16885  fi
16886
16887    # Output is in $new_path
16888
16889  windows_path="$new_path"
16890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16891    unix_path=`$CYGPATH -u "$windows_path"`
16892    new_path="$unix_path"
16893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16895    new_path="$unix_path"
16896  fi
16897
16898    # remove trailing .exe if any
16899    new_path="${new_path/%.exe/}"
16900
16901    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16902    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16903  fi
16904
16905    else
16906      # We're on a unix platform. Hooray! :)
16907      # First separate the path from the arguments. This will split at the first
16908      # space.
16909      complete="$FOUND_MAKE"
16910      path="${complete%% *}"
16911      tmp="$complete EOL"
16912      arguments="${tmp#* }"
16913
16914      # Cannot rely on the command "which" here since it doesn't always work.
16915      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16916      if test -z "$is_absolute_path"; then
16917        # Path to executable is not absolute. Find it.
16918        IFS_save="$IFS"
16919        IFS=:
16920        for p in $PATH; do
16921          if test -f "$p/$path" && test -x "$p/$path"; then
16922            new_path="$p/$path"
16923            break
16924          fi
16925        done
16926        IFS="$IFS_save"
16927      else
16928        # This is an absolute path, we can use it without further modifications.
16929        new_path="$path"
16930      fi
16931
16932      if test "x$new_path" = x; then
16933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16934$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16935        has_space=`$ECHO "$complete" | $GREP " "`
16936        if test "x$has_space" != x; then
16937          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16938$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16939        fi
16940        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16941      fi
16942    fi
16943
16944    # Now join together the path and the arguments once again
16945    if test "x$arguments" != xEOL; then
16946      new_complete="$new_path ${arguments% *}"
16947    else
16948      new_complete="$new_path"
16949    fi
16950
16951    if test "x$complete" != "x$new_complete"; then
16952      FOUND_MAKE="$new_complete"
16953      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16954$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16955    fi
16956  fi
16957
16958        fi
16959      fi
16960    fi
16961  fi
16962
16963
16964    if test "x$FOUND_MAKE" = x; then
16965      for ac_prog in make
16966do
16967  # Extract the first word of "$ac_prog", so it can be a program name with args.
16968set dummy $ac_prog; ac_word=$2
16969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16970$as_echo_n "checking for $ac_word... " >&6; }
16971if ${ac_cv_path_CHECK_MAKE+:} false; then :
16972  $as_echo_n "(cached) " >&6
16973else
16974  case $CHECK_MAKE in
16975  [\\/]* | ?:[\\/]*)
16976  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16977  ;;
16978  *)
16979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16980for as_dir in $PATH
16981do
16982  IFS=$as_save_IFS
16983  test -z "$as_dir" && as_dir=.
16984    for ac_exec_ext in '' $ac_executable_extensions; do
16985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16986    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16988    break 2
16989  fi
16990done
16991  done
16992IFS=$as_save_IFS
16993
16994  ;;
16995esac
16996fi
16997CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16998if test -n "$CHECK_MAKE"; then
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17000$as_echo "$CHECK_MAKE" >&6; }
17001else
17002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17003$as_echo "no" >&6; }
17004fi
17005
17006
17007  test -n "$CHECK_MAKE" && break
17008done
17009
17010
17011  MAKE_CANDIDATE=""$CHECK_MAKE""
17012  DESCRIPTION="make in PATH"
17013
17014  # On Cygwin, we require a newer version of make than on other platforms
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    MAKE_VERSION_EXPR="-e 4\."
17017    MAKE_REQUIRED_VERSION="4.0"
17018   else
17019    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17020    MAKE_REQUIRED_VERSION="3.81"
17021  fi
17022
17023  if test "x$MAKE_CANDIDATE" != x; then
17024    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17025$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17026    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17027    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17028    if test "x$IS_GNU_MAKE" = x; then
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17030$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17031    else
17032      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17033      if test "x$IS_MODERN_MAKE" = x; then
17034        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17035$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17036      else
17037        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17038          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17039            MAKE_EXPECTED_ENV='cygwin'
17040          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17041            MAKE_EXPECTED_ENV='msys'
17042          else
17043            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17044          fi
17045          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17046          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17047        else
17048          # Not relevant for non-Windows
17049          IS_MAKE_CORRECT_ENV=true
17050        fi
17051        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17052          { $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
17053$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;}
17054        else
17055          FOUND_MAKE=$MAKE_CANDIDATE
17056
17057  # Only process if variable expands to non-empty
17058
17059  if test "x$FOUND_MAKE" != x; then
17060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17061
17062  # First separate the path from the arguments. This will split at the first
17063  # space.
17064  complete="$FOUND_MAKE"
17065  path="${complete%% *}"
17066  tmp="$complete EOL"
17067  arguments="${tmp#* }"
17068
17069  # Input might be given as Windows format, start by converting to
17070  # unix format.
17071  new_path=`$CYGPATH -u "$path"`
17072
17073  # Now try to locate executable using which
17074  new_path=`$WHICH "$new_path" 2> /dev/null`
17075  # bat and cmd files are not always considered executable in cygwin causing which
17076  # to not find them
17077  if test "x$new_path" = x \
17078      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17079      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17080    new_path=`$CYGPATH -u "$path"`
17081  fi
17082  if test "x$new_path" = x; then
17083    # Oops. Which didn't find the executable.
17084    # The splitting of arguments from the executable at a space might have been incorrect,
17085    # since paths with space are more likely in Windows. Give it another try with the whole
17086    # argument.
17087    path="$complete"
17088    arguments="EOL"
17089    new_path=`$CYGPATH -u "$path"`
17090    new_path=`$WHICH "$new_path" 2> /dev/null`
17091    # bat and cmd files are not always considered executable in cygwin causing which
17092    # to not find them
17093    if test "x$new_path" = x \
17094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17096      new_path=`$CYGPATH -u "$path"`
17097    fi
17098    if test "x$new_path" = x; then
17099      # It's still not found. Now this is an unrecoverable error.
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17102      has_space=`$ECHO "$complete" | $GREP " "`
17103      if test "x$has_space" != x; then
17104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17106      fi
17107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17108    fi
17109  fi
17110
17111  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17112  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17113  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17114  # "foo.exe" is OK but "foo" is an error.
17115  #
17116  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17117  # It is also a way to make sure we got the proper file name for the real test later on.
17118  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17119  if test "x$test_shortpath" = x; then
17120    # Short path failed, file does not exist as specified.
17121    # Try adding .exe or .cmd
17122    if test -f "${new_path}.exe"; then
17123      input_to_shortpath="${new_path}.exe"
17124    elif test -f "${new_path}.cmd"; then
17125      input_to_shortpath="${new_path}.cmd"
17126    else
17127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17129      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17130$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17131      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17132    fi
17133  else
17134    input_to_shortpath="$new_path"
17135  fi
17136
17137  # Call helper function which possibly converts this using DOS-style short mode.
17138  # If so, the updated path is stored in $new_path.
17139  new_path="$input_to_shortpath"
17140
17141  input_path="$input_to_shortpath"
17142  # Check if we need to convert this using DOS-style short mode. If the path
17143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17144  # take no chances and rewrite it.
17145  # Note: m4 eats our [], so we need to use [ and ] instead.
17146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17147  if test "x$has_forbidden_chars" != x; then
17148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17152      # Going to short mode and back again did indeed matter. Since short mode is
17153      # case insensitive, let's make it lowercase to improve readability.
17154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17155      # Now convert it back to Unix-style (cygpath)
17156      input_path=`$CYGPATH -u "$shortmode_path"`
17157      new_path="$input_path"
17158    fi
17159  fi
17160
17161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17162  if test "x$test_cygdrive_prefix" = x; then
17163    # As a simple fix, exclude /usr/bin since it's not a real path.
17164    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17166      # a path prefixed by /cygdrive for fixpath to work.
17167      new_path="$CYGWIN_ROOT_PATH$input_path"
17168    fi
17169  fi
17170
17171  # remove trailing .exe if any
17172  new_path="${new_path/%.exe/}"
17173
17174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17175
17176  # First separate the path from the arguments. This will split at the first
17177  # space.
17178  complete="$FOUND_MAKE"
17179  path="${complete%% *}"
17180  tmp="$complete EOL"
17181  arguments="${tmp#* }"
17182
17183  # Input might be given as Windows format, start by converting to
17184  # unix format.
17185  new_path="$path"
17186
17187  windows_path="$new_path"
17188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17189    unix_path=`$CYGPATH -u "$windows_path"`
17190    new_path="$unix_path"
17191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17193    new_path="$unix_path"
17194  fi
17195
17196
17197  # Now try to locate executable using which
17198  new_path=`$WHICH "$new_path" 2> /dev/null`
17199
17200  if test "x$new_path" = x; then
17201    # Oops. Which didn't find the executable.
17202    # The splitting of arguments from the executable at a space might have been incorrect,
17203    # since paths with space are more likely in Windows. Give it another try with the whole
17204    # argument.
17205    path="$complete"
17206    arguments="EOL"
17207    new_path="$path"
17208
17209  windows_path="$new_path"
17210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17211    unix_path=`$CYGPATH -u "$windows_path"`
17212    new_path="$unix_path"
17213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17215    new_path="$unix_path"
17216  fi
17217
17218
17219    new_path=`$WHICH "$new_path" 2> /dev/null`
17220    # bat and cmd files are not always considered executable in MSYS causing which
17221    # to not find them
17222    if test "x$new_path" = x \
17223        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17224        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17225      new_path="$path"
17226
17227  windows_path="$new_path"
17228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17229    unix_path=`$CYGPATH -u "$windows_path"`
17230    new_path="$unix_path"
17231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17233    new_path="$unix_path"
17234  fi
17235
17236    fi
17237
17238    if test "x$new_path" = x; then
17239      # It's still not found. Now this is an unrecoverable error.
17240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17241$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17242      has_space=`$ECHO "$complete" | $GREP " "`
17243      if test "x$has_space" != x; then
17244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17246      fi
17247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17248    fi
17249  fi
17250
17251  # Now new_path has a complete unix path to the binary
17252  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17253    # Keep paths in /bin as-is, but remove trailing .exe if any
17254    new_path="${new_path/%.exe/}"
17255    # Do not save /bin paths to all_fixpath_prefixes!
17256  else
17257    # Not in mixed or Windows style, start by that.
17258    new_path=`cmd //c echo $new_path`
17259
17260  input_path="$new_path"
17261  # Check if we need to convert this using DOS-style short mode. If the path
17262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17263  # take no chances and rewrite it.
17264  # Note: m4 eats our [], so we need to use [ and ] instead.
17265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17266  if test "x$has_forbidden_chars" != x; then
17267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17269  fi
17270
17271    # Output is in $new_path
17272
17273  windows_path="$new_path"
17274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17275    unix_path=`$CYGPATH -u "$windows_path"`
17276    new_path="$unix_path"
17277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17279    new_path="$unix_path"
17280  fi
17281
17282    # remove trailing .exe if any
17283    new_path="${new_path/%.exe/}"
17284
17285    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17286    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17287  fi
17288
17289    else
17290      # We're on a unix platform. Hooray! :)
17291      # First separate the path from the arguments. This will split at the first
17292      # space.
17293      complete="$FOUND_MAKE"
17294      path="${complete%% *}"
17295      tmp="$complete EOL"
17296      arguments="${tmp#* }"
17297
17298      # Cannot rely on the command "which" here since it doesn't always work.
17299      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17300      if test -z "$is_absolute_path"; then
17301        # Path to executable is not absolute. Find it.
17302        IFS_save="$IFS"
17303        IFS=:
17304        for p in $PATH; do
17305          if test -f "$p/$path" && test -x "$p/$path"; then
17306            new_path="$p/$path"
17307            break
17308          fi
17309        done
17310        IFS="$IFS_save"
17311      else
17312        # This is an absolute path, we can use it without further modifications.
17313        new_path="$path"
17314      fi
17315
17316      if test "x$new_path" = x; then
17317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17318$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17319        has_space=`$ECHO "$complete" | $GREP " "`
17320        if test "x$has_space" != x; then
17321          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17322$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17323        fi
17324        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17325      fi
17326    fi
17327
17328    # Now join together the path and the arguments once again
17329    if test "x$arguments" != xEOL; then
17330      new_complete="$new_path ${arguments% *}"
17331    else
17332      new_complete="$new_path"
17333    fi
17334
17335    if test "x$complete" != "x$new_complete"; then
17336      FOUND_MAKE="$new_complete"
17337      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17338$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17339    fi
17340  fi
17341
17342        fi
17343      fi
17344    fi
17345  fi
17346
17347    fi
17348
17349    if test "x$FOUND_MAKE" = x; then
17350      if test "x$TOOLCHAIN_PATH" != x; then
17351        # We have a toolchain path, check that as well before giving up.
17352        OLD_PATH=$PATH
17353        PATH=$TOOLCHAIN_PATH:$PATH
17354        for ac_prog in gmake
17355do
17356  # Extract the first word of "$ac_prog", so it can be a program name with args.
17357set dummy $ac_prog; ac_word=$2
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17359$as_echo_n "checking for $ac_word... " >&6; }
17360if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17361  $as_echo_n "(cached) " >&6
17362else
17363  case $CHECK_TOOLSDIR_GMAKE in
17364  [\\/]* | ?:[\\/]*)
17365  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17366  ;;
17367  *)
17368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17369for as_dir in $PATH
17370do
17371  IFS=$as_save_IFS
17372  test -z "$as_dir" && as_dir=.
17373    for ac_exec_ext in '' $ac_executable_extensions; do
17374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17375    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17377    break 2
17378  fi
17379done
17380  done
17381IFS=$as_save_IFS
17382
17383  ;;
17384esac
17385fi
17386CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17387if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17389$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17390else
17391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17392$as_echo "no" >&6; }
17393fi
17394
17395
17396  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17397done
17398
17399
17400  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17401  DESCRIPTION="gmake in tools-dir"
17402
17403  # On Cygwin, we require a newer version of make than on other platforms
17404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17405    MAKE_VERSION_EXPR="-e 4\."
17406    MAKE_REQUIRED_VERSION="4.0"
17407   else
17408    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17409    MAKE_REQUIRED_VERSION="3.81"
17410  fi
17411
17412  if test "x$MAKE_CANDIDATE" != x; then
17413    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17414$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17415    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17416    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17417    if test "x$IS_GNU_MAKE" = x; then
17418      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17419$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17420    else
17421      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17422      if test "x$IS_MODERN_MAKE" = x; then
17423        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17424$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17425      else
17426        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17427          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17428            MAKE_EXPECTED_ENV='cygwin'
17429          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17430            MAKE_EXPECTED_ENV='msys'
17431          else
17432            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17433          fi
17434          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17435          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17436        else
17437          # Not relevant for non-Windows
17438          IS_MAKE_CORRECT_ENV=true
17439        fi
17440        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17441          { $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
17442$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;}
17443        else
17444          FOUND_MAKE=$MAKE_CANDIDATE
17445
17446  # Only process if variable expands to non-empty
17447
17448  if test "x$FOUND_MAKE" != x; then
17449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17450
17451  # First separate the path from the arguments. This will split at the first
17452  # space.
17453  complete="$FOUND_MAKE"
17454  path="${complete%% *}"
17455  tmp="$complete EOL"
17456  arguments="${tmp#* }"
17457
17458  # Input might be given as Windows format, start by converting to
17459  # unix format.
17460  new_path=`$CYGPATH -u "$path"`
17461
17462  # Now try to locate executable using which
17463  new_path=`$WHICH "$new_path" 2> /dev/null`
17464  # bat and cmd files are not always considered executable in cygwin causing which
17465  # to not find them
17466  if test "x$new_path" = x \
17467      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17468      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17469    new_path=`$CYGPATH -u "$path"`
17470  fi
17471  if test "x$new_path" = x; then
17472    # Oops. Which didn't find the executable.
17473    # The splitting of arguments from the executable at a space might have been incorrect,
17474    # since paths with space are more likely in Windows. Give it another try with the whole
17475    # argument.
17476    path="$complete"
17477    arguments="EOL"
17478    new_path=`$CYGPATH -u "$path"`
17479    new_path=`$WHICH "$new_path" 2> /dev/null`
17480    # bat and cmd files are not always considered executable in cygwin causing which
17481    # to not find them
17482    if test "x$new_path" = x \
17483        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17484        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17485      new_path=`$CYGPATH -u "$path"`
17486    fi
17487    if test "x$new_path" = x; then
17488      # It's still not found. Now this is an unrecoverable error.
17489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17490$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17491      has_space=`$ECHO "$complete" | $GREP " "`
17492      if test "x$has_space" != x; then
17493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17495      fi
17496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17497    fi
17498  fi
17499
17500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17503  # "foo.exe" is OK but "foo" is an error.
17504  #
17505  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17506  # It is also a way to make sure we got the proper file name for the real test later on.
17507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17508  if test "x$test_shortpath" = x; then
17509    # Short path failed, file does not exist as specified.
17510    # Try adding .exe or .cmd
17511    if test -f "${new_path}.exe"; then
17512      input_to_shortpath="${new_path}.exe"
17513    elif test -f "${new_path}.cmd"; then
17514      input_to_shortpath="${new_path}.cmd"
17515    else
17516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17517$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17518      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17519$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17521    fi
17522  else
17523    input_to_shortpath="$new_path"
17524  fi
17525
17526  # Call helper function which possibly converts this using DOS-style short mode.
17527  # If so, the updated path is stored in $new_path.
17528  new_path="$input_to_shortpath"
17529
17530  input_path="$input_to_shortpath"
17531  # Check if we need to convert this using DOS-style short mode. If the path
17532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17533  # take no chances and rewrite it.
17534  # Note: m4 eats our [], so we need to use [ and ] instead.
17535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17536  if test "x$has_forbidden_chars" != x; then
17537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17541      # Going to short mode and back again did indeed matter. Since short mode is
17542      # case insensitive, let's make it lowercase to improve readability.
17543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17544      # Now convert it back to Unix-style (cygpath)
17545      input_path=`$CYGPATH -u "$shortmode_path"`
17546      new_path="$input_path"
17547    fi
17548  fi
17549
17550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17551  if test "x$test_cygdrive_prefix" = x; then
17552    # As a simple fix, exclude /usr/bin since it's not a real path.
17553    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17555      # a path prefixed by /cygdrive for fixpath to work.
17556      new_path="$CYGWIN_ROOT_PATH$input_path"
17557    fi
17558  fi
17559
17560  # remove trailing .exe if any
17561  new_path="${new_path/%.exe/}"
17562
17563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17564
17565  # First separate the path from the arguments. This will split at the first
17566  # space.
17567  complete="$FOUND_MAKE"
17568  path="${complete%% *}"
17569  tmp="$complete EOL"
17570  arguments="${tmp#* }"
17571
17572  # Input might be given as Windows format, start by converting to
17573  # unix format.
17574  new_path="$path"
17575
17576  windows_path="$new_path"
17577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17578    unix_path=`$CYGPATH -u "$windows_path"`
17579    new_path="$unix_path"
17580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17582    new_path="$unix_path"
17583  fi
17584
17585
17586  # Now try to locate executable using which
17587  new_path=`$WHICH "$new_path" 2> /dev/null`
17588
17589  if test "x$new_path" = x; then
17590    # Oops. Which didn't find the executable.
17591    # The splitting of arguments from the executable at a space might have been incorrect,
17592    # since paths with space are more likely in Windows. Give it another try with the whole
17593    # argument.
17594    path="$complete"
17595    arguments="EOL"
17596    new_path="$path"
17597
17598  windows_path="$new_path"
17599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17600    unix_path=`$CYGPATH -u "$windows_path"`
17601    new_path="$unix_path"
17602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17604    new_path="$unix_path"
17605  fi
17606
17607
17608    new_path=`$WHICH "$new_path" 2> /dev/null`
17609    # bat and cmd files are not always considered executable in MSYS causing which
17610    # to not find them
17611    if test "x$new_path" = x \
17612        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17613        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17614      new_path="$path"
17615
17616  windows_path="$new_path"
17617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17618    unix_path=`$CYGPATH -u "$windows_path"`
17619    new_path="$unix_path"
17620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17622    new_path="$unix_path"
17623  fi
17624
17625    fi
17626
17627    if test "x$new_path" = x; then
17628      # It's still not found. Now this is an unrecoverable error.
17629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17630$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17631      has_space=`$ECHO "$complete" | $GREP " "`
17632      if test "x$has_space" != x; then
17633        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17634$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17635      fi
17636      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17637    fi
17638  fi
17639
17640  # Now new_path has a complete unix path to the binary
17641  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17642    # Keep paths in /bin as-is, but remove trailing .exe if any
17643    new_path="${new_path/%.exe/}"
17644    # Do not save /bin paths to all_fixpath_prefixes!
17645  else
17646    # Not in mixed or Windows style, start by that.
17647    new_path=`cmd //c echo $new_path`
17648
17649  input_path="$new_path"
17650  # Check if we need to convert this using DOS-style short mode. If the path
17651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17652  # take no chances and rewrite it.
17653  # Note: m4 eats our [], so we need to use [ and ] instead.
17654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17655  if test "x$has_forbidden_chars" != x; then
17656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17658  fi
17659
17660    # Output is in $new_path
17661
17662  windows_path="$new_path"
17663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17664    unix_path=`$CYGPATH -u "$windows_path"`
17665    new_path="$unix_path"
17666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17668    new_path="$unix_path"
17669  fi
17670
17671    # remove trailing .exe if any
17672    new_path="${new_path/%.exe/}"
17673
17674    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17675    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17676  fi
17677
17678    else
17679      # We're on a unix platform. Hooray! :)
17680      # First separate the path from the arguments. This will split at the first
17681      # space.
17682      complete="$FOUND_MAKE"
17683      path="${complete%% *}"
17684      tmp="$complete EOL"
17685      arguments="${tmp#* }"
17686
17687      # Cannot rely on the command "which" here since it doesn't always work.
17688      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17689      if test -z "$is_absolute_path"; then
17690        # Path to executable is not absolute. Find it.
17691        IFS_save="$IFS"
17692        IFS=:
17693        for p in $PATH; do
17694          if test -f "$p/$path" && test -x "$p/$path"; then
17695            new_path="$p/$path"
17696            break
17697          fi
17698        done
17699        IFS="$IFS_save"
17700      else
17701        # This is an absolute path, we can use it without further modifications.
17702        new_path="$path"
17703      fi
17704
17705      if test "x$new_path" = x; then
17706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17707$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17708        has_space=`$ECHO "$complete" | $GREP " "`
17709        if test "x$has_space" != x; then
17710          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17711$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17712        fi
17713        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17714      fi
17715    fi
17716
17717    # Now join together the path and the arguments once again
17718    if test "x$arguments" != xEOL; then
17719      new_complete="$new_path ${arguments% *}"
17720    else
17721      new_complete="$new_path"
17722    fi
17723
17724    if test "x$complete" != "x$new_complete"; then
17725      FOUND_MAKE="$new_complete"
17726      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17727$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17728    fi
17729  fi
17730
17731        fi
17732      fi
17733    fi
17734  fi
17735
17736        if test "x$FOUND_MAKE" = x; then
17737          for ac_prog in make
17738do
17739  # Extract the first word of "$ac_prog", so it can be a program name with args.
17740set dummy $ac_prog; ac_word=$2
17741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17742$as_echo_n "checking for $ac_word... " >&6; }
17743if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17744  $as_echo_n "(cached) " >&6
17745else
17746  case $CHECK_TOOLSDIR_MAKE in
17747  [\\/]* | ?:[\\/]*)
17748  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17749  ;;
17750  *)
17751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17752for as_dir in $PATH
17753do
17754  IFS=$as_save_IFS
17755  test -z "$as_dir" && as_dir=.
17756    for ac_exec_ext in '' $ac_executable_extensions; do
17757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17758    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17760    break 2
17761  fi
17762done
17763  done
17764IFS=$as_save_IFS
17765
17766  ;;
17767esac
17768fi
17769CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17770if test -n "$CHECK_TOOLSDIR_MAKE"; then
17771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17772$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17773else
17774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17775$as_echo "no" >&6; }
17776fi
17777
17778
17779  test -n "$CHECK_TOOLSDIR_MAKE" && break
17780done
17781
17782
17783  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17784  DESCRIPTION="make in tools-dir"
17785
17786  # On Cygwin, we require a newer version of make than on other platforms
17787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17788    MAKE_VERSION_EXPR="-e 4\."
17789    MAKE_REQUIRED_VERSION="4.0"
17790   else
17791    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17792    MAKE_REQUIRED_VERSION="3.81"
17793  fi
17794
17795  if test "x$MAKE_CANDIDATE" != x; then
17796    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17797$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17798    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17799    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17800    if test "x$IS_GNU_MAKE" = x; then
17801      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17802$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17803    else
17804      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17805      if test "x$IS_MODERN_MAKE" = x; then
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17807$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17808      else
17809        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17810          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17811            MAKE_EXPECTED_ENV='cygwin'
17812          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17813            MAKE_EXPECTED_ENV='msys'
17814          else
17815            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17816          fi
17817          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17818          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17819        else
17820          # Not relevant for non-Windows
17821          IS_MAKE_CORRECT_ENV=true
17822        fi
17823        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17824          { $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
17825$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;}
17826        else
17827          FOUND_MAKE=$MAKE_CANDIDATE
17828
17829  # Only process if variable expands to non-empty
17830
17831  if test "x$FOUND_MAKE" != x; then
17832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17833
17834  # First separate the path from the arguments. This will split at the first
17835  # space.
17836  complete="$FOUND_MAKE"
17837  path="${complete%% *}"
17838  tmp="$complete EOL"
17839  arguments="${tmp#* }"
17840
17841  # Input might be given as Windows format, start by converting to
17842  # unix format.
17843  new_path=`$CYGPATH -u "$path"`
17844
17845  # Now try to locate executable using which
17846  new_path=`$WHICH "$new_path" 2> /dev/null`
17847  # bat and cmd files are not always considered executable in cygwin causing which
17848  # to not find them
17849  if test "x$new_path" = x \
17850      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17851      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17852    new_path=`$CYGPATH -u "$path"`
17853  fi
17854  if test "x$new_path" = x; then
17855    # Oops. Which didn't find the executable.
17856    # The splitting of arguments from the executable at a space might have been incorrect,
17857    # since paths with space are more likely in Windows. Give it another try with the whole
17858    # argument.
17859    path="$complete"
17860    arguments="EOL"
17861    new_path=`$CYGPATH -u "$path"`
17862    new_path=`$WHICH "$new_path" 2> /dev/null`
17863    # bat and cmd files are not always considered executable in cygwin causing which
17864    # to not find them
17865    if test "x$new_path" = x \
17866        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17867        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17868      new_path=`$CYGPATH -u "$path"`
17869    fi
17870    if test "x$new_path" = x; then
17871      # It's still not found. Now this is an unrecoverable error.
17872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17873$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17874      has_space=`$ECHO "$complete" | $GREP " "`
17875      if test "x$has_space" != x; then
17876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17878      fi
17879      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17880    fi
17881  fi
17882
17883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17886  # "foo.exe" is OK but "foo" is an error.
17887  #
17888  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17889  # It is also a way to make sure we got the proper file name for the real test later on.
17890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17891  if test "x$test_shortpath" = x; then
17892    # Short path failed, file does not exist as specified.
17893    # Try adding .exe or .cmd
17894    if test -f "${new_path}.exe"; then
17895      input_to_shortpath="${new_path}.exe"
17896    elif test -f "${new_path}.cmd"; then
17897      input_to_shortpath="${new_path}.cmd"
17898    else
17899      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17900$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17901      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17902$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17903      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17904    fi
17905  else
17906    input_to_shortpath="$new_path"
17907  fi
17908
17909  # Call helper function which possibly converts this using DOS-style short mode.
17910  # If so, the updated path is stored in $new_path.
17911  new_path="$input_to_shortpath"
17912
17913  input_path="$input_to_shortpath"
17914  # Check if we need to convert this using DOS-style short mode. If the path
17915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17916  # take no chances and rewrite it.
17917  # Note: m4 eats our [], so we need to use [ and ] instead.
17918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17919  if test "x$has_forbidden_chars" != x; then
17920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17924      # Going to short mode and back again did indeed matter. Since short mode is
17925      # case insensitive, let's make it lowercase to improve readability.
17926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17927      # Now convert it back to Unix-style (cygpath)
17928      input_path=`$CYGPATH -u "$shortmode_path"`
17929      new_path="$input_path"
17930    fi
17931  fi
17932
17933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17934  if test "x$test_cygdrive_prefix" = x; then
17935    # As a simple fix, exclude /usr/bin since it's not a real path.
17936    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17938      # a path prefixed by /cygdrive for fixpath to work.
17939      new_path="$CYGWIN_ROOT_PATH$input_path"
17940    fi
17941  fi
17942
17943  # remove trailing .exe if any
17944  new_path="${new_path/%.exe/}"
17945
17946    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17947
17948  # First separate the path from the arguments. This will split at the first
17949  # space.
17950  complete="$FOUND_MAKE"
17951  path="${complete%% *}"
17952  tmp="$complete EOL"
17953  arguments="${tmp#* }"
17954
17955  # Input might be given as Windows format, start by converting to
17956  # unix format.
17957  new_path="$path"
17958
17959  windows_path="$new_path"
17960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17961    unix_path=`$CYGPATH -u "$windows_path"`
17962    new_path="$unix_path"
17963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17965    new_path="$unix_path"
17966  fi
17967
17968
17969  # Now try to locate executable using which
17970  new_path=`$WHICH "$new_path" 2> /dev/null`
17971
17972  if test "x$new_path" = x; then
17973    # Oops. Which didn't find the executable.
17974    # The splitting of arguments from the executable at a space might have been incorrect,
17975    # since paths with space are more likely in Windows. Give it another try with the whole
17976    # argument.
17977    path="$complete"
17978    arguments="EOL"
17979    new_path="$path"
17980
17981  windows_path="$new_path"
17982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17983    unix_path=`$CYGPATH -u "$windows_path"`
17984    new_path="$unix_path"
17985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17987    new_path="$unix_path"
17988  fi
17989
17990
17991    new_path=`$WHICH "$new_path" 2> /dev/null`
17992    # bat and cmd files are not always considered executable in MSYS causing which
17993    # to not find them
17994    if test "x$new_path" = x \
17995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17997      new_path="$path"
17998
17999  windows_path="$new_path"
18000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18001    unix_path=`$CYGPATH -u "$windows_path"`
18002    new_path="$unix_path"
18003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18005    new_path="$unix_path"
18006  fi
18007
18008    fi
18009
18010    if test "x$new_path" = x; then
18011      # It's still not found. Now this is an unrecoverable error.
18012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18014      has_space=`$ECHO "$complete" | $GREP " "`
18015      if test "x$has_space" != x; then
18016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18018      fi
18019      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18020    fi
18021  fi
18022
18023  # Now new_path has a complete unix path to the binary
18024  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18025    # Keep paths in /bin as-is, but remove trailing .exe if any
18026    new_path="${new_path/%.exe/}"
18027    # Do not save /bin paths to all_fixpath_prefixes!
18028  else
18029    # Not in mixed or Windows style, start by that.
18030    new_path=`cmd //c echo $new_path`
18031
18032  input_path="$new_path"
18033  # Check if we need to convert this using DOS-style short mode. If the path
18034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18035  # take no chances and rewrite it.
18036  # Note: m4 eats our [], so we need to use [ and ] instead.
18037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18038  if test "x$has_forbidden_chars" != x; then
18039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18041  fi
18042
18043    # Output is in $new_path
18044
18045  windows_path="$new_path"
18046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18047    unix_path=`$CYGPATH -u "$windows_path"`
18048    new_path="$unix_path"
18049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18051    new_path="$unix_path"
18052  fi
18053
18054    # remove trailing .exe if any
18055    new_path="${new_path/%.exe/}"
18056
18057    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18058    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18059  fi
18060
18061    else
18062      # We're on a unix platform. Hooray! :)
18063      # First separate the path from the arguments. This will split at the first
18064      # space.
18065      complete="$FOUND_MAKE"
18066      path="${complete%% *}"
18067      tmp="$complete EOL"
18068      arguments="${tmp#* }"
18069
18070      # Cannot rely on the command "which" here since it doesn't always work.
18071      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18072      if test -z "$is_absolute_path"; then
18073        # Path to executable is not absolute. Find it.
18074        IFS_save="$IFS"
18075        IFS=:
18076        for p in $PATH; do
18077          if test -f "$p/$path" && test -x "$p/$path"; then
18078            new_path="$p/$path"
18079            break
18080          fi
18081        done
18082        IFS="$IFS_save"
18083      else
18084        # This is an absolute path, we can use it without further modifications.
18085        new_path="$path"
18086      fi
18087
18088      if test "x$new_path" = x; then
18089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18090$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18091        has_space=`$ECHO "$complete" | $GREP " "`
18092        if test "x$has_space" != x; then
18093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18095        fi
18096        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18097      fi
18098    fi
18099
18100    # Now join together the path and the arguments once again
18101    if test "x$arguments" != xEOL; then
18102      new_complete="$new_path ${arguments% *}"
18103    else
18104      new_complete="$new_path"
18105    fi
18106
18107    if test "x$complete" != "x$new_complete"; then
18108      FOUND_MAKE="$new_complete"
18109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18110$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18111    fi
18112  fi
18113
18114        fi
18115      fi
18116    fi
18117  fi
18118
18119        fi
18120        PATH=$OLD_PATH
18121      fi
18122    fi
18123
18124    if test "x$FOUND_MAKE" = x; then
18125      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
18126    fi
18127
18128  else
18129    # The variable is set, but is it from the command line or the environment?
18130
18131    # Try to remove the string !MAKE! from our list.
18132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18134      # If it failed, the variable was not from the command line. Ignore it,
18135      # but warn the user (except for BASH, which is always set by the calling BASH).
18136      if test "xMAKE" != xBASH; then
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18138$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18139      fi
18140      # Try to locate tool using the code snippet
18141
18142    # Try our hardest to locate a correct version of GNU make
18143    for ac_prog in gmake
18144do
18145  # Extract the first word of "$ac_prog", so it can be a program name with args.
18146set dummy $ac_prog; ac_word=$2
18147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18148$as_echo_n "checking for $ac_word... " >&6; }
18149if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18150  $as_echo_n "(cached) " >&6
18151else
18152  case $CHECK_GMAKE in
18153  [\\/]* | ?:[\\/]*)
18154  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18155  ;;
18156  *)
18157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18158for as_dir in $PATH
18159do
18160  IFS=$as_save_IFS
18161  test -z "$as_dir" && as_dir=.
18162    for ac_exec_ext in '' $ac_executable_extensions; do
18163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18164    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18166    break 2
18167  fi
18168done
18169  done
18170IFS=$as_save_IFS
18171
18172  ;;
18173esac
18174fi
18175CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18176if test -n "$CHECK_GMAKE"; then
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18178$as_echo "$CHECK_GMAKE" >&6; }
18179else
18180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18181$as_echo "no" >&6; }
18182fi
18183
18184
18185  test -n "$CHECK_GMAKE" && break
18186done
18187
18188
18189  MAKE_CANDIDATE=""$CHECK_GMAKE""
18190  DESCRIPTION="gmake in PATH"
18191
18192  # On Cygwin, we require a newer version of make than on other platforms
18193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18194    MAKE_VERSION_EXPR="-e 4\."
18195    MAKE_REQUIRED_VERSION="4.0"
18196   else
18197    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18198    MAKE_REQUIRED_VERSION="3.81"
18199  fi
18200
18201  if test "x$MAKE_CANDIDATE" != x; then
18202    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18203$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18204    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18205    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18206    if test "x$IS_GNU_MAKE" = x; then
18207      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18208$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18209    else
18210      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18211      if test "x$IS_MODERN_MAKE" = x; then
18212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18213$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18214      else
18215        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18216          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18217            MAKE_EXPECTED_ENV='cygwin'
18218          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219            MAKE_EXPECTED_ENV='msys'
18220          else
18221            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18222          fi
18223          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18224          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18225        else
18226          # Not relevant for non-Windows
18227          IS_MAKE_CORRECT_ENV=true
18228        fi
18229        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18230          { $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
18231$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;}
18232        else
18233          FOUND_MAKE=$MAKE_CANDIDATE
18234
18235  # Only process if variable expands to non-empty
18236
18237  if test "x$FOUND_MAKE" != x; then
18238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18239
18240  # First separate the path from the arguments. This will split at the first
18241  # space.
18242  complete="$FOUND_MAKE"
18243  path="${complete%% *}"
18244  tmp="$complete EOL"
18245  arguments="${tmp#* }"
18246
18247  # Input might be given as Windows format, start by converting to
18248  # unix format.
18249  new_path=`$CYGPATH -u "$path"`
18250
18251  # Now try to locate executable using which
18252  new_path=`$WHICH "$new_path" 2> /dev/null`
18253  # bat and cmd files are not always considered executable in cygwin causing which
18254  # to not find them
18255  if test "x$new_path" = x \
18256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18258    new_path=`$CYGPATH -u "$path"`
18259  fi
18260  if test "x$new_path" = x; then
18261    # Oops. Which didn't find the executable.
18262    # The splitting of arguments from the executable at a space might have been incorrect,
18263    # since paths with space are more likely in Windows. Give it another try with the whole
18264    # argument.
18265    path="$complete"
18266    arguments="EOL"
18267    new_path=`$CYGPATH -u "$path"`
18268    new_path=`$WHICH "$new_path" 2> /dev/null`
18269    # bat and cmd files are not always considered executable in cygwin causing which
18270    # to not find them
18271    if test "x$new_path" = x \
18272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18274      new_path=`$CYGPATH -u "$path"`
18275    fi
18276    if test "x$new_path" = x; then
18277      # It's still not found. Now this is an unrecoverable error.
18278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18279$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18280      has_space=`$ECHO "$complete" | $GREP " "`
18281      if test "x$has_space" != x; then
18282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18284      fi
18285      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18286    fi
18287  fi
18288
18289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18292  # "foo.exe" is OK but "foo" is an error.
18293  #
18294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18295  # It is also a way to make sure we got the proper file name for the real test later on.
18296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18297  if test "x$test_shortpath" = x; then
18298    # Short path failed, file does not exist as specified.
18299    # Try adding .exe or .cmd
18300    if test -f "${new_path}.exe"; then
18301      input_to_shortpath="${new_path}.exe"
18302    elif test -f "${new_path}.cmd"; then
18303      input_to_shortpath="${new_path}.cmd"
18304    else
18305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18306$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18310    fi
18311  else
18312    input_to_shortpath="$new_path"
18313  fi
18314
18315  # Call helper function which possibly converts this using DOS-style short mode.
18316  # If so, the updated path is stored in $new_path.
18317  new_path="$input_to_shortpath"
18318
18319  input_path="$input_to_shortpath"
18320  # Check if we need to convert this using DOS-style short mode. If the path
18321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18322  # take no chances and rewrite it.
18323  # Note: m4 eats our [], so we need to use [ and ] instead.
18324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18325  if test "x$has_forbidden_chars" != x; then
18326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18330      # Going to short mode and back again did indeed matter. Since short mode is
18331      # case insensitive, let's make it lowercase to improve readability.
18332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18333      # Now convert it back to Unix-style (cygpath)
18334      input_path=`$CYGPATH -u "$shortmode_path"`
18335      new_path="$input_path"
18336    fi
18337  fi
18338
18339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18340  if test "x$test_cygdrive_prefix" = x; then
18341    # As a simple fix, exclude /usr/bin since it's not a real path.
18342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18344      # a path prefixed by /cygdrive for fixpath to work.
18345      new_path="$CYGWIN_ROOT_PATH$input_path"
18346    fi
18347  fi
18348
18349  # remove trailing .exe if any
18350  new_path="${new_path/%.exe/}"
18351
18352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18353
18354  # First separate the path from the arguments. This will split at the first
18355  # space.
18356  complete="$FOUND_MAKE"
18357  path="${complete%% *}"
18358  tmp="$complete EOL"
18359  arguments="${tmp#* }"
18360
18361  # Input might be given as Windows format, start by converting to
18362  # unix format.
18363  new_path="$path"
18364
18365  windows_path="$new_path"
18366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18367    unix_path=`$CYGPATH -u "$windows_path"`
18368    new_path="$unix_path"
18369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18371    new_path="$unix_path"
18372  fi
18373
18374
18375  # Now try to locate executable using which
18376  new_path=`$WHICH "$new_path" 2> /dev/null`
18377
18378  if test "x$new_path" = x; then
18379    # Oops. Which didn't find the executable.
18380    # The splitting of arguments from the executable at a space might have been incorrect,
18381    # since paths with space are more likely in Windows. Give it another try with the whole
18382    # argument.
18383    path="$complete"
18384    arguments="EOL"
18385    new_path="$path"
18386
18387  windows_path="$new_path"
18388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18389    unix_path=`$CYGPATH -u "$windows_path"`
18390    new_path="$unix_path"
18391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18393    new_path="$unix_path"
18394  fi
18395
18396
18397    new_path=`$WHICH "$new_path" 2> /dev/null`
18398    # bat and cmd files are not always considered executable in MSYS causing which
18399    # to not find them
18400    if test "x$new_path" = x \
18401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18403      new_path="$path"
18404
18405  windows_path="$new_path"
18406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18407    unix_path=`$CYGPATH -u "$windows_path"`
18408    new_path="$unix_path"
18409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18411    new_path="$unix_path"
18412  fi
18413
18414    fi
18415
18416    if test "x$new_path" = x; then
18417      # It's still not found. Now this is an unrecoverable error.
18418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18420      has_space=`$ECHO "$complete" | $GREP " "`
18421      if test "x$has_space" != x; then
18422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18424      fi
18425      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18426    fi
18427  fi
18428
18429  # Now new_path has a complete unix path to the binary
18430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18431    # Keep paths in /bin as-is, but remove trailing .exe if any
18432    new_path="${new_path/%.exe/}"
18433    # Do not save /bin paths to all_fixpath_prefixes!
18434  else
18435    # Not in mixed or Windows style, start by that.
18436    new_path=`cmd //c echo $new_path`
18437
18438  input_path="$new_path"
18439  # Check if we need to convert this using DOS-style short mode. If the path
18440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18441  # take no chances and rewrite it.
18442  # Note: m4 eats our [], so we need to use [ and ] instead.
18443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18444  if test "x$has_forbidden_chars" != x; then
18445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18447  fi
18448
18449    # Output is in $new_path
18450
18451  windows_path="$new_path"
18452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18453    unix_path=`$CYGPATH -u "$windows_path"`
18454    new_path="$unix_path"
18455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18457    new_path="$unix_path"
18458  fi
18459
18460    # remove trailing .exe if any
18461    new_path="${new_path/%.exe/}"
18462
18463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18465  fi
18466
18467    else
18468      # We're on a unix platform. Hooray! :)
18469      # First separate the path from the arguments. This will split at the first
18470      # space.
18471      complete="$FOUND_MAKE"
18472      path="${complete%% *}"
18473      tmp="$complete EOL"
18474      arguments="${tmp#* }"
18475
18476      # Cannot rely on the command "which" here since it doesn't always work.
18477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18478      if test -z "$is_absolute_path"; then
18479        # Path to executable is not absolute. Find it.
18480        IFS_save="$IFS"
18481        IFS=:
18482        for p in $PATH; do
18483          if test -f "$p/$path" && test -x "$p/$path"; then
18484            new_path="$p/$path"
18485            break
18486          fi
18487        done
18488        IFS="$IFS_save"
18489      else
18490        # This is an absolute path, we can use it without further modifications.
18491        new_path="$path"
18492      fi
18493
18494      if test "x$new_path" = x; then
18495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18497        has_space=`$ECHO "$complete" | $GREP " "`
18498        if test "x$has_space" != x; then
18499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18501        fi
18502        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18503      fi
18504    fi
18505
18506    # Now join together the path and the arguments once again
18507    if test "x$arguments" != xEOL; then
18508      new_complete="$new_path ${arguments% *}"
18509    else
18510      new_complete="$new_path"
18511    fi
18512
18513    if test "x$complete" != "x$new_complete"; then
18514      FOUND_MAKE="$new_complete"
18515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18516$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18517    fi
18518  fi
18519
18520        fi
18521      fi
18522    fi
18523  fi
18524
18525
18526    if test "x$FOUND_MAKE" = x; then
18527      for ac_prog in make
18528do
18529  # Extract the first word of "$ac_prog", so it can be a program name with args.
18530set dummy $ac_prog; ac_word=$2
18531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18532$as_echo_n "checking for $ac_word... " >&6; }
18533if ${ac_cv_path_CHECK_MAKE+:} false; then :
18534  $as_echo_n "(cached) " >&6
18535else
18536  case $CHECK_MAKE in
18537  [\\/]* | ?:[\\/]*)
18538  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18539  ;;
18540  *)
18541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18542for as_dir in $PATH
18543do
18544  IFS=$as_save_IFS
18545  test -z "$as_dir" && as_dir=.
18546    for ac_exec_ext in '' $ac_executable_extensions; do
18547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18548    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18550    break 2
18551  fi
18552done
18553  done
18554IFS=$as_save_IFS
18555
18556  ;;
18557esac
18558fi
18559CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18560if test -n "$CHECK_MAKE"; then
18561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18562$as_echo "$CHECK_MAKE" >&6; }
18563else
18564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18565$as_echo "no" >&6; }
18566fi
18567
18568
18569  test -n "$CHECK_MAKE" && break
18570done
18571
18572
18573  MAKE_CANDIDATE=""$CHECK_MAKE""
18574  DESCRIPTION="make in PATH"
18575
18576  # On Cygwin, we require a newer version of make than on other platforms
18577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18578    MAKE_VERSION_EXPR="-e 4\."
18579    MAKE_REQUIRED_VERSION="4.0"
18580   else
18581    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18582    MAKE_REQUIRED_VERSION="3.81"
18583  fi
18584
18585  if test "x$MAKE_CANDIDATE" != x; then
18586    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18587$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18588    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18589    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18590    if test "x$IS_GNU_MAKE" = x; then
18591      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18592$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18593    else
18594      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18595      if test "x$IS_MODERN_MAKE" = x; then
18596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18597$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18598      else
18599        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18600          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18601            MAKE_EXPECTED_ENV='cygwin'
18602          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18603            MAKE_EXPECTED_ENV='msys'
18604          else
18605            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18606          fi
18607          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18608          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18609        else
18610          # Not relevant for non-Windows
18611          IS_MAKE_CORRECT_ENV=true
18612        fi
18613        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18614          { $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
18615$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;}
18616        else
18617          FOUND_MAKE=$MAKE_CANDIDATE
18618
18619  # Only process if variable expands to non-empty
18620
18621  if test "x$FOUND_MAKE" != x; then
18622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18623
18624  # First separate the path from the arguments. This will split at the first
18625  # space.
18626  complete="$FOUND_MAKE"
18627  path="${complete%% *}"
18628  tmp="$complete EOL"
18629  arguments="${tmp#* }"
18630
18631  # Input might be given as Windows format, start by converting to
18632  # unix format.
18633  new_path=`$CYGPATH -u "$path"`
18634
18635  # Now try to locate executable using which
18636  new_path=`$WHICH "$new_path" 2> /dev/null`
18637  # bat and cmd files are not always considered executable in cygwin causing which
18638  # to not find them
18639  if test "x$new_path" = x \
18640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18642    new_path=`$CYGPATH -u "$path"`
18643  fi
18644  if test "x$new_path" = x; then
18645    # Oops. Which didn't find the executable.
18646    # The splitting of arguments from the executable at a space might have been incorrect,
18647    # since paths with space are more likely in Windows. Give it another try with the whole
18648    # argument.
18649    path="$complete"
18650    arguments="EOL"
18651    new_path=`$CYGPATH -u "$path"`
18652    new_path=`$WHICH "$new_path" 2> /dev/null`
18653    # bat and cmd files are not always considered executable in cygwin causing which
18654    # to not find them
18655    if test "x$new_path" = x \
18656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18658      new_path=`$CYGPATH -u "$path"`
18659    fi
18660    if test "x$new_path" = x; then
18661      # It's still not found. Now this is an unrecoverable error.
18662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18663$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18664      has_space=`$ECHO "$complete" | $GREP " "`
18665      if test "x$has_space" != x; then
18666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18668      fi
18669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18670    fi
18671  fi
18672
18673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18676  # "foo.exe" is OK but "foo" is an error.
18677  #
18678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18679  # It is also a way to make sure we got the proper file name for the real test later on.
18680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18681  if test "x$test_shortpath" = x; then
18682    # Short path failed, file does not exist as specified.
18683    # Try adding .exe or .cmd
18684    if test -f "${new_path}.exe"; then
18685      input_to_shortpath="${new_path}.exe"
18686    elif test -f "${new_path}.cmd"; then
18687      input_to_shortpath="${new_path}.cmd"
18688    else
18689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18694    fi
18695  else
18696    input_to_shortpath="$new_path"
18697  fi
18698
18699  # Call helper function which possibly converts this using DOS-style short mode.
18700  # If so, the updated path is stored in $new_path.
18701  new_path="$input_to_shortpath"
18702
18703  input_path="$input_to_shortpath"
18704  # Check if we need to convert this using DOS-style short mode. If the path
18705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18706  # take no chances and rewrite it.
18707  # Note: m4 eats our [], so we need to use [ and ] instead.
18708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18709  if test "x$has_forbidden_chars" != x; then
18710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18714      # Going to short mode and back again did indeed matter. Since short mode is
18715      # case insensitive, let's make it lowercase to improve readability.
18716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18717      # Now convert it back to Unix-style (cygpath)
18718      input_path=`$CYGPATH -u "$shortmode_path"`
18719      new_path="$input_path"
18720    fi
18721  fi
18722
18723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18724  if test "x$test_cygdrive_prefix" = x; then
18725    # As a simple fix, exclude /usr/bin since it's not a real path.
18726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18728      # a path prefixed by /cygdrive for fixpath to work.
18729      new_path="$CYGWIN_ROOT_PATH$input_path"
18730    fi
18731  fi
18732
18733  # remove trailing .exe if any
18734  new_path="${new_path/%.exe/}"
18735
18736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18737
18738  # First separate the path from the arguments. This will split at the first
18739  # space.
18740  complete="$FOUND_MAKE"
18741  path="${complete%% *}"
18742  tmp="$complete EOL"
18743  arguments="${tmp#* }"
18744
18745  # Input might be given as Windows format, start by converting to
18746  # unix format.
18747  new_path="$path"
18748
18749  windows_path="$new_path"
18750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18751    unix_path=`$CYGPATH -u "$windows_path"`
18752    new_path="$unix_path"
18753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18755    new_path="$unix_path"
18756  fi
18757
18758
18759  # Now try to locate executable using which
18760  new_path=`$WHICH "$new_path" 2> /dev/null`
18761
18762  if test "x$new_path" = x; then
18763    # Oops. Which didn't find the executable.
18764    # The splitting of arguments from the executable at a space might have been incorrect,
18765    # since paths with space are more likely in Windows. Give it another try with the whole
18766    # argument.
18767    path="$complete"
18768    arguments="EOL"
18769    new_path="$path"
18770
18771  windows_path="$new_path"
18772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18773    unix_path=`$CYGPATH -u "$windows_path"`
18774    new_path="$unix_path"
18775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18777    new_path="$unix_path"
18778  fi
18779
18780
18781    new_path=`$WHICH "$new_path" 2> /dev/null`
18782    # bat and cmd files are not always considered executable in MSYS causing which
18783    # to not find them
18784    if test "x$new_path" = x \
18785        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18786        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18787      new_path="$path"
18788
18789  windows_path="$new_path"
18790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791    unix_path=`$CYGPATH -u "$windows_path"`
18792    new_path="$unix_path"
18793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18795    new_path="$unix_path"
18796  fi
18797
18798    fi
18799
18800    if test "x$new_path" = x; then
18801      # It's still not found. Now this is an unrecoverable error.
18802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18803$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18804      has_space=`$ECHO "$complete" | $GREP " "`
18805      if test "x$has_space" != x; then
18806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18808      fi
18809      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18810    fi
18811  fi
18812
18813  # Now new_path has a complete unix path to the binary
18814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18815    # Keep paths in /bin as-is, but remove trailing .exe if any
18816    new_path="${new_path/%.exe/}"
18817    # Do not save /bin paths to all_fixpath_prefixes!
18818  else
18819    # Not in mixed or Windows style, start by that.
18820    new_path=`cmd //c echo $new_path`
18821
18822  input_path="$new_path"
18823  # Check if we need to convert this using DOS-style short mode. If the path
18824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18825  # take no chances and rewrite it.
18826  # Note: m4 eats our [], so we need to use [ and ] instead.
18827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18828  if test "x$has_forbidden_chars" != x; then
18829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18831  fi
18832
18833    # Output is in $new_path
18834
18835  windows_path="$new_path"
18836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18837    unix_path=`$CYGPATH -u "$windows_path"`
18838    new_path="$unix_path"
18839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18841    new_path="$unix_path"
18842  fi
18843
18844    # remove trailing .exe if any
18845    new_path="${new_path/%.exe/}"
18846
18847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18849  fi
18850
18851    else
18852      # We're on a unix platform. Hooray! :)
18853      # First separate the path from the arguments. This will split at the first
18854      # space.
18855      complete="$FOUND_MAKE"
18856      path="${complete%% *}"
18857      tmp="$complete EOL"
18858      arguments="${tmp#* }"
18859
18860      # Cannot rely on the command "which" here since it doesn't always work.
18861      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18862      if test -z "$is_absolute_path"; then
18863        # Path to executable is not absolute. Find it.
18864        IFS_save="$IFS"
18865        IFS=:
18866        for p in $PATH; do
18867          if test -f "$p/$path" && test -x "$p/$path"; then
18868            new_path="$p/$path"
18869            break
18870          fi
18871        done
18872        IFS="$IFS_save"
18873      else
18874        # This is an absolute path, we can use it without further modifications.
18875        new_path="$path"
18876      fi
18877
18878      if test "x$new_path" = x; then
18879        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18880$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18881        has_space=`$ECHO "$complete" | $GREP " "`
18882        if test "x$has_space" != x; then
18883          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18884$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18885        fi
18886        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18887      fi
18888    fi
18889
18890    # Now join together the path and the arguments once again
18891    if test "x$arguments" != xEOL; then
18892      new_complete="$new_path ${arguments% *}"
18893    else
18894      new_complete="$new_path"
18895    fi
18896
18897    if test "x$complete" != "x$new_complete"; then
18898      FOUND_MAKE="$new_complete"
18899      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18900$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18901    fi
18902  fi
18903
18904        fi
18905      fi
18906    fi
18907  fi
18908
18909    fi
18910
18911    if test "x$FOUND_MAKE" = x; then
18912      if test "x$TOOLCHAIN_PATH" != x; then
18913        # We have a toolchain path, check that as well before giving up.
18914        OLD_PATH=$PATH
18915        PATH=$TOOLCHAIN_PATH:$PATH
18916        for ac_prog in gmake
18917do
18918  # Extract the first word of "$ac_prog", so it can be a program name with args.
18919set dummy $ac_prog; ac_word=$2
18920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18921$as_echo_n "checking for $ac_word... " >&6; }
18922if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18923  $as_echo_n "(cached) " >&6
18924else
18925  case $CHECK_TOOLSDIR_GMAKE in
18926  [\\/]* | ?:[\\/]*)
18927  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18928  ;;
18929  *)
18930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18931for as_dir in $PATH
18932do
18933  IFS=$as_save_IFS
18934  test -z "$as_dir" && as_dir=.
18935    for ac_exec_ext in '' $ac_executable_extensions; do
18936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18937    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18939    break 2
18940  fi
18941done
18942  done
18943IFS=$as_save_IFS
18944
18945  ;;
18946esac
18947fi
18948CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18949if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18951$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18952else
18953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18954$as_echo "no" >&6; }
18955fi
18956
18957
18958  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18959done
18960
18961
18962  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18963  DESCRIPTION="gmake in tools-dir"
18964
18965  # On Cygwin, we require a newer version of make than on other platforms
18966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18967    MAKE_VERSION_EXPR="-e 4\."
18968    MAKE_REQUIRED_VERSION="4.0"
18969   else
18970    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18971    MAKE_REQUIRED_VERSION="3.81"
18972  fi
18973
18974  if test "x$MAKE_CANDIDATE" != x; then
18975    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18976$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18977    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18978    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18979    if test "x$IS_GNU_MAKE" = x; then
18980      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18981$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18982    else
18983      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18984      if test "x$IS_MODERN_MAKE" = x; then
18985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18986$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18987      else
18988        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18989          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18990            MAKE_EXPECTED_ENV='cygwin'
18991          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18992            MAKE_EXPECTED_ENV='msys'
18993          else
18994            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18995          fi
18996          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18997          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18998        else
18999          # Not relevant for non-Windows
19000          IS_MAKE_CORRECT_ENV=true
19001        fi
19002        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19003          { $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
19004$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;}
19005        else
19006          FOUND_MAKE=$MAKE_CANDIDATE
19007
19008  # Only process if variable expands to non-empty
19009
19010  if test "x$FOUND_MAKE" != x; then
19011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19012
19013  # First separate the path from the arguments. This will split at the first
19014  # space.
19015  complete="$FOUND_MAKE"
19016  path="${complete%% *}"
19017  tmp="$complete EOL"
19018  arguments="${tmp#* }"
19019
19020  # Input might be given as Windows format, start by converting to
19021  # unix format.
19022  new_path=`$CYGPATH -u "$path"`
19023
19024  # Now try to locate executable using which
19025  new_path=`$WHICH "$new_path" 2> /dev/null`
19026  # bat and cmd files are not always considered executable in cygwin causing which
19027  # to not find them
19028  if test "x$new_path" = x \
19029      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19030      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19031    new_path=`$CYGPATH -u "$path"`
19032  fi
19033  if test "x$new_path" = x; then
19034    # Oops. Which didn't find the executable.
19035    # The splitting of arguments from the executable at a space might have been incorrect,
19036    # since paths with space are more likely in Windows. Give it another try with the whole
19037    # argument.
19038    path="$complete"
19039    arguments="EOL"
19040    new_path=`$CYGPATH -u "$path"`
19041    new_path=`$WHICH "$new_path" 2> /dev/null`
19042    # bat and cmd files are not always considered executable in cygwin causing which
19043    # to not find them
19044    if test "x$new_path" = x \
19045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19047      new_path=`$CYGPATH -u "$path"`
19048    fi
19049    if test "x$new_path" = x; then
19050      # It's still not found. Now this is an unrecoverable error.
19051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19053      has_space=`$ECHO "$complete" | $GREP " "`
19054      if test "x$has_space" != x; then
19055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19057      fi
19058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19059    fi
19060  fi
19061
19062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19065  # "foo.exe" is OK but "foo" is an error.
19066  #
19067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19068  # It is also a way to make sure we got the proper file name for the real test later on.
19069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19070  if test "x$test_shortpath" = x; then
19071    # Short path failed, file does not exist as specified.
19072    # Try adding .exe or .cmd
19073    if test -f "${new_path}.exe"; then
19074      input_to_shortpath="${new_path}.exe"
19075    elif test -f "${new_path}.cmd"; then
19076      input_to_shortpath="${new_path}.cmd"
19077    else
19078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19079$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19082      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19083    fi
19084  else
19085    input_to_shortpath="$new_path"
19086  fi
19087
19088  # Call helper function which possibly converts this using DOS-style short mode.
19089  # If so, the updated path is stored in $new_path.
19090  new_path="$input_to_shortpath"
19091
19092  input_path="$input_to_shortpath"
19093  # Check if we need to convert this using DOS-style short mode. If the path
19094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19095  # take no chances and rewrite it.
19096  # Note: m4 eats our [], so we need to use [ and ] instead.
19097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19098  if test "x$has_forbidden_chars" != x; then
19099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19103      # Going to short mode and back again did indeed matter. Since short mode is
19104      # case insensitive, let's make it lowercase to improve readability.
19105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19106      # Now convert it back to Unix-style (cygpath)
19107      input_path=`$CYGPATH -u "$shortmode_path"`
19108      new_path="$input_path"
19109    fi
19110  fi
19111
19112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19113  if test "x$test_cygdrive_prefix" = x; then
19114    # As a simple fix, exclude /usr/bin since it's not a real path.
19115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19117      # a path prefixed by /cygdrive for fixpath to work.
19118      new_path="$CYGWIN_ROOT_PATH$input_path"
19119    fi
19120  fi
19121
19122  # remove trailing .exe if any
19123  new_path="${new_path/%.exe/}"
19124
19125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19126
19127  # First separate the path from the arguments. This will split at the first
19128  # space.
19129  complete="$FOUND_MAKE"
19130  path="${complete%% *}"
19131  tmp="$complete EOL"
19132  arguments="${tmp#* }"
19133
19134  # Input might be given as Windows format, start by converting to
19135  # unix format.
19136  new_path="$path"
19137
19138  windows_path="$new_path"
19139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19140    unix_path=`$CYGPATH -u "$windows_path"`
19141    new_path="$unix_path"
19142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19144    new_path="$unix_path"
19145  fi
19146
19147
19148  # Now try to locate executable using which
19149  new_path=`$WHICH "$new_path" 2> /dev/null`
19150
19151  if test "x$new_path" = x; then
19152    # Oops. Which didn't find the executable.
19153    # The splitting of arguments from the executable at a space might have been incorrect,
19154    # since paths with space are more likely in Windows. Give it another try with the whole
19155    # argument.
19156    path="$complete"
19157    arguments="EOL"
19158    new_path="$path"
19159
19160  windows_path="$new_path"
19161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19162    unix_path=`$CYGPATH -u "$windows_path"`
19163    new_path="$unix_path"
19164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19166    new_path="$unix_path"
19167  fi
19168
19169
19170    new_path=`$WHICH "$new_path" 2> /dev/null`
19171    # bat and cmd files are not always considered executable in MSYS causing which
19172    # to not find them
19173    if test "x$new_path" = x \
19174        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19175        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19176      new_path="$path"
19177
19178  windows_path="$new_path"
19179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19180    unix_path=`$CYGPATH -u "$windows_path"`
19181    new_path="$unix_path"
19182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19184    new_path="$unix_path"
19185  fi
19186
19187    fi
19188
19189    if test "x$new_path" = x; then
19190      # It's still not found. Now this is an unrecoverable error.
19191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19192$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19193      has_space=`$ECHO "$complete" | $GREP " "`
19194      if test "x$has_space" != x; then
19195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19197      fi
19198      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19199    fi
19200  fi
19201
19202  # Now new_path has a complete unix path to the binary
19203  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19204    # Keep paths in /bin as-is, but remove trailing .exe if any
19205    new_path="${new_path/%.exe/}"
19206    # Do not save /bin paths to all_fixpath_prefixes!
19207  else
19208    # Not in mixed or Windows style, start by that.
19209    new_path=`cmd //c echo $new_path`
19210
19211  input_path="$new_path"
19212  # Check if we need to convert this using DOS-style short mode. If the path
19213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19214  # take no chances and rewrite it.
19215  # Note: m4 eats our [], so we need to use [ and ] instead.
19216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19217  if test "x$has_forbidden_chars" != x; then
19218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19220  fi
19221
19222    # Output is in $new_path
19223
19224  windows_path="$new_path"
19225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19226    unix_path=`$CYGPATH -u "$windows_path"`
19227    new_path="$unix_path"
19228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19230    new_path="$unix_path"
19231  fi
19232
19233    # remove trailing .exe if any
19234    new_path="${new_path/%.exe/}"
19235
19236    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19237    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19238  fi
19239
19240    else
19241      # We're on a unix platform. Hooray! :)
19242      # First separate the path from the arguments. This will split at the first
19243      # space.
19244      complete="$FOUND_MAKE"
19245      path="${complete%% *}"
19246      tmp="$complete EOL"
19247      arguments="${tmp#* }"
19248
19249      # Cannot rely on the command "which" here since it doesn't always work.
19250      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19251      if test -z "$is_absolute_path"; then
19252        # Path to executable is not absolute. Find it.
19253        IFS_save="$IFS"
19254        IFS=:
19255        for p in $PATH; do
19256          if test -f "$p/$path" && test -x "$p/$path"; then
19257            new_path="$p/$path"
19258            break
19259          fi
19260        done
19261        IFS="$IFS_save"
19262      else
19263        # This is an absolute path, we can use it without further modifications.
19264        new_path="$path"
19265      fi
19266
19267      if test "x$new_path" = x; then
19268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19269$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19270        has_space=`$ECHO "$complete" | $GREP " "`
19271        if test "x$has_space" != x; then
19272          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19274        fi
19275        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19276      fi
19277    fi
19278
19279    # Now join together the path and the arguments once again
19280    if test "x$arguments" != xEOL; then
19281      new_complete="$new_path ${arguments% *}"
19282    else
19283      new_complete="$new_path"
19284    fi
19285
19286    if test "x$complete" != "x$new_complete"; then
19287      FOUND_MAKE="$new_complete"
19288      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19289$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19290    fi
19291  fi
19292
19293        fi
19294      fi
19295    fi
19296  fi
19297
19298        if test "x$FOUND_MAKE" = x; then
19299          for ac_prog in make
19300do
19301  # Extract the first word of "$ac_prog", so it can be a program name with args.
19302set dummy $ac_prog; ac_word=$2
19303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19304$as_echo_n "checking for $ac_word... " >&6; }
19305if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19306  $as_echo_n "(cached) " >&6
19307else
19308  case $CHECK_TOOLSDIR_MAKE in
19309  [\\/]* | ?:[\\/]*)
19310  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19311  ;;
19312  *)
19313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19314for as_dir in $PATH
19315do
19316  IFS=$as_save_IFS
19317  test -z "$as_dir" && as_dir=.
19318    for ac_exec_ext in '' $ac_executable_extensions; do
19319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19320    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19322    break 2
19323  fi
19324done
19325  done
19326IFS=$as_save_IFS
19327
19328  ;;
19329esac
19330fi
19331CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19332if test -n "$CHECK_TOOLSDIR_MAKE"; then
19333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19334$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19335else
19336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19337$as_echo "no" >&6; }
19338fi
19339
19340
19341  test -n "$CHECK_TOOLSDIR_MAKE" && break
19342done
19343
19344
19345  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19346  DESCRIPTION="make in tools-dir"
19347
19348  # On Cygwin, we require a newer version of make than on other platforms
19349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19350    MAKE_VERSION_EXPR="-e 4\."
19351    MAKE_REQUIRED_VERSION="4.0"
19352   else
19353    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19354    MAKE_REQUIRED_VERSION="3.81"
19355  fi
19356
19357  if test "x$MAKE_CANDIDATE" != x; then
19358    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19359$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19360    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19361    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19362    if test "x$IS_GNU_MAKE" = x; then
19363      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19364$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19365    else
19366      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19367      if test "x$IS_MODERN_MAKE" = x; then
19368        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19369$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19370      else
19371        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19372          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19373            MAKE_EXPECTED_ENV='cygwin'
19374          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19375            MAKE_EXPECTED_ENV='msys'
19376          else
19377            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19378          fi
19379          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19380          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19381        else
19382          # Not relevant for non-Windows
19383          IS_MAKE_CORRECT_ENV=true
19384        fi
19385        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19386          { $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
19387$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;}
19388        else
19389          FOUND_MAKE=$MAKE_CANDIDATE
19390
19391  # Only process if variable expands to non-empty
19392
19393  if test "x$FOUND_MAKE" != x; then
19394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19395
19396  # First separate the path from the arguments. This will split at the first
19397  # space.
19398  complete="$FOUND_MAKE"
19399  path="${complete%% *}"
19400  tmp="$complete EOL"
19401  arguments="${tmp#* }"
19402
19403  # Input might be given as Windows format, start by converting to
19404  # unix format.
19405  new_path=`$CYGPATH -u "$path"`
19406
19407  # Now try to locate executable using which
19408  new_path=`$WHICH "$new_path" 2> /dev/null`
19409  # bat and cmd files are not always considered executable in cygwin causing which
19410  # to not find them
19411  if test "x$new_path" = x \
19412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19414    new_path=`$CYGPATH -u "$path"`
19415  fi
19416  if test "x$new_path" = x; then
19417    # Oops. Which didn't find the executable.
19418    # The splitting of arguments from the executable at a space might have been incorrect,
19419    # since paths with space are more likely in Windows. Give it another try with the whole
19420    # argument.
19421    path="$complete"
19422    arguments="EOL"
19423    new_path=`$CYGPATH -u "$path"`
19424    new_path=`$WHICH "$new_path" 2> /dev/null`
19425    # bat and cmd files are not always considered executable in cygwin causing which
19426    # to not find them
19427    if test "x$new_path" = x \
19428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19430      new_path=`$CYGPATH -u "$path"`
19431    fi
19432    if test "x$new_path" = x; then
19433      # It's still not found. Now this is an unrecoverable error.
19434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19436      has_space=`$ECHO "$complete" | $GREP " "`
19437      if test "x$has_space" != x; then
19438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19440      fi
19441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19442    fi
19443  fi
19444
19445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19448  # "foo.exe" is OK but "foo" is an error.
19449  #
19450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19451  # It is also a way to make sure we got the proper file name for the real test later on.
19452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19453  if test "x$test_shortpath" = x; then
19454    # Short path failed, file does not exist as specified.
19455    # Try adding .exe or .cmd
19456    if test -f "${new_path}.exe"; then
19457      input_to_shortpath="${new_path}.exe"
19458    elif test -f "${new_path}.cmd"; then
19459      input_to_shortpath="${new_path}.cmd"
19460    else
19461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19465      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19466    fi
19467  else
19468    input_to_shortpath="$new_path"
19469  fi
19470
19471  # Call helper function which possibly converts this using DOS-style short mode.
19472  # If so, the updated path is stored in $new_path.
19473  new_path="$input_to_shortpath"
19474
19475  input_path="$input_to_shortpath"
19476  # Check if we need to convert this using DOS-style short mode. If the path
19477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19478  # take no chances and rewrite it.
19479  # Note: m4 eats our [], so we need to use [ and ] instead.
19480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19481  if test "x$has_forbidden_chars" != x; then
19482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19486      # Going to short mode and back again did indeed matter. Since short mode is
19487      # case insensitive, let's make it lowercase to improve readability.
19488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19489      # Now convert it back to Unix-style (cygpath)
19490      input_path=`$CYGPATH -u "$shortmode_path"`
19491      new_path="$input_path"
19492    fi
19493  fi
19494
19495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19496  if test "x$test_cygdrive_prefix" = x; then
19497    # As a simple fix, exclude /usr/bin since it's not a real path.
19498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19500      # a path prefixed by /cygdrive for fixpath to work.
19501      new_path="$CYGWIN_ROOT_PATH$input_path"
19502    fi
19503  fi
19504
19505  # remove trailing .exe if any
19506  new_path="${new_path/%.exe/}"
19507
19508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19509
19510  # First separate the path from the arguments. This will split at the first
19511  # space.
19512  complete="$FOUND_MAKE"
19513  path="${complete%% *}"
19514  tmp="$complete EOL"
19515  arguments="${tmp#* }"
19516
19517  # Input might be given as Windows format, start by converting to
19518  # unix format.
19519  new_path="$path"
19520
19521  windows_path="$new_path"
19522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19523    unix_path=`$CYGPATH -u "$windows_path"`
19524    new_path="$unix_path"
19525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19527    new_path="$unix_path"
19528  fi
19529
19530
19531  # Now try to locate executable using which
19532  new_path=`$WHICH "$new_path" 2> /dev/null`
19533
19534  if test "x$new_path" = x; then
19535    # Oops. Which didn't find the executable.
19536    # The splitting of arguments from the executable at a space might have been incorrect,
19537    # since paths with space are more likely in Windows. Give it another try with the whole
19538    # argument.
19539    path="$complete"
19540    arguments="EOL"
19541    new_path="$path"
19542
19543  windows_path="$new_path"
19544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19545    unix_path=`$CYGPATH -u "$windows_path"`
19546    new_path="$unix_path"
19547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19549    new_path="$unix_path"
19550  fi
19551
19552
19553    new_path=`$WHICH "$new_path" 2> /dev/null`
19554    # bat and cmd files are not always considered executable in MSYS causing which
19555    # to not find them
19556    if test "x$new_path" = x \
19557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19559      new_path="$path"
19560
19561  windows_path="$new_path"
19562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19563    unix_path=`$CYGPATH -u "$windows_path"`
19564    new_path="$unix_path"
19565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19567    new_path="$unix_path"
19568  fi
19569
19570    fi
19571
19572    if test "x$new_path" = x; then
19573      # It's still not found. Now this is an unrecoverable error.
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19576      has_space=`$ECHO "$complete" | $GREP " "`
19577      if test "x$has_space" != x; then
19578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19580      fi
19581      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19582    fi
19583  fi
19584
19585  # Now new_path has a complete unix path to the binary
19586  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19587    # Keep paths in /bin as-is, but remove trailing .exe if any
19588    new_path="${new_path/%.exe/}"
19589    # Do not save /bin paths to all_fixpath_prefixes!
19590  else
19591    # Not in mixed or Windows style, start by that.
19592    new_path=`cmd //c echo $new_path`
19593
19594  input_path="$new_path"
19595  # Check if we need to convert this using DOS-style short mode. If the path
19596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19597  # take no chances and rewrite it.
19598  # Note: m4 eats our [], so we need to use [ and ] instead.
19599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19600  if test "x$has_forbidden_chars" != x; then
19601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19603  fi
19604
19605    # Output is in $new_path
19606
19607  windows_path="$new_path"
19608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19609    unix_path=`$CYGPATH -u "$windows_path"`
19610    new_path="$unix_path"
19611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19613    new_path="$unix_path"
19614  fi
19615
19616    # remove trailing .exe if any
19617    new_path="${new_path/%.exe/}"
19618
19619    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19620    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19621  fi
19622
19623    else
19624      # We're on a unix platform. Hooray! :)
19625      # First separate the path from the arguments. This will split at the first
19626      # space.
19627      complete="$FOUND_MAKE"
19628      path="${complete%% *}"
19629      tmp="$complete EOL"
19630      arguments="${tmp#* }"
19631
19632      # Cannot rely on the command "which" here since it doesn't always work.
19633      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19634      if test -z "$is_absolute_path"; then
19635        # Path to executable is not absolute. Find it.
19636        IFS_save="$IFS"
19637        IFS=:
19638        for p in $PATH; do
19639          if test -f "$p/$path" && test -x "$p/$path"; then
19640            new_path="$p/$path"
19641            break
19642          fi
19643        done
19644        IFS="$IFS_save"
19645      else
19646        # This is an absolute path, we can use it without further modifications.
19647        new_path="$path"
19648      fi
19649
19650      if test "x$new_path" = x; then
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19652$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19653        has_space=`$ECHO "$complete" | $GREP " "`
19654        if test "x$has_space" != x; then
19655          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19656$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19657        fi
19658        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19659      fi
19660    fi
19661
19662    # Now join together the path and the arguments once again
19663    if test "x$arguments" != xEOL; then
19664      new_complete="$new_path ${arguments% *}"
19665    else
19666      new_complete="$new_path"
19667    fi
19668
19669    if test "x$complete" != "x$new_complete"; then
19670      FOUND_MAKE="$new_complete"
19671      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19672$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19673    fi
19674  fi
19675
19676        fi
19677      fi
19678    fi
19679  fi
19680
19681        fi
19682        PATH=$OLD_PATH
19683      fi
19684    fi
19685
19686    if test "x$FOUND_MAKE" = x; then
19687      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19688    fi
19689
19690    else
19691      # If it succeeded, then it was overridden by the user. We will use it
19692      # for the tool.
19693
19694      # First remove it from the list of overridden variables, so we can test
19695      # for unknown variables in the end.
19696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19697
19698      # Check if we try to supply an empty value
19699      if test "x$MAKE" = x; then
19700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19701$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19703$as_echo_n "checking for MAKE... " >&6; }
19704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19705$as_echo "disabled" >&6; }
19706      else
19707        # Check if the provided tool contains a complete path.
19708        tool_specified="$MAKE"
19709        tool_basename="${tool_specified##*/}"
19710        if test "x$tool_basename" = "x$tool_specified"; then
19711          # A command without a complete path is provided, search $PATH.
19712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19713$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19714          # Extract the first word of "$tool_basename", so it can be a program name with args.
19715set dummy $tool_basename; ac_word=$2
19716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19717$as_echo_n "checking for $ac_word... " >&6; }
19718if ${ac_cv_path_MAKE+:} false; then :
19719  $as_echo_n "(cached) " >&6
19720else
19721  case $MAKE in
19722  [\\/]* | ?:[\\/]*)
19723  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19724  ;;
19725  *)
19726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19727for as_dir in $PATH
19728do
19729  IFS=$as_save_IFS
19730  test -z "$as_dir" && as_dir=.
19731    for ac_exec_ext in '' $ac_executable_extensions; do
19732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19733    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19735    break 2
19736  fi
19737done
19738  done
19739IFS=$as_save_IFS
19740
19741  ;;
19742esac
19743fi
19744MAKE=$ac_cv_path_MAKE
19745if test -n "$MAKE"; then
19746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19747$as_echo "$MAKE" >&6; }
19748else
19749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19750$as_echo "no" >&6; }
19751fi
19752
19753
19754          if test "x$MAKE" = x; then
19755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19756          fi
19757        else
19758          # Otherwise we believe it is a complete path. Use it as it is.
19759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19760$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19762$as_echo_n "checking for MAKE... " >&6; }
19763          if test ! -x "$tool_specified"; then
19764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19765$as_echo "not found" >&6; }
19766            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19767          fi
19768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19769$as_echo "$tool_specified" >&6; }
19770        fi
19771      fi
19772    fi
19773
19774    # If MAKE was set by user, verify the version
19775
19776  MAKE_CANDIDATE=""$MAKE""
19777  DESCRIPTION="user supplied MAKE=$MAKE"
19778
19779  # On Cygwin, we require a newer version of make than on other platforms
19780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19781    MAKE_VERSION_EXPR="-e 4\."
19782    MAKE_REQUIRED_VERSION="4.0"
19783   else
19784    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19785    MAKE_REQUIRED_VERSION="3.81"
19786  fi
19787
19788  if test "x$MAKE_CANDIDATE" != x; then
19789    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19790$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19791    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19792    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19793    if test "x$IS_GNU_MAKE" = x; then
19794      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19795$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19796    else
19797      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19798      if test "x$IS_MODERN_MAKE" = x; then
19799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19800$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19801      else
19802        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19803          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19804            MAKE_EXPECTED_ENV='cygwin'
19805          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19806            MAKE_EXPECTED_ENV='msys'
19807          else
19808            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19809          fi
19810          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19811          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19812        else
19813          # Not relevant for non-Windows
19814          IS_MAKE_CORRECT_ENV=true
19815        fi
19816        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19817          { $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
19818$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;}
19819        else
19820          FOUND_MAKE=$MAKE_CANDIDATE
19821
19822  # Only process if variable expands to non-empty
19823
19824  if test "x$FOUND_MAKE" != x; then
19825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826
19827  # First separate the path from the arguments. This will split at the first
19828  # space.
19829  complete="$FOUND_MAKE"
19830  path="${complete%% *}"
19831  tmp="$complete EOL"
19832  arguments="${tmp#* }"
19833
19834  # Input might be given as Windows format, start by converting to
19835  # unix format.
19836  new_path=`$CYGPATH -u "$path"`
19837
19838  # Now try to locate executable using which
19839  new_path=`$WHICH "$new_path" 2> /dev/null`
19840  # bat and cmd files are not always considered executable in cygwin causing which
19841  # to not find them
19842  if test "x$new_path" = x \
19843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19845    new_path=`$CYGPATH -u "$path"`
19846  fi
19847  if test "x$new_path" = x; then
19848    # Oops. Which didn't find the executable.
19849    # The splitting of arguments from the executable at a space might have been incorrect,
19850    # since paths with space are more likely in Windows. Give it another try with the whole
19851    # argument.
19852    path="$complete"
19853    arguments="EOL"
19854    new_path=`$CYGPATH -u "$path"`
19855    new_path=`$WHICH "$new_path" 2> /dev/null`
19856    # bat and cmd files are not always considered executable in cygwin causing which
19857    # to not find them
19858    if test "x$new_path" = x \
19859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19861      new_path=`$CYGPATH -u "$path"`
19862    fi
19863    if test "x$new_path" = x; then
19864      # It's still not found. Now this is an unrecoverable error.
19865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19866$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19867      has_space=`$ECHO "$complete" | $GREP " "`
19868      if test "x$has_space" != x; then
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19871      fi
19872      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19873    fi
19874  fi
19875
19876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19879  # "foo.exe" is OK but "foo" is an error.
19880  #
19881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19882  # It is also a way to make sure we got the proper file name for the real test later on.
19883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19884  if test "x$test_shortpath" = x; then
19885    # Short path failed, file does not exist as specified.
19886    # Try adding .exe or .cmd
19887    if test -f "${new_path}.exe"; then
19888      input_to_shortpath="${new_path}.exe"
19889    elif test -f "${new_path}.cmd"; then
19890      input_to_shortpath="${new_path}.cmd"
19891    else
19892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19893$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19896      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19897    fi
19898  else
19899    input_to_shortpath="$new_path"
19900  fi
19901
19902  # Call helper function which possibly converts this using DOS-style short mode.
19903  # If so, the updated path is stored in $new_path.
19904  new_path="$input_to_shortpath"
19905
19906  input_path="$input_to_shortpath"
19907  # Check if we need to convert this using DOS-style short mode. If the path
19908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19909  # take no chances and rewrite it.
19910  # Note: m4 eats our [], so we need to use [ and ] instead.
19911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19912  if test "x$has_forbidden_chars" != x; then
19913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19917      # Going to short mode and back again did indeed matter. Since short mode is
19918      # case insensitive, let's make it lowercase to improve readability.
19919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19920      # Now convert it back to Unix-style (cygpath)
19921      input_path=`$CYGPATH -u "$shortmode_path"`
19922      new_path="$input_path"
19923    fi
19924  fi
19925
19926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19927  if test "x$test_cygdrive_prefix" = x; then
19928    # As a simple fix, exclude /usr/bin since it's not a real path.
19929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19931      # a path prefixed by /cygdrive for fixpath to work.
19932      new_path="$CYGWIN_ROOT_PATH$input_path"
19933    fi
19934  fi
19935
19936  # remove trailing .exe if any
19937  new_path="${new_path/%.exe/}"
19938
19939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940
19941  # First separate the path from the arguments. This will split at the first
19942  # space.
19943  complete="$FOUND_MAKE"
19944  path="${complete%% *}"
19945  tmp="$complete EOL"
19946  arguments="${tmp#* }"
19947
19948  # Input might be given as Windows format, start by converting to
19949  # unix format.
19950  new_path="$path"
19951
19952  windows_path="$new_path"
19953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19954    unix_path=`$CYGPATH -u "$windows_path"`
19955    new_path="$unix_path"
19956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19958    new_path="$unix_path"
19959  fi
19960
19961
19962  # Now try to locate executable using which
19963  new_path=`$WHICH "$new_path" 2> /dev/null`
19964
19965  if test "x$new_path" = x; then
19966    # Oops. Which didn't find the executable.
19967    # The splitting of arguments from the executable at a space might have been incorrect,
19968    # since paths with space are more likely in Windows. Give it another try with the whole
19969    # argument.
19970    path="$complete"
19971    arguments="EOL"
19972    new_path="$path"
19973
19974  windows_path="$new_path"
19975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19976    unix_path=`$CYGPATH -u "$windows_path"`
19977    new_path="$unix_path"
19978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19980    new_path="$unix_path"
19981  fi
19982
19983
19984    new_path=`$WHICH "$new_path" 2> /dev/null`
19985    # bat and cmd files are not always considered executable in MSYS causing which
19986    # to not find them
19987    if test "x$new_path" = x \
19988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19990      new_path="$path"
19991
19992  windows_path="$new_path"
19993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19994    unix_path=`$CYGPATH -u "$windows_path"`
19995    new_path="$unix_path"
19996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19998    new_path="$unix_path"
19999  fi
20000
20001    fi
20002
20003    if test "x$new_path" = x; then
20004      # It's still not found. Now this is an unrecoverable error.
20005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20006$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20007      has_space=`$ECHO "$complete" | $GREP " "`
20008      if test "x$has_space" != x; then
20009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20011      fi
20012      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20013    fi
20014  fi
20015
20016  # Now new_path has a complete unix path to the binary
20017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20018    # Keep paths in /bin as-is, but remove trailing .exe if any
20019    new_path="${new_path/%.exe/}"
20020    # Do not save /bin paths to all_fixpath_prefixes!
20021  else
20022    # Not in mixed or Windows style, start by that.
20023    new_path=`cmd //c echo $new_path`
20024
20025  input_path="$new_path"
20026  # Check if we need to convert this using DOS-style short mode. If the path
20027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20028  # take no chances and rewrite it.
20029  # Note: m4 eats our [], so we need to use [ and ] instead.
20030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20031  if test "x$has_forbidden_chars" != x; then
20032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20034  fi
20035
20036    # Output is in $new_path
20037
20038  windows_path="$new_path"
20039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20040    unix_path=`$CYGPATH -u "$windows_path"`
20041    new_path="$unix_path"
20042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20044    new_path="$unix_path"
20045  fi
20046
20047    # remove trailing .exe if any
20048    new_path="${new_path/%.exe/}"
20049
20050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20052  fi
20053
20054    else
20055      # We're on a unix platform. Hooray! :)
20056      # First separate the path from the arguments. This will split at the first
20057      # space.
20058      complete="$FOUND_MAKE"
20059      path="${complete%% *}"
20060      tmp="$complete EOL"
20061      arguments="${tmp#* }"
20062
20063      # Cannot rely on the command "which" here since it doesn't always work.
20064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20065      if test -z "$is_absolute_path"; then
20066        # Path to executable is not absolute. Find it.
20067        IFS_save="$IFS"
20068        IFS=:
20069        for p in $PATH; do
20070          if test -f "$p/$path" && test -x "$p/$path"; then
20071            new_path="$p/$path"
20072            break
20073          fi
20074        done
20075        IFS="$IFS_save"
20076      else
20077        # This is an absolute path, we can use it without further modifications.
20078        new_path="$path"
20079      fi
20080
20081      if test "x$new_path" = x; then
20082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20084        has_space=`$ECHO "$complete" | $GREP " "`
20085        if test "x$has_space" != x; then
20086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20088        fi
20089        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20090      fi
20091    fi
20092
20093    # Now join together the path and the arguments once again
20094    if test "x$arguments" != xEOL; then
20095      new_complete="$new_path ${arguments% *}"
20096    else
20097      new_complete="$new_path"
20098    fi
20099
20100    if test "x$complete" != "x$new_complete"; then
20101      FOUND_MAKE="$new_complete"
20102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20103$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20104    fi
20105  fi
20106
20107        fi
20108      fi
20109    fi
20110  fi
20111
20112    if test "x$FOUND_MAKE" = x; then
20113      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20114    fi
20115
20116  fi
20117
20118
20119  MAKE=$FOUND_MAKE
20120
20121  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20122$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20123
20124
20125  # Check if make supports the output sync option and if so, setup using it.
20126  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20127$as_echo_n "checking if make --output-sync is supported... " >&6; }
20128  if $MAKE --version -O > /dev/null 2>&1; then
20129    OUTPUT_SYNC_SUPPORTED=true
20130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20131$as_echo "yes" >&6; }
20132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20133$as_echo_n "checking for output-sync value... " >&6; }
20134
20135# Check whether --with-output-sync was given.
20136if test "${with_output_sync+set}" = set; then :
20137  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20138fi
20139
20140    if test "x$OUTPUT_SYNC" = "x"; then
20141      OUTPUT_SYNC=none
20142    fi
20143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20144$as_echo "$OUTPUT_SYNC" >&6; }
20145    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20146      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20147    fi
20148  else
20149    OUTPUT_SYNC_SUPPORTED=false
20150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20151$as_echo "no" >&6; }
20152  fi
20153
20154
20155
20156
20157
20158
20159  # Test if find supports -delete
20160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20161$as_echo_n "checking if find supports -delete... " >&6; }
20162  FIND_DELETE="-delete"
20163
20164  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20165
20166  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20167
20168  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20169  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20170    # No, it does not.
20171    rm $DELETEDIR/TestIfFindSupportsDelete
20172    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20173      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20174      FIND_DELETE="-print | xargs rm"
20175    else
20176      FIND_DELETE="-exec rm \{\} \+"
20177    fi
20178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20179$as_echo "no" >&6; }
20180  else
20181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20182$as_echo "yes" >&6; }
20183  fi
20184  rmdir $DELETEDIR
20185
20186
20187
20188  # These tools might not be installed by default,
20189  # need hint on how to install them.
20190
20191
20192
20193  # Publish this variable in the help.
20194
20195
20196  if [ -z "${UNZIP+x}" ]; then
20197    # The variable is not set by user, try to locate tool using the code snippet
20198    for ac_prog in unzip
20199do
20200  # Extract the first word of "$ac_prog", so it can be a program name with args.
20201set dummy $ac_prog; ac_word=$2
20202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20203$as_echo_n "checking for $ac_word... " >&6; }
20204if ${ac_cv_path_UNZIP+:} false; then :
20205  $as_echo_n "(cached) " >&6
20206else
20207  case $UNZIP in
20208  [\\/]* | ?:[\\/]*)
20209  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20210  ;;
20211  *)
20212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20213for as_dir in $PATH
20214do
20215  IFS=$as_save_IFS
20216  test -z "$as_dir" && as_dir=.
20217    for ac_exec_ext in '' $ac_executable_extensions; do
20218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20219    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20221    break 2
20222  fi
20223done
20224  done
20225IFS=$as_save_IFS
20226
20227  ;;
20228esac
20229fi
20230UNZIP=$ac_cv_path_UNZIP
20231if test -n "$UNZIP"; then
20232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20233$as_echo "$UNZIP" >&6; }
20234else
20235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20236$as_echo "no" >&6; }
20237fi
20238
20239
20240  test -n "$UNZIP" && break
20241done
20242
20243  else
20244    # The variable is set, but is it from the command line or the environment?
20245
20246    # Try to remove the string !UNZIP! from our list.
20247    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20248    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20249      # If it failed, the variable was not from the command line. Ignore it,
20250      # but warn the user (except for BASH, which is always set by the calling BASH).
20251      if test "xUNZIP" != xBASH; then
20252        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20253$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20254      fi
20255      # Try to locate tool using the code snippet
20256      for ac_prog in unzip
20257do
20258  # Extract the first word of "$ac_prog", so it can be a program name with args.
20259set dummy $ac_prog; ac_word=$2
20260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20261$as_echo_n "checking for $ac_word... " >&6; }
20262if ${ac_cv_path_UNZIP+:} false; then :
20263  $as_echo_n "(cached) " >&6
20264else
20265  case $UNZIP in
20266  [\\/]* | ?:[\\/]*)
20267  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20268  ;;
20269  *)
20270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20271for as_dir in $PATH
20272do
20273  IFS=$as_save_IFS
20274  test -z "$as_dir" && as_dir=.
20275    for ac_exec_ext in '' $ac_executable_extensions; do
20276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20277    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20279    break 2
20280  fi
20281done
20282  done
20283IFS=$as_save_IFS
20284
20285  ;;
20286esac
20287fi
20288UNZIP=$ac_cv_path_UNZIP
20289if test -n "$UNZIP"; then
20290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20291$as_echo "$UNZIP" >&6; }
20292else
20293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20294$as_echo "no" >&6; }
20295fi
20296
20297
20298  test -n "$UNZIP" && break
20299done
20300
20301    else
20302      # If it succeeded, then it was overridden by the user. We will use it
20303      # for the tool.
20304
20305      # First remove it from the list of overridden variables, so we can test
20306      # for unknown variables in the end.
20307      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20308
20309      # Check if we try to supply an empty value
20310      if test "x$UNZIP" = x; then
20311        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20312$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20314$as_echo_n "checking for UNZIP... " >&6; }
20315        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20316$as_echo "disabled" >&6; }
20317      else
20318        # Check if the provided tool contains a complete path.
20319        tool_specified="$UNZIP"
20320        tool_basename="${tool_specified##*/}"
20321        if test "x$tool_basename" = "x$tool_specified"; then
20322          # A command without a complete path is provided, search $PATH.
20323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20324$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20325          # Extract the first word of "$tool_basename", so it can be a program name with args.
20326set dummy $tool_basename; ac_word=$2
20327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20328$as_echo_n "checking for $ac_word... " >&6; }
20329if ${ac_cv_path_UNZIP+:} false; then :
20330  $as_echo_n "(cached) " >&6
20331else
20332  case $UNZIP in
20333  [\\/]* | ?:[\\/]*)
20334  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20335  ;;
20336  *)
20337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20338for as_dir in $PATH
20339do
20340  IFS=$as_save_IFS
20341  test -z "$as_dir" && as_dir=.
20342    for ac_exec_ext in '' $ac_executable_extensions; do
20343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20344    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20346    break 2
20347  fi
20348done
20349  done
20350IFS=$as_save_IFS
20351
20352  ;;
20353esac
20354fi
20355UNZIP=$ac_cv_path_UNZIP
20356if test -n "$UNZIP"; then
20357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20358$as_echo "$UNZIP" >&6; }
20359else
20360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20361$as_echo "no" >&6; }
20362fi
20363
20364
20365          if test "x$UNZIP" = x; then
20366            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20367          fi
20368        else
20369          # Otherwise we believe it is a complete path. Use it as it is.
20370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20371$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20372          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20373$as_echo_n "checking for UNZIP... " >&6; }
20374          if test ! -x "$tool_specified"; then
20375            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20376$as_echo "not found" >&6; }
20377            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20378          fi
20379          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20380$as_echo "$tool_specified" >&6; }
20381        fi
20382      fi
20383    fi
20384
20385  fi
20386
20387
20388
20389  if test "x$UNZIP" = x; then
20390    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20391  fi
20392
20393
20394
20395
20396
20397  # Publish this variable in the help.
20398
20399
20400  if [ -z "${ZIP+x}" ]; then
20401    # The variable is not set by user, try to locate tool using the code snippet
20402    for ac_prog in zip
20403do
20404  # Extract the first word of "$ac_prog", so it can be a program name with args.
20405set dummy $ac_prog; ac_word=$2
20406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20407$as_echo_n "checking for $ac_word... " >&6; }
20408if ${ac_cv_path_ZIP+:} false; then :
20409  $as_echo_n "(cached) " >&6
20410else
20411  case $ZIP in
20412  [\\/]* | ?:[\\/]*)
20413  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20414  ;;
20415  *)
20416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20417for as_dir in $PATH
20418do
20419  IFS=$as_save_IFS
20420  test -z "$as_dir" && as_dir=.
20421    for ac_exec_ext in '' $ac_executable_extensions; do
20422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20423    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20425    break 2
20426  fi
20427done
20428  done
20429IFS=$as_save_IFS
20430
20431  ;;
20432esac
20433fi
20434ZIP=$ac_cv_path_ZIP
20435if test -n "$ZIP"; then
20436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20437$as_echo "$ZIP" >&6; }
20438else
20439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20440$as_echo "no" >&6; }
20441fi
20442
20443
20444  test -n "$ZIP" && break
20445done
20446
20447  else
20448    # The variable is set, but is it from the command line or the environment?
20449
20450    # Try to remove the string !ZIP! from our list.
20451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20453      # If it failed, the variable was not from the command line. Ignore it,
20454      # but warn the user (except for BASH, which is always set by the calling BASH).
20455      if test "xZIP" != xBASH; then
20456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20457$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20458      fi
20459      # Try to locate tool using the code snippet
20460      for ac_prog in zip
20461do
20462  # Extract the first word of "$ac_prog", so it can be a program name with args.
20463set dummy $ac_prog; ac_word=$2
20464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20465$as_echo_n "checking for $ac_word... " >&6; }
20466if ${ac_cv_path_ZIP+:} false; then :
20467  $as_echo_n "(cached) " >&6
20468else
20469  case $ZIP in
20470  [\\/]* | ?:[\\/]*)
20471  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20472  ;;
20473  *)
20474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20475for as_dir in $PATH
20476do
20477  IFS=$as_save_IFS
20478  test -z "$as_dir" && as_dir=.
20479    for ac_exec_ext in '' $ac_executable_extensions; do
20480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20481    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20483    break 2
20484  fi
20485done
20486  done
20487IFS=$as_save_IFS
20488
20489  ;;
20490esac
20491fi
20492ZIP=$ac_cv_path_ZIP
20493if test -n "$ZIP"; then
20494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20495$as_echo "$ZIP" >&6; }
20496else
20497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20498$as_echo "no" >&6; }
20499fi
20500
20501
20502  test -n "$ZIP" && break
20503done
20504
20505    else
20506      # If it succeeded, then it was overridden by the user. We will use it
20507      # for the tool.
20508
20509      # First remove it from the list of overridden variables, so we can test
20510      # for unknown variables in the end.
20511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20512
20513      # Check if we try to supply an empty value
20514      if test "x$ZIP" = x; then
20515        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20516$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20517        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20518$as_echo_n "checking for ZIP... " >&6; }
20519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20520$as_echo "disabled" >&6; }
20521      else
20522        # Check if the provided tool contains a complete path.
20523        tool_specified="$ZIP"
20524        tool_basename="${tool_specified##*/}"
20525        if test "x$tool_basename" = "x$tool_specified"; then
20526          # A command without a complete path is provided, search $PATH.
20527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20528$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20529          # Extract the first word of "$tool_basename", so it can be a program name with args.
20530set dummy $tool_basename; ac_word=$2
20531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20532$as_echo_n "checking for $ac_word... " >&6; }
20533if ${ac_cv_path_ZIP+:} false; then :
20534  $as_echo_n "(cached) " >&6
20535else
20536  case $ZIP in
20537  [\\/]* | ?:[\\/]*)
20538  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20539  ;;
20540  *)
20541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20542for as_dir in $PATH
20543do
20544  IFS=$as_save_IFS
20545  test -z "$as_dir" && as_dir=.
20546    for ac_exec_ext in '' $ac_executable_extensions; do
20547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20548    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20550    break 2
20551  fi
20552done
20553  done
20554IFS=$as_save_IFS
20555
20556  ;;
20557esac
20558fi
20559ZIP=$ac_cv_path_ZIP
20560if test -n "$ZIP"; then
20561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20562$as_echo "$ZIP" >&6; }
20563else
20564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20565$as_echo "no" >&6; }
20566fi
20567
20568
20569          if test "x$ZIP" = x; then
20570            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20571          fi
20572        else
20573          # Otherwise we believe it is a complete path. Use it as it is.
20574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20575$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20576          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20577$as_echo_n "checking for ZIP... " >&6; }
20578          if test ! -x "$tool_specified"; then
20579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20580$as_echo "not found" >&6; }
20581            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20582          fi
20583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20584$as_echo "$tool_specified" >&6; }
20585        fi
20586      fi
20587    fi
20588
20589  fi
20590
20591
20592
20593  if test "x$ZIP" = x; then
20594    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20595  fi
20596
20597
20598
20599  # Non-required basic tools
20600
20601
20602
20603  # Publish this variable in the help.
20604
20605
20606  if [ -z "${LDD+x}" ]; then
20607    # The variable is not set by user, try to locate tool using the code snippet
20608    for ac_prog in ldd
20609do
20610  # Extract the first word of "$ac_prog", so it can be a program name with args.
20611set dummy $ac_prog; ac_word=$2
20612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20613$as_echo_n "checking for $ac_word... " >&6; }
20614if ${ac_cv_path_LDD+:} false; then :
20615  $as_echo_n "(cached) " >&6
20616else
20617  case $LDD in
20618  [\\/]* | ?:[\\/]*)
20619  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20620  ;;
20621  *)
20622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20623for as_dir in $PATH
20624do
20625  IFS=$as_save_IFS
20626  test -z "$as_dir" && as_dir=.
20627    for ac_exec_ext in '' $ac_executable_extensions; do
20628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20629    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20631    break 2
20632  fi
20633done
20634  done
20635IFS=$as_save_IFS
20636
20637  ;;
20638esac
20639fi
20640LDD=$ac_cv_path_LDD
20641if test -n "$LDD"; then
20642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20643$as_echo "$LDD" >&6; }
20644else
20645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20646$as_echo "no" >&6; }
20647fi
20648
20649
20650  test -n "$LDD" && break
20651done
20652
20653  else
20654    # The variable is set, but is it from the command line or the environment?
20655
20656    # Try to remove the string !LDD! from our list.
20657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20659      # If it failed, the variable was not from the command line. Ignore it,
20660      # but warn the user (except for BASH, which is always set by the calling BASH).
20661      if test "xLDD" != xBASH; then
20662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20663$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20664      fi
20665      # Try to locate tool using the code snippet
20666      for ac_prog in ldd
20667do
20668  # Extract the first word of "$ac_prog", so it can be a program name with args.
20669set dummy $ac_prog; ac_word=$2
20670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20671$as_echo_n "checking for $ac_word... " >&6; }
20672if ${ac_cv_path_LDD+:} false; then :
20673  $as_echo_n "(cached) " >&6
20674else
20675  case $LDD in
20676  [\\/]* | ?:[\\/]*)
20677  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20678  ;;
20679  *)
20680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20681for as_dir in $PATH
20682do
20683  IFS=$as_save_IFS
20684  test -z "$as_dir" && as_dir=.
20685    for ac_exec_ext in '' $ac_executable_extensions; do
20686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20687    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20689    break 2
20690  fi
20691done
20692  done
20693IFS=$as_save_IFS
20694
20695  ;;
20696esac
20697fi
20698LDD=$ac_cv_path_LDD
20699if test -n "$LDD"; then
20700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20701$as_echo "$LDD" >&6; }
20702else
20703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20704$as_echo "no" >&6; }
20705fi
20706
20707
20708  test -n "$LDD" && break
20709done
20710
20711    else
20712      # If it succeeded, then it was overridden by the user. We will use it
20713      # for the tool.
20714
20715      # First remove it from the list of overridden variables, so we can test
20716      # for unknown variables in the end.
20717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20718
20719      # Check if we try to supply an empty value
20720      if test "x$LDD" = x; then
20721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20722$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20724$as_echo_n "checking for LDD... " >&6; }
20725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20726$as_echo "disabled" >&6; }
20727      else
20728        # Check if the provided tool contains a complete path.
20729        tool_specified="$LDD"
20730        tool_basename="${tool_specified##*/}"
20731        if test "x$tool_basename" = "x$tool_specified"; then
20732          # A command without a complete path is provided, search $PATH.
20733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20734$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20735          # Extract the first word of "$tool_basename", so it can be a program name with args.
20736set dummy $tool_basename; ac_word=$2
20737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20738$as_echo_n "checking for $ac_word... " >&6; }
20739if ${ac_cv_path_LDD+:} false; then :
20740  $as_echo_n "(cached) " >&6
20741else
20742  case $LDD in
20743  [\\/]* | ?:[\\/]*)
20744  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20745  ;;
20746  *)
20747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20748for as_dir in $PATH
20749do
20750  IFS=$as_save_IFS
20751  test -z "$as_dir" && as_dir=.
20752    for ac_exec_ext in '' $ac_executable_extensions; do
20753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20754    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20756    break 2
20757  fi
20758done
20759  done
20760IFS=$as_save_IFS
20761
20762  ;;
20763esac
20764fi
20765LDD=$ac_cv_path_LDD
20766if test -n "$LDD"; then
20767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20768$as_echo "$LDD" >&6; }
20769else
20770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20771$as_echo "no" >&6; }
20772fi
20773
20774
20775          if test "x$LDD" = x; then
20776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20777          fi
20778        else
20779          # Otherwise we believe it is a complete path. Use it as it is.
20780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20781$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20783$as_echo_n "checking for LDD... " >&6; }
20784          if test ! -x "$tool_specified"; then
20785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20786$as_echo "not found" >&6; }
20787            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20788          fi
20789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20790$as_echo "$tool_specified" >&6; }
20791        fi
20792      fi
20793    fi
20794
20795  fi
20796
20797
20798  if test "x$LDD" = "x"; then
20799    # List shared lib dependencies is used for
20800    # debug output and checking for forbidden dependencies.
20801    # We can build without it.
20802    LDD="true"
20803  fi
20804
20805
20806  # Publish this variable in the help.
20807
20808
20809  if [ -z "${OTOOL+x}" ]; then
20810    # The variable is not set by user, try to locate tool using the code snippet
20811    for ac_prog in otool
20812do
20813  # Extract the first word of "$ac_prog", so it can be a program name with args.
20814set dummy $ac_prog; ac_word=$2
20815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20816$as_echo_n "checking for $ac_word... " >&6; }
20817if ${ac_cv_path_OTOOL+:} false; then :
20818  $as_echo_n "(cached) " >&6
20819else
20820  case $OTOOL in
20821  [\\/]* | ?:[\\/]*)
20822  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20823  ;;
20824  *)
20825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20826for as_dir in $PATH
20827do
20828  IFS=$as_save_IFS
20829  test -z "$as_dir" && as_dir=.
20830    for ac_exec_ext in '' $ac_executable_extensions; do
20831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20832    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20834    break 2
20835  fi
20836done
20837  done
20838IFS=$as_save_IFS
20839
20840  ;;
20841esac
20842fi
20843OTOOL=$ac_cv_path_OTOOL
20844if test -n "$OTOOL"; then
20845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20846$as_echo "$OTOOL" >&6; }
20847else
20848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20849$as_echo "no" >&6; }
20850fi
20851
20852
20853  test -n "$OTOOL" && break
20854done
20855
20856  else
20857    # The variable is set, but is it from the command line or the environment?
20858
20859    # Try to remove the string !OTOOL! from our list.
20860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20862      # If it failed, the variable was not from the command line. Ignore it,
20863      # but warn the user (except for BASH, which is always set by the calling BASH).
20864      if test "xOTOOL" != xBASH; then
20865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20866$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20867      fi
20868      # Try to locate tool using the code snippet
20869      for ac_prog in otool
20870do
20871  # Extract the first word of "$ac_prog", so it can be a program name with args.
20872set dummy $ac_prog; ac_word=$2
20873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20874$as_echo_n "checking for $ac_word... " >&6; }
20875if ${ac_cv_path_OTOOL+:} false; then :
20876  $as_echo_n "(cached) " >&6
20877else
20878  case $OTOOL in
20879  [\\/]* | ?:[\\/]*)
20880  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20881  ;;
20882  *)
20883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20884for as_dir in $PATH
20885do
20886  IFS=$as_save_IFS
20887  test -z "$as_dir" && as_dir=.
20888    for ac_exec_ext in '' $ac_executable_extensions; do
20889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20890    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20892    break 2
20893  fi
20894done
20895  done
20896IFS=$as_save_IFS
20897
20898  ;;
20899esac
20900fi
20901OTOOL=$ac_cv_path_OTOOL
20902if test -n "$OTOOL"; then
20903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20904$as_echo "$OTOOL" >&6; }
20905else
20906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20907$as_echo "no" >&6; }
20908fi
20909
20910
20911  test -n "$OTOOL" && break
20912done
20913
20914    else
20915      # If it succeeded, then it was overridden by the user. We will use it
20916      # for the tool.
20917
20918      # First remove it from the list of overridden variables, so we can test
20919      # for unknown variables in the end.
20920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20921
20922      # Check if we try to supply an empty value
20923      if test "x$OTOOL" = x; then
20924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
20925$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
20926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20927$as_echo_n "checking for OTOOL... " >&6; }
20928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20929$as_echo "disabled" >&6; }
20930      else
20931        # Check if the provided tool contains a complete path.
20932        tool_specified="$OTOOL"
20933        tool_basename="${tool_specified##*/}"
20934        if test "x$tool_basename" = "x$tool_specified"; then
20935          # A command without a complete path is provided, search $PATH.
20936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
20937$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
20938          # Extract the first word of "$tool_basename", so it can be a program name with args.
20939set dummy $tool_basename; ac_word=$2
20940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20941$as_echo_n "checking for $ac_word... " >&6; }
20942if ${ac_cv_path_OTOOL+:} false; then :
20943  $as_echo_n "(cached) " >&6
20944else
20945  case $OTOOL in
20946  [\\/]* | ?:[\\/]*)
20947  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20948  ;;
20949  *)
20950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20951for as_dir in $PATH
20952do
20953  IFS=$as_save_IFS
20954  test -z "$as_dir" && as_dir=.
20955    for ac_exec_ext in '' $ac_executable_extensions; do
20956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20957    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20959    break 2
20960  fi
20961done
20962  done
20963IFS=$as_save_IFS
20964
20965  ;;
20966esac
20967fi
20968OTOOL=$ac_cv_path_OTOOL
20969if test -n "$OTOOL"; then
20970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20971$as_echo "$OTOOL" >&6; }
20972else
20973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20974$as_echo "no" >&6; }
20975fi
20976
20977
20978          if test "x$OTOOL" = x; then
20979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20980          fi
20981        else
20982          # Otherwise we believe it is a complete path. Use it as it is.
20983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
20984$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
20985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
20986$as_echo_n "checking for OTOOL... " >&6; }
20987          if test ! -x "$tool_specified"; then
20988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20989$as_echo "not found" >&6; }
20990            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
20991          fi
20992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20993$as_echo "$tool_specified" >&6; }
20994        fi
20995      fi
20996    fi
20997
20998  fi
20999
21000
21001  if test "x$OTOOL" = "x"; then
21002    OTOOL="true"
21003  fi
21004
21005
21006  # Publish this variable in the help.
21007
21008
21009  if [ -z "${READELF+x}" ]; then
21010    # The variable is not set by user, try to locate tool using the code snippet
21011    for ac_prog in greadelf readelf
21012do
21013  # Extract the first word of "$ac_prog", so it can be a program name with args.
21014set dummy $ac_prog; ac_word=$2
21015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21016$as_echo_n "checking for $ac_word... " >&6; }
21017if ${ac_cv_path_READELF+:} false; then :
21018  $as_echo_n "(cached) " >&6
21019else
21020  case $READELF in
21021  [\\/]* | ?:[\\/]*)
21022  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21023  ;;
21024  *)
21025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21026for as_dir in $PATH
21027do
21028  IFS=$as_save_IFS
21029  test -z "$as_dir" && as_dir=.
21030    for ac_exec_ext in '' $ac_executable_extensions; do
21031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21032    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21034    break 2
21035  fi
21036done
21037  done
21038IFS=$as_save_IFS
21039
21040  ;;
21041esac
21042fi
21043READELF=$ac_cv_path_READELF
21044if test -n "$READELF"; then
21045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21046$as_echo "$READELF" >&6; }
21047else
21048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21049$as_echo "no" >&6; }
21050fi
21051
21052
21053  test -n "$READELF" && break
21054done
21055
21056  else
21057    # The variable is set, but is it from the command line or the environment?
21058
21059    # Try to remove the string !READELF! from our list.
21060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21062      # If it failed, the variable was not from the command line. Ignore it,
21063      # but warn the user (except for BASH, which is always set by the calling BASH).
21064      if test "xREADELF" != xBASH; then
21065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21066$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21067      fi
21068      # Try to locate tool using the code snippet
21069      for ac_prog in greadelf readelf
21070do
21071  # Extract the first word of "$ac_prog", so it can be a program name with args.
21072set dummy $ac_prog; ac_word=$2
21073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21074$as_echo_n "checking for $ac_word... " >&6; }
21075if ${ac_cv_path_READELF+:} false; then :
21076  $as_echo_n "(cached) " >&6
21077else
21078  case $READELF in
21079  [\\/]* | ?:[\\/]*)
21080  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21081  ;;
21082  *)
21083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21084for as_dir in $PATH
21085do
21086  IFS=$as_save_IFS
21087  test -z "$as_dir" && as_dir=.
21088    for ac_exec_ext in '' $ac_executable_extensions; do
21089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21090    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21092    break 2
21093  fi
21094done
21095  done
21096IFS=$as_save_IFS
21097
21098  ;;
21099esac
21100fi
21101READELF=$ac_cv_path_READELF
21102if test -n "$READELF"; then
21103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21104$as_echo "$READELF" >&6; }
21105else
21106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21107$as_echo "no" >&6; }
21108fi
21109
21110
21111  test -n "$READELF" && break
21112done
21113
21114    else
21115      # If it succeeded, then it was overridden by the user. We will use it
21116      # for the tool.
21117
21118      # First remove it from the list of overridden variables, so we can test
21119      # for unknown variables in the end.
21120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21121
21122      # Check if we try to supply an empty value
21123      if test "x$READELF" = x; then
21124        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21125$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21127$as_echo_n "checking for READELF... " >&6; }
21128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21129$as_echo "disabled" >&6; }
21130      else
21131        # Check if the provided tool contains a complete path.
21132        tool_specified="$READELF"
21133        tool_basename="${tool_specified##*/}"
21134        if test "x$tool_basename" = "x$tool_specified"; then
21135          # A command without a complete path is provided, search $PATH.
21136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21137$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21138          # Extract the first word of "$tool_basename", so it can be a program name with args.
21139set dummy $tool_basename; ac_word=$2
21140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21141$as_echo_n "checking for $ac_word... " >&6; }
21142if ${ac_cv_path_READELF+:} false; then :
21143  $as_echo_n "(cached) " >&6
21144else
21145  case $READELF in
21146  [\\/]* | ?:[\\/]*)
21147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21148  ;;
21149  *)
21150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21151for as_dir in $PATH
21152do
21153  IFS=$as_save_IFS
21154  test -z "$as_dir" && as_dir=.
21155    for ac_exec_ext in '' $ac_executable_extensions; do
21156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21159    break 2
21160  fi
21161done
21162  done
21163IFS=$as_save_IFS
21164
21165  ;;
21166esac
21167fi
21168READELF=$ac_cv_path_READELF
21169if test -n "$READELF"; then
21170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21171$as_echo "$READELF" >&6; }
21172else
21173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21174$as_echo "no" >&6; }
21175fi
21176
21177
21178          if test "x$READELF" = x; then
21179            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21180          fi
21181        else
21182          # Otherwise we believe it is a complete path. Use it as it is.
21183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21184$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21185          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21186$as_echo_n "checking for READELF... " >&6; }
21187          if test ! -x "$tool_specified"; then
21188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21189$as_echo "not found" >&6; }
21190            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21191          fi
21192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21193$as_echo "$tool_specified" >&6; }
21194        fi
21195      fi
21196    fi
21197
21198  fi
21199
21200
21201
21202
21203  # Publish this variable in the help.
21204
21205
21206  if [ -z "${HG+x}" ]; then
21207    # The variable is not set by user, try to locate tool using the code snippet
21208    for ac_prog in hg
21209do
21210  # Extract the first word of "$ac_prog", so it can be a program name with args.
21211set dummy $ac_prog; ac_word=$2
21212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21213$as_echo_n "checking for $ac_word... " >&6; }
21214if ${ac_cv_path_HG+:} false; then :
21215  $as_echo_n "(cached) " >&6
21216else
21217  case $HG in
21218  [\\/]* | ?:[\\/]*)
21219  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21220  ;;
21221  *)
21222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21223for as_dir in $PATH
21224do
21225  IFS=$as_save_IFS
21226  test -z "$as_dir" && as_dir=.
21227    for ac_exec_ext in '' $ac_executable_extensions; do
21228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21229    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21231    break 2
21232  fi
21233done
21234  done
21235IFS=$as_save_IFS
21236
21237  ;;
21238esac
21239fi
21240HG=$ac_cv_path_HG
21241if test -n "$HG"; then
21242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21243$as_echo "$HG" >&6; }
21244else
21245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21246$as_echo "no" >&6; }
21247fi
21248
21249
21250  test -n "$HG" && break
21251done
21252
21253  else
21254    # The variable is set, but is it from the command line or the environment?
21255
21256    # Try to remove the string !HG! from our list.
21257    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21258    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21259      # If it failed, the variable was not from the command line. Ignore it,
21260      # but warn the user (except for BASH, which is always set by the calling BASH).
21261      if test "xHG" != xBASH; then
21262        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21263$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21264      fi
21265      # Try to locate tool using the code snippet
21266      for ac_prog in hg
21267do
21268  # Extract the first word of "$ac_prog", so it can be a program name with args.
21269set dummy $ac_prog; ac_word=$2
21270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21271$as_echo_n "checking for $ac_word... " >&6; }
21272if ${ac_cv_path_HG+:} false; then :
21273  $as_echo_n "(cached) " >&6
21274else
21275  case $HG in
21276  [\\/]* | ?:[\\/]*)
21277  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21278  ;;
21279  *)
21280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21281for as_dir in $PATH
21282do
21283  IFS=$as_save_IFS
21284  test -z "$as_dir" && as_dir=.
21285    for ac_exec_ext in '' $ac_executable_extensions; do
21286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21287    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21289    break 2
21290  fi
21291done
21292  done
21293IFS=$as_save_IFS
21294
21295  ;;
21296esac
21297fi
21298HG=$ac_cv_path_HG
21299if test -n "$HG"; then
21300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21301$as_echo "$HG" >&6; }
21302else
21303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21304$as_echo "no" >&6; }
21305fi
21306
21307
21308  test -n "$HG" && break
21309done
21310
21311    else
21312      # If it succeeded, then it was overridden by the user. We will use it
21313      # for the tool.
21314
21315      # First remove it from the list of overridden variables, so we can test
21316      # for unknown variables in the end.
21317      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21318
21319      # Check if we try to supply an empty value
21320      if test "x$HG" = x; then
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21322$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21324$as_echo_n "checking for HG... " >&6; }
21325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21326$as_echo "disabled" >&6; }
21327      else
21328        # Check if the provided tool contains a complete path.
21329        tool_specified="$HG"
21330        tool_basename="${tool_specified##*/}"
21331        if test "x$tool_basename" = "x$tool_specified"; then
21332          # A command without a complete path is provided, search $PATH.
21333          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21334$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21335          # Extract the first word of "$tool_basename", so it can be a program name with args.
21336set dummy $tool_basename; ac_word=$2
21337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21338$as_echo_n "checking for $ac_word... " >&6; }
21339if ${ac_cv_path_HG+:} false; then :
21340  $as_echo_n "(cached) " >&6
21341else
21342  case $HG in
21343  [\\/]* | ?:[\\/]*)
21344  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21345  ;;
21346  *)
21347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21348for as_dir in $PATH
21349do
21350  IFS=$as_save_IFS
21351  test -z "$as_dir" && as_dir=.
21352    for ac_exec_ext in '' $ac_executable_extensions; do
21353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21354    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21356    break 2
21357  fi
21358done
21359  done
21360IFS=$as_save_IFS
21361
21362  ;;
21363esac
21364fi
21365HG=$ac_cv_path_HG
21366if test -n "$HG"; then
21367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21368$as_echo "$HG" >&6; }
21369else
21370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21371$as_echo "no" >&6; }
21372fi
21373
21374
21375          if test "x$HG" = x; then
21376            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21377          fi
21378        else
21379          # Otherwise we believe it is a complete path. Use it as it is.
21380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21381$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21382          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21383$as_echo_n "checking for HG... " >&6; }
21384          if test ! -x "$tool_specified"; then
21385            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21386$as_echo "not found" >&6; }
21387            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21388          fi
21389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21390$as_echo "$tool_specified" >&6; }
21391        fi
21392      fi
21393    fi
21394
21395  fi
21396
21397
21398
21399
21400  # Publish this variable in the help.
21401
21402
21403  if [ -z "${STAT+x}" ]; then
21404    # The variable is not set by user, try to locate tool using the code snippet
21405    for ac_prog in stat
21406do
21407  # Extract the first word of "$ac_prog", so it can be a program name with args.
21408set dummy $ac_prog; ac_word=$2
21409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21410$as_echo_n "checking for $ac_word... " >&6; }
21411if ${ac_cv_path_STAT+:} false; then :
21412  $as_echo_n "(cached) " >&6
21413else
21414  case $STAT in
21415  [\\/]* | ?:[\\/]*)
21416  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21417  ;;
21418  *)
21419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21420for as_dir in $PATH
21421do
21422  IFS=$as_save_IFS
21423  test -z "$as_dir" && as_dir=.
21424    for ac_exec_ext in '' $ac_executable_extensions; do
21425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21426    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21428    break 2
21429  fi
21430done
21431  done
21432IFS=$as_save_IFS
21433
21434  ;;
21435esac
21436fi
21437STAT=$ac_cv_path_STAT
21438if test -n "$STAT"; then
21439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21440$as_echo "$STAT" >&6; }
21441else
21442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21443$as_echo "no" >&6; }
21444fi
21445
21446
21447  test -n "$STAT" && break
21448done
21449
21450  else
21451    # The variable is set, but is it from the command line or the environment?
21452
21453    # Try to remove the string !STAT! from our list.
21454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21456      # If it failed, the variable was not from the command line. Ignore it,
21457      # but warn the user (except for BASH, which is always set by the calling BASH).
21458      if test "xSTAT" != xBASH; then
21459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21460$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21461      fi
21462      # Try to locate tool using the code snippet
21463      for ac_prog in stat
21464do
21465  # Extract the first word of "$ac_prog", so it can be a program name with args.
21466set dummy $ac_prog; ac_word=$2
21467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21468$as_echo_n "checking for $ac_word... " >&6; }
21469if ${ac_cv_path_STAT+:} false; then :
21470  $as_echo_n "(cached) " >&6
21471else
21472  case $STAT in
21473  [\\/]* | ?:[\\/]*)
21474  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21475  ;;
21476  *)
21477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21478for as_dir in $PATH
21479do
21480  IFS=$as_save_IFS
21481  test -z "$as_dir" && as_dir=.
21482    for ac_exec_ext in '' $ac_executable_extensions; do
21483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21484    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21486    break 2
21487  fi
21488done
21489  done
21490IFS=$as_save_IFS
21491
21492  ;;
21493esac
21494fi
21495STAT=$ac_cv_path_STAT
21496if test -n "$STAT"; then
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21498$as_echo "$STAT" >&6; }
21499else
21500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21501$as_echo "no" >&6; }
21502fi
21503
21504
21505  test -n "$STAT" && break
21506done
21507
21508    else
21509      # If it succeeded, then it was overridden by the user. We will use it
21510      # for the tool.
21511
21512      # First remove it from the list of overridden variables, so we can test
21513      # for unknown variables in the end.
21514      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21515
21516      # Check if we try to supply an empty value
21517      if test "x$STAT" = x; then
21518        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21519$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21521$as_echo_n "checking for STAT... " >&6; }
21522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21523$as_echo "disabled" >&6; }
21524      else
21525        # Check if the provided tool contains a complete path.
21526        tool_specified="$STAT"
21527        tool_basename="${tool_specified##*/}"
21528        if test "x$tool_basename" = "x$tool_specified"; then
21529          # A command without a complete path is provided, search $PATH.
21530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21531$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21532          # Extract the first word of "$tool_basename", so it can be a program name with args.
21533set dummy $tool_basename; ac_word=$2
21534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21535$as_echo_n "checking for $ac_word... " >&6; }
21536if ${ac_cv_path_STAT+:} false; then :
21537  $as_echo_n "(cached) " >&6
21538else
21539  case $STAT in
21540  [\\/]* | ?:[\\/]*)
21541  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21542  ;;
21543  *)
21544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21545for as_dir in $PATH
21546do
21547  IFS=$as_save_IFS
21548  test -z "$as_dir" && as_dir=.
21549    for ac_exec_ext in '' $ac_executable_extensions; do
21550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21551    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21553    break 2
21554  fi
21555done
21556  done
21557IFS=$as_save_IFS
21558
21559  ;;
21560esac
21561fi
21562STAT=$ac_cv_path_STAT
21563if test -n "$STAT"; then
21564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21565$as_echo "$STAT" >&6; }
21566else
21567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21568$as_echo "no" >&6; }
21569fi
21570
21571
21572          if test "x$STAT" = x; then
21573            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21574          fi
21575        else
21576          # Otherwise we believe it is a complete path. Use it as it is.
21577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21578$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21579          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21580$as_echo_n "checking for STAT... " >&6; }
21581          if test ! -x "$tool_specified"; then
21582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21583$as_echo "not found" >&6; }
21584            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21585          fi
21586          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21587$as_echo "$tool_specified" >&6; }
21588        fi
21589      fi
21590    fi
21591
21592  fi
21593
21594
21595
21596
21597  # Publish this variable in the help.
21598
21599
21600  if [ -z "${TIME+x}" ]; then
21601    # The variable is not set by user, try to locate tool using the code snippet
21602    for ac_prog in time
21603do
21604  # Extract the first word of "$ac_prog", so it can be a program name with args.
21605set dummy $ac_prog; ac_word=$2
21606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21607$as_echo_n "checking for $ac_word... " >&6; }
21608if ${ac_cv_path_TIME+:} false; then :
21609  $as_echo_n "(cached) " >&6
21610else
21611  case $TIME in
21612  [\\/]* | ?:[\\/]*)
21613  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21614  ;;
21615  *)
21616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21617for as_dir in $PATH
21618do
21619  IFS=$as_save_IFS
21620  test -z "$as_dir" && as_dir=.
21621    for ac_exec_ext in '' $ac_executable_extensions; do
21622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21623    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21625    break 2
21626  fi
21627done
21628  done
21629IFS=$as_save_IFS
21630
21631  ;;
21632esac
21633fi
21634TIME=$ac_cv_path_TIME
21635if test -n "$TIME"; then
21636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21637$as_echo "$TIME" >&6; }
21638else
21639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21640$as_echo "no" >&6; }
21641fi
21642
21643
21644  test -n "$TIME" && break
21645done
21646
21647  else
21648    # The variable is set, but is it from the command line or the environment?
21649
21650    # Try to remove the string !TIME! from our list.
21651    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21652    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21653      # If it failed, the variable was not from the command line. Ignore it,
21654      # but warn the user (except for BASH, which is always set by the calling BASH).
21655      if test "xTIME" != xBASH; then
21656        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21657$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21658      fi
21659      # Try to locate tool using the code snippet
21660      for ac_prog in time
21661do
21662  # Extract the first word of "$ac_prog", so it can be a program name with args.
21663set dummy $ac_prog; ac_word=$2
21664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21665$as_echo_n "checking for $ac_word... " >&6; }
21666if ${ac_cv_path_TIME+:} false; then :
21667  $as_echo_n "(cached) " >&6
21668else
21669  case $TIME in
21670  [\\/]* | ?:[\\/]*)
21671  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21672  ;;
21673  *)
21674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21675for as_dir in $PATH
21676do
21677  IFS=$as_save_IFS
21678  test -z "$as_dir" && as_dir=.
21679    for ac_exec_ext in '' $ac_executable_extensions; do
21680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21681    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21683    break 2
21684  fi
21685done
21686  done
21687IFS=$as_save_IFS
21688
21689  ;;
21690esac
21691fi
21692TIME=$ac_cv_path_TIME
21693if test -n "$TIME"; then
21694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21695$as_echo "$TIME" >&6; }
21696else
21697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21698$as_echo "no" >&6; }
21699fi
21700
21701
21702  test -n "$TIME" && break
21703done
21704
21705    else
21706      # If it succeeded, then it was overridden by the user. We will use it
21707      # for the tool.
21708
21709      # First remove it from the list of overridden variables, so we can test
21710      # for unknown variables in the end.
21711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21712
21713      # Check if we try to supply an empty value
21714      if test "x$TIME" = x; then
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21716$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21718$as_echo_n "checking for TIME... " >&6; }
21719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21720$as_echo "disabled" >&6; }
21721      else
21722        # Check if the provided tool contains a complete path.
21723        tool_specified="$TIME"
21724        tool_basename="${tool_specified##*/}"
21725        if test "x$tool_basename" = "x$tool_specified"; then
21726          # A command without a complete path is provided, search $PATH.
21727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21728$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21729          # Extract the first word of "$tool_basename", so it can be a program name with args.
21730set dummy $tool_basename; ac_word=$2
21731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21732$as_echo_n "checking for $ac_word... " >&6; }
21733if ${ac_cv_path_TIME+:} false; then :
21734  $as_echo_n "(cached) " >&6
21735else
21736  case $TIME in
21737  [\\/]* | ?:[\\/]*)
21738  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21739  ;;
21740  *)
21741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21742for as_dir in $PATH
21743do
21744  IFS=$as_save_IFS
21745  test -z "$as_dir" && as_dir=.
21746    for ac_exec_ext in '' $ac_executable_extensions; do
21747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21748    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21750    break 2
21751  fi
21752done
21753  done
21754IFS=$as_save_IFS
21755
21756  ;;
21757esac
21758fi
21759TIME=$ac_cv_path_TIME
21760if test -n "$TIME"; then
21761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21762$as_echo "$TIME" >&6; }
21763else
21764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21765$as_echo "no" >&6; }
21766fi
21767
21768
21769          if test "x$TIME" = x; then
21770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21771          fi
21772        else
21773          # Otherwise we believe it is a complete path. Use it as it is.
21774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21775$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21777$as_echo_n "checking for TIME... " >&6; }
21778          if test ! -x "$tool_specified"; then
21779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21780$as_echo "not found" >&6; }
21781            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21782          fi
21783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21784$as_echo "$tool_specified" >&6; }
21785        fi
21786      fi
21787    fi
21788
21789  fi
21790
21791
21792
21793
21794  # Publish this variable in the help.
21795
21796
21797  if [ -z "${PATCH+x}" ]; then
21798    # The variable is not set by user, try to locate tool using the code snippet
21799    for ac_prog in gpatch patch
21800do
21801  # Extract the first word of "$ac_prog", so it can be a program name with args.
21802set dummy $ac_prog; ac_word=$2
21803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21804$as_echo_n "checking for $ac_word... " >&6; }
21805if ${ac_cv_path_PATCH+:} false; then :
21806  $as_echo_n "(cached) " >&6
21807else
21808  case $PATCH in
21809  [\\/]* | ?:[\\/]*)
21810  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21811  ;;
21812  *)
21813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21814for as_dir in $PATH
21815do
21816  IFS=$as_save_IFS
21817  test -z "$as_dir" && as_dir=.
21818    for ac_exec_ext in '' $ac_executable_extensions; do
21819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21820    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21822    break 2
21823  fi
21824done
21825  done
21826IFS=$as_save_IFS
21827
21828  ;;
21829esac
21830fi
21831PATCH=$ac_cv_path_PATCH
21832if test -n "$PATCH"; then
21833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21834$as_echo "$PATCH" >&6; }
21835else
21836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21837$as_echo "no" >&6; }
21838fi
21839
21840
21841  test -n "$PATCH" && break
21842done
21843
21844  else
21845    # The variable is set, but is it from the command line or the environment?
21846
21847    # Try to remove the string !PATCH! from our list.
21848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21850      # If it failed, the variable was not from the command line. Ignore it,
21851      # but warn the user (except for BASH, which is always set by the calling BASH).
21852      if test "xPATCH" != xBASH; then
21853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21854$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21855      fi
21856      # Try to locate tool using the code snippet
21857      for ac_prog in gpatch patch
21858do
21859  # Extract the first word of "$ac_prog", so it can be a program name with args.
21860set dummy $ac_prog; ac_word=$2
21861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21862$as_echo_n "checking for $ac_word... " >&6; }
21863if ${ac_cv_path_PATCH+:} false; then :
21864  $as_echo_n "(cached) " >&6
21865else
21866  case $PATCH in
21867  [\\/]* | ?:[\\/]*)
21868  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21869  ;;
21870  *)
21871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21872for as_dir in $PATH
21873do
21874  IFS=$as_save_IFS
21875  test -z "$as_dir" && as_dir=.
21876    for ac_exec_ext in '' $ac_executable_extensions; do
21877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21878    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21880    break 2
21881  fi
21882done
21883  done
21884IFS=$as_save_IFS
21885
21886  ;;
21887esac
21888fi
21889PATCH=$ac_cv_path_PATCH
21890if test -n "$PATCH"; then
21891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21892$as_echo "$PATCH" >&6; }
21893else
21894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21895$as_echo "no" >&6; }
21896fi
21897
21898
21899  test -n "$PATCH" && break
21900done
21901
21902    else
21903      # If it succeeded, then it was overridden by the user. We will use it
21904      # for the tool.
21905
21906      # First remove it from the list of overridden variables, so we can test
21907      # for unknown variables in the end.
21908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21909
21910      # Check if we try to supply an empty value
21911      if test "x$PATCH" = x; then
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
21913$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
21914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21915$as_echo_n "checking for PATCH... " >&6; }
21916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21917$as_echo "disabled" >&6; }
21918      else
21919        # Check if the provided tool contains a complete path.
21920        tool_specified="$PATCH"
21921        tool_basename="${tool_specified##*/}"
21922        if test "x$tool_basename" = "x$tool_specified"; then
21923          # A command without a complete path is provided, search $PATH.
21924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
21925$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
21926          # Extract the first word of "$tool_basename", so it can be a program name with args.
21927set dummy $tool_basename; ac_word=$2
21928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21929$as_echo_n "checking for $ac_word... " >&6; }
21930if ${ac_cv_path_PATCH+:} false; then :
21931  $as_echo_n "(cached) " >&6
21932else
21933  case $PATCH in
21934  [\\/]* | ?:[\\/]*)
21935  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21936  ;;
21937  *)
21938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21939for as_dir in $PATH
21940do
21941  IFS=$as_save_IFS
21942  test -z "$as_dir" && as_dir=.
21943    for ac_exec_ext in '' $ac_executable_extensions; do
21944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21945    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21947    break 2
21948  fi
21949done
21950  done
21951IFS=$as_save_IFS
21952
21953  ;;
21954esac
21955fi
21956PATCH=$ac_cv_path_PATCH
21957if test -n "$PATCH"; then
21958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21959$as_echo "$PATCH" >&6; }
21960else
21961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21962$as_echo "no" >&6; }
21963fi
21964
21965
21966          if test "x$PATCH" = x; then
21967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21968          fi
21969        else
21970          # Otherwise we believe it is a complete path. Use it as it is.
21971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
21972$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
21973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
21974$as_echo_n "checking for PATCH... " >&6; }
21975          if test ! -x "$tool_specified"; then
21976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21977$as_echo "not found" >&6; }
21978            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
21979          fi
21980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21981$as_echo "$tool_specified" >&6; }
21982        fi
21983      fi
21984    fi
21985
21986  fi
21987
21988
21989  # Check if it's GNU time
21990  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
21991  if test "x$IS_GNU_TIME" != x; then
21992    IS_GNU_TIME=yes
21993  else
21994    IS_GNU_TIME=no
21995  fi
21996
21997
21998  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
21999
22000
22001
22002  # Publish this variable in the help.
22003
22004
22005  if [ -z "${DSYMUTIL+x}" ]; then
22006    # The variable is not set by user, try to locate tool using the code snippet
22007    for ac_prog in dsymutil
22008do
22009  # Extract the first word of "$ac_prog", so it can be a program name with args.
22010set dummy $ac_prog; ac_word=$2
22011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22012$as_echo_n "checking for $ac_word... " >&6; }
22013if ${ac_cv_path_DSYMUTIL+:} false; then :
22014  $as_echo_n "(cached) " >&6
22015else
22016  case $DSYMUTIL in
22017  [\\/]* | ?:[\\/]*)
22018  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22019  ;;
22020  *)
22021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22022for as_dir in $PATH
22023do
22024  IFS=$as_save_IFS
22025  test -z "$as_dir" && as_dir=.
22026    for ac_exec_ext in '' $ac_executable_extensions; do
22027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22028    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22030    break 2
22031  fi
22032done
22033  done
22034IFS=$as_save_IFS
22035
22036  ;;
22037esac
22038fi
22039DSYMUTIL=$ac_cv_path_DSYMUTIL
22040if test -n "$DSYMUTIL"; then
22041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22042$as_echo "$DSYMUTIL" >&6; }
22043else
22044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22045$as_echo "no" >&6; }
22046fi
22047
22048
22049  test -n "$DSYMUTIL" && break
22050done
22051
22052  else
22053    # The variable is set, but is it from the command line or the environment?
22054
22055    # Try to remove the string !DSYMUTIL! from our list.
22056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22058      # If it failed, the variable was not from the command line. Ignore it,
22059      # but warn the user (except for BASH, which is always set by the calling BASH).
22060      if test "xDSYMUTIL" != xBASH; then
22061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22062$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22063      fi
22064      # Try to locate tool using the code snippet
22065      for ac_prog in dsymutil
22066do
22067  # Extract the first word of "$ac_prog", so it can be a program name with args.
22068set dummy $ac_prog; ac_word=$2
22069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22070$as_echo_n "checking for $ac_word... " >&6; }
22071if ${ac_cv_path_DSYMUTIL+:} false; then :
22072  $as_echo_n "(cached) " >&6
22073else
22074  case $DSYMUTIL in
22075  [\\/]* | ?:[\\/]*)
22076  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22077  ;;
22078  *)
22079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22080for as_dir in $PATH
22081do
22082  IFS=$as_save_IFS
22083  test -z "$as_dir" && as_dir=.
22084    for ac_exec_ext in '' $ac_executable_extensions; do
22085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22086    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22088    break 2
22089  fi
22090done
22091  done
22092IFS=$as_save_IFS
22093
22094  ;;
22095esac
22096fi
22097DSYMUTIL=$ac_cv_path_DSYMUTIL
22098if test -n "$DSYMUTIL"; then
22099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22100$as_echo "$DSYMUTIL" >&6; }
22101else
22102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22103$as_echo "no" >&6; }
22104fi
22105
22106
22107  test -n "$DSYMUTIL" && break
22108done
22109
22110    else
22111      # If it succeeded, then it was overridden by the user. We will use it
22112      # for the tool.
22113
22114      # First remove it from the list of overridden variables, so we can test
22115      # for unknown variables in the end.
22116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22117
22118      # Check if we try to supply an empty value
22119      if test "x$DSYMUTIL" = x; then
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22121$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22123$as_echo_n "checking for DSYMUTIL... " >&6; }
22124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22125$as_echo "disabled" >&6; }
22126      else
22127        # Check if the provided tool contains a complete path.
22128        tool_specified="$DSYMUTIL"
22129        tool_basename="${tool_specified##*/}"
22130        if test "x$tool_basename" = "x$tool_specified"; then
22131          # A command without a complete path is provided, search $PATH.
22132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22133$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22134          # Extract the first word of "$tool_basename", so it can be a program name with args.
22135set dummy $tool_basename; ac_word=$2
22136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22137$as_echo_n "checking for $ac_word... " >&6; }
22138if ${ac_cv_path_DSYMUTIL+:} false; then :
22139  $as_echo_n "(cached) " >&6
22140else
22141  case $DSYMUTIL in
22142  [\\/]* | ?:[\\/]*)
22143  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22144  ;;
22145  *)
22146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22147for as_dir in $PATH
22148do
22149  IFS=$as_save_IFS
22150  test -z "$as_dir" && as_dir=.
22151    for ac_exec_ext in '' $ac_executable_extensions; do
22152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22153    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22155    break 2
22156  fi
22157done
22158  done
22159IFS=$as_save_IFS
22160
22161  ;;
22162esac
22163fi
22164DSYMUTIL=$ac_cv_path_DSYMUTIL
22165if test -n "$DSYMUTIL"; then
22166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22167$as_echo "$DSYMUTIL" >&6; }
22168else
22169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22170$as_echo "no" >&6; }
22171fi
22172
22173
22174          if test "x$DSYMUTIL" = x; then
22175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22176          fi
22177        else
22178          # Otherwise we believe it is a complete path. Use it as it is.
22179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22180$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22182$as_echo_n "checking for DSYMUTIL... " >&6; }
22183          if test ! -x "$tool_specified"; then
22184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22185$as_echo "not found" >&6; }
22186            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22187          fi
22188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22189$as_echo "$tool_specified" >&6; }
22190        fi
22191      fi
22192    fi
22193
22194  fi
22195
22196
22197
22198  if test "x$DSYMUTIL" = x; then
22199    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22200  fi
22201
22202
22203
22204
22205
22206  # Publish this variable in the help.
22207
22208
22209  if [ -z "${XATTR+x}" ]; then
22210    # The variable is not set by user, try to locate tool using the code snippet
22211    for ac_prog in xattr
22212do
22213  # Extract the first word of "$ac_prog", so it can be a program name with args.
22214set dummy $ac_prog; ac_word=$2
22215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22216$as_echo_n "checking for $ac_word... " >&6; }
22217if ${ac_cv_path_XATTR+:} false; then :
22218  $as_echo_n "(cached) " >&6
22219else
22220  case $XATTR in
22221  [\\/]* | ?:[\\/]*)
22222  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22223  ;;
22224  *)
22225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22226for as_dir in $PATH
22227do
22228  IFS=$as_save_IFS
22229  test -z "$as_dir" && as_dir=.
22230    for ac_exec_ext in '' $ac_executable_extensions; do
22231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22232    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22234    break 2
22235  fi
22236done
22237  done
22238IFS=$as_save_IFS
22239
22240  ;;
22241esac
22242fi
22243XATTR=$ac_cv_path_XATTR
22244if test -n "$XATTR"; then
22245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22246$as_echo "$XATTR" >&6; }
22247else
22248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22249$as_echo "no" >&6; }
22250fi
22251
22252
22253  test -n "$XATTR" && break
22254done
22255
22256  else
22257    # The variable is set, but is it from the command line or the environment?
22258
22259    # Try to remove the string !XATTR! from our list.
22260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22262      # If it failed, the variable was not from the command line. Ignore it,
22263      # but warn the user (except for BASH, which is always set by the calling BASH).
22264      if test "xXATTR" != xBASH; then
22265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22266$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22267      fi
22268      # Try to locate tool using the code snippet
22269      for ac_prog in xattr
22270do
22271  # Extract the first word of "$ac_prog", so it can be a program name with args.
22272set dummy $ac_prog; ac_word=$2
22273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22274$as_echo_n "checking for $ac_word... " >&6; }
22275if ${ac_cv_path_XATTR+:} false; then :
22276  $as_echo_n "(cached) " >&6
22277else
22278  case $XATTR in
22279  [\\/]* | ?:[\\/]*)
22280  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22281  ;;
22282  *)
22283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22284for as_dir in $PATH
22285do
22286  IFS=$as_save_IFS
22287  test -z "$as_dir" && as_dir=.
22288    for ac_exec_ext in '' $ac_executable_extensions; do
22289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22290    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22292    break 2
22293  fi
22294done
22295  done
22296IFS=$as_save_IFS
22297
22298  ;;
22299esac
22300fi
22301XATTR=$ac_cv_path_XATTR
22302if test -n "$XATTR"; then
22303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22304$as_echo "$XATTR" >&6; }
22305else
22306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22307$as_echo "no" >&6; }
22308fi
22309
22310
22311  test -n "$XATTR" && break
22312done
22313
22314    else
22315      # If it succeeded, then it was overridden by the user. We will use it
22316      # for the tool.
22317
22318      # First remove it from the list of overridden variables, so we can test
22319      # for unknown variables in the end.
22320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22321
22322      # Check if we try to supply an empty value
22323      if test "x$XATTR" = x; then
22324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22325$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22327$as_echo_n "checking for XATTR... " >&6; }
22328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22329$as_echo "disabled" >&6; }
22330      else
22331        # Check if the provided tool contains a complete path.
22332        tool_specified="$XATTR"
22333        tool_basename="${tool_specified##*/}"
22334        if test "x$tool_basename" = "x$tool_specified"; then
22335          # A command without a complete path is provided, search $PATH.
22336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22337$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22338          # Extract the first word of "$tool_basename", so it can be a program name with args.
22339set dummy $tool_basename; ac_word=$2
22340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22341$as_echo_n "checking for $ac_word... " >&6; }
22342if ${ac_cv_path_XATTR+:} false; then :
22343  $as_echo_n "(cached) " >&6
22344else
22345  case $XATTR in
22346  [\\/]* | ?:[\\/]*)
22347  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22348  ;;
22349  *)
22350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22351for as_dir in $PATH
22352do
22353  IFS=$as_save_IFS
22354  test -z "$as_dir" && as_dir=.
22355    for ac_exec_ext in '' $ac_executable_extensions; do
22356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22357    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22359    break 2
22360  fi
22361done
22362  done
22363IFS=$as_save_IFS
22364
22365  ;;
22366esac
22367fi
22368XATTR=$ac_cv_path_XATTR
22369if test -n "$XATTR"; then
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22371$as_echo "$XATTR" >&6; }
22372else
22373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22374$as_echo "no" >&6; }
22375fi
22376
22377
22378          if test "x$XATTR" = x; then
22379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22380          fi
22381        else
22382          # Otherwise we believe it is a complete path. Use it as it is.
22383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22384$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22386$as_echo_n "checking for XATTR... " >&6; }
22387          if test ! -x "$tool_specified"; then
22388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22389$as_echo "not found" >&6; }
22390            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22391          fi
22392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22393$as_echo "$tool_specified" >&6; }
22394        fi
22395      fi
22396    fi
22397
22398  fi
22399
22400
22401
22402  if test "x$XATTR" = x; then
22403    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22404  fi
22405
22406
22407
22408
22409  # Publish this variable in the help.
22410
22411
22412  if [ -z "${CODESIGN+x}" ]; then
22413    # The variable is not set by user, try to locate tool using the code snippet
22414    for ac_prog in codesign
22415do
22416  # Extract the first word of "$ac_prog", so it can be a program name with args.
22417set dummy $ac_prog; ac_word=$2
22418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22419$as_echo_n "checking for $ac_word... " >&6; }
22420if ${ac_cv_path_CODESIGN+:} false; then :
22421  $as_echo_n "(cached) " >&6
22422else
22423  case $CODESIGN in
22424  [\\/]* | ?:[\\/]*)
22425  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22426  ;;
22427  *)
22428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22429for as_dir in $PATH
22430do
22431  IFS=$as_save_IFS
22432  test -z "$as_dir" && as_dir=.
22433    for ac_exec_ext in '' $ac_executable_extensions; do
22434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22435    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22437    break 2
22438  fi
22439done
22440  done
22441IFS=$as_save_IFS
22442
22443  ;;
22444esac
22445fi
22446CODESIGN=$ac_cv_path_CODESIGN
22447if test -n "$CODESIGN"; then
22448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22449$as_echo "$CODESIGN" >&6; }
22450else
22451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22452$as_echo "no" >&6; }
22453fi
22454
22455
22456  test -n "$CODESIGN" && break
22457done
22458
22459  else
22460    # The variable is set, but is it from the command line or the environment?
22461
22462    # Try to remove the string !CODESIGN! from our list.
22463    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22464    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22465      # If it failed, the variable was not from the command line. Ignore it,
22466      # but warn the user (except for BASH, which is always set by the calling BASH).
22467      if test "xCODESIGN" != xBASH; then
22468        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22469$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22470      fi
22471      # Try to locate tool using the code snippet
22472      for ac_prog in codesign
22473do
22474  # Extract the first word of "$ac_prog", so it can be a program name with args.
22475set dummy $ac_prog; ac_word=$2
22476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22477$as_echo_n "checking for $ac_word... " >&6; }
22478if ${ac_cv_path_CODESIGN+:} false; then :
22479  $as_echo_n "(cached) " >&6
22480else
22481  case $CODESIGN in
22482  [\\/]* | ?:[\\/]*)
22483  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22484  ;;
22485  *)
22486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22493    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22495    break 2
22496  fi
22497done
22498  done
22499IFS=$as_save_IFS
22500
22501  ;;
22502esac
22503fi
22504CODESIGN=$ac_cv_path_CODESIGN
22505if test -n "$CODESIGN"; then
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22507$as_echo "$CODESIGN" >&6; }
22508else
22509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22510$as_echo "no" >&6; }
22511fi
22512
22513
22514  test -n "$CODESIGN" && break
22515done
22516
22517    else
22518      # If it succeeded, then it was overridden by the user. We will use it
22519      # for the tool.
22520
22521      # First remove it from the list of overridden variables, so we can test
22522      # for unknown variables in the end.
22523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22524
22525      # Check if we try to supply an empty value
22526      if test "x$CODESIGN" = x; then
22527        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22528$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22529        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22530$as_echo_n "checking for CODESIGN... " >&6; }
22531        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22532$as_echo "disabled" >&6; }
22533      else
22534        # Check if the provided tool contains a complete path.
22535        tool_specified="$CODESIGN"
22536        tool_basename="${tool_specified##*/}"
22537        if test "x$tool_basename" = "x$tool_specified"; then
22538          # A command without a complete path is provided, search $PATH.
22539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22540$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22541          # Extract the first word of "$tool_basename", so it can be a program name with args.
22542set dummy $tool_basename; ac_word=$2
22543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22544$as_echo_n "checking for $ac_word... " >&6; }
22545if ${ac_cv_path_CODESIGN+:} false; then :
22546  $as_echo_n "(cached) " >&6
22547else
22548  case $CODESIGN in
22549  [\\/]* | ?:[\\/]*)
22550  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22551  ;;
22552  *)
22553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22554for as_dir in $PATH
22555do
22556  IFS=$as_save_IFS
22557  test -z "$as_dir" && as_dir=.
22558    for ac_exec_ext in '' $ac_executable_extensions; do
22559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22560    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22562    break 2
22563  fi
22564done
22565  done
22566IFS=$as_save_IFS
22567
22568  ;;
22569esac
22570fi
22571CODESIGN=$ac_cv_path_CODESIGN
22572if test -n "$CODESIGN"; then
22573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22574$as_echo "$CODESIGN" >&6; }
22575else
22576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22577$as_echo "no" >&6; }
22578fi
22579
22580
22581          if test "x$CODESIGN" = x; then
22582            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22583          fi
22584        else
22585          # Otherwise we believe it is a complete path. Use it as it is.
22586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22587$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22588          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22589$as_echo_n "checking for CODESIGN... " >&6; }
22590          if test ! -x "$tool_specified"; then
22591            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22592$as_echo "not found" >&6; }
22593            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22594          fi
22595          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22596$as_echo "$tool_specified" >&6; }
22597        fi
22598      fi
22599    fi
22600
22601  fi
22602
22603
22604    if test "x$CODESIGN" != "x"; then
22605      # Verify that the openjdk_codesign certificate is present
22606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22607$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22608      rm -f codesign-testfile
22609      touch codesign-testfile
22610      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22611      rm -f codesign-testfile
22612      if test "x$CODESIGN" = x; then
22613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22614$as_echo "no" >&6; }
22615      else
22616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22617$as_echo "yes" >&6; }
22618      fi
22619    fi
22620
22621
22622
22623  # Publish this variable in the help.
22624
22625
22626  if [ -z "${SETFILE+x}" ]; then
22627    # The variable is not set by user, try to locate tool using the code snippet
22628    for ac_prog in SetFile
22629do
22630  # Extract the first word of "$ac_prog", so it can be a program name with args.
22631set dummy $ac_prog; ac_word=$2
22632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22633$as_echo_n "checking for $ac_word... " >&6; }
22634if ${ac_cv_path_SETFILE+:} false; then :
22635  $as_echo_n "(cached) " >&6
22636else
22637  case $SETFILE in
22638  [\\/]* | ?:[\\/]*)
22639  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22640  ;;
22641  *)
22642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22643for as_dir in $PATH
22644do
22645  IFS=$as_save_IFS
22646  test -z "$as_dir" && as_dir=.
22647    for ac_exec_ext in '' $ac_executable_extensions; do
22648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22649    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22651    break 2
22652  fi
22653done
22654  done
22655IFS=$as_save_IFS
22656
22657  ;;
22658esac
22659fi
22660SETFILE=$ac_cv_path_SETFILE
22661if test -n "$SETFILE"; then
22662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22663$as_echo "$SETFILE" >&6; }
22664else
22665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22666$as_echo "no" >&6; }
22667fi
22668
22669
22670  test -n "$SETFILE" && break
22671done
22672
22673  else
22674    # The variable is set, but is it from the command line or the environment?
22675
22676    # Try to remove the string !SETFILE! from our list.
22677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22679      # If it failed, the variable was not from the command line. Ignore it,
22680      # but warn the user (except for BASH, which is always set by the calling BASH).
22681      if test "xSETFILE" != xBASH; then
22682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22683$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22684      fi
22685      # Try to locate tool using the code snippet
22686      for ac_prog in SetFile
22687do
22688  # Extract the first word of "$ac_prog", so it can be a program name with args.
22689set dummy $ac_prog; ac_word=$2
22690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22691$as_echo_n "checking for $ac_word... " >&6; }
22692if ${ac_cv_path_SETFILE+:} false; then :
22693  $as_echo_n "(cached) " >&6
22694else
22695  case $SETFILE in
22696  [\\/]* | ?:[\\/]*)
22697  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22698  ;;
22699  *)
22700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22701for as_dir in $PATH
22702do
22703  IFS=$as_save_IFS
22704  test -z "$as_dir" && as_dir=.
22705    for ac_exec_ext in '' $ac_executable_extensions; do
22706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22707    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22709    break 2
22710  fi
22711done
22712  done
22713IFS=$as_save_IFS
22714
22715  ;;
22716esac
22717fi
22718SETFILE=$ac_cv_path_SETFILE
22719if test -n "$SETFILE"; then
22720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22721$as_echo "$SETFILE" >&6; }
22722else
22723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22724$as_echo "no" >&6; }
22725fi
22726
22727
22728  test -n "$SETFILE" && break
22729done
22730
22731    else
22732      # If it succeeded, then it was overridden by the user. We will use it
22733      # for the tool.
22734
22735      # First remove it from the list of overridden variables, so we can test
22736      # for unknown variables in the end.
22737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22738
22739      # Check if we try to supply an empty value
22740      if test "x$SETFILE" = x; then
22741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22742$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22744$as_echo_n "checking for SETFILE... " >&6; }
22745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22746$as_echo "disabled" >&6; }
22747      else
22748        # Check if the provided tool contains a complete path.
22749        tool_specified="$SETFILE"
22750        tool_basename="${tool_specified##*/}"
22751        if test "x$tool_basename" = "x$tool_specified"; then
22752          # A command without a complete path is provided, search $PATH.
22753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22754$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22755          # Extract the first word of "$tool_basename", so it can be a program name with args.
22756set dummy $tool_basename; ac_word=$2
22757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22758$as_echo_n "checking for $ac_word... " >&6; }
22759if ${ac_cv_path_SETFILE+:} false; then :
22760  $as_echo_n "(cached) " >&6
22761else
22762  case $SETFILE in
22763  [\\/]* | ?:[\\/]*)
22764  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22765  ;;
22766  *)
22767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22768for as_dir in $PATH
22769do
22770  IFS=$as_save_IFS
22771  test -z "$as_dir" && as_dir=.
22772    for ac_exec_ext in '' $ac_executable_extensions; do
22773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22774    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22776    break 2
22777  fi
22778done
22779  done
22780IFS=$as_save_IFS
22781
22782  ;;
22783esac
22784fi
22785SETFILE=$ac_cv_path_SETFILE
22786if test -n "$SETFILE"; then
22787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22788$as_echo "$SETFILE" >&6; }
22789else
22790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22791$as_echo "no" >&6; }
22792fi
22793
22794
22795          if test "x$SETFILE" = x; then
22796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22797          fi
22798        else
22799          # Otherwise we believe it is a complete path. Use it as it is.
22800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22801$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22803$as_echo_n "checking for SETFILE... " >&6; }
22804          if test ! -x "$tool_specified"; then
22805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22806$as_echo "not found" >&6; }
22807            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22808          fi
22809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22810$as_echo "$tool_specified" >&6; }
22811        fi
22812      fi
22813    fi
22814
22815  fi
22816
22817
22818
22819  if test "x$SETFILE" = x; then
22820    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22821  fi
22822
22823
22824  fi
22825
22826
22827  # Test if bash supports pipefail.
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22829$as_echo_n "checking if bash supports pipefail... " >&6; }
22830  if ${BASH} -c 'set -o pipefail'; then
22831    BASH_ARGS="$BASH_ARGS -o pipefail"
22832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22833$as_echo "yes" >&6; }
22834  else
22835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22836$as_echo "no" >&6; }
22837  fi
22838
22839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22840$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22841  if ${BASH} -e -c 'true'; then
22842    BASH_ARGS="$BASH_ARGS -e"
22843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22844$as_echo "yes" >&6; }
22845  else
22846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22847$as_echo "no" >&6; }
22848  fi
22849
22850
22851
22852
22853# Check if pkg-config is available.
22854
22855
22856if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22857	if test -n "$ac_tool_prefix"; then
22858  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22859set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22861$as_echo_n "checking for $ac_word... " >&6; }
22862if ${ac_cv_path_PKG_CONFIG+:} false; then :
22863  $as_echo_n "(cached) " >&6
22864else
22865  case $PKG_CONFIG in
22866  [\\/]* | ?:[\\/]*)
22867  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22868  ;;
22869  *)
22870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22871for as_dir in $PATH
22872do
22873  IFS=$as_save_IFS
22874  test -z "$as_dir" && as_dir=.
22875    for ac_exec_ext in '' $ac_executable_extensions; do
22876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22877    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22879    break 2
22880  fi
22881done
22882  done
22883IFS=$as_save_IFS
22884
22885  ;;
22886esac
22887fi
22888PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22889if test -n "$PKG_CONFIG"; then
22890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22891$as_echo "$PKG_CONFIG" >&6; }
22892else
22893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22894$as_echo "no" >&6; }
22895fi
22896
22897
22898fi
22899if test -z "$ac_cv_path_PKG_CONFIG"; then
22900  ac_pt_PKG_CONFIG=$PKG_CONFIG
22901  # Extract the first word of "pkg-config", so it can be a program name with args.
22902set dummy pkg-config; ac_word=$2
22903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22904$as_echo_n "checking for $ac_word... " >&6; }
22905if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
22906  $as_echo_n "(cached) " >&6
22907else
22908  case $ac_pt_PKG_CONFIG in
22909  [\\/]* | ?:[\\/]*)
22910  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
22911  ;;
22912  *)
22913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22914for as_dir in $PATH
22915do
22916  IFS=$as_save_IFS
22917  test -z "$as_dir" && as_dir=.
22918    for ac_exec_ext in '' $ac_executable_extensions; do
22919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22920    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22922    break 2
22923  fi
22924done
22925  done
22926IFS=$as_save_IFS
22927
22928  ;;
22929esac
22930fi
22931ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
22932if test -n "$ac_pt_PKG_CONFIG"; then
22933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
22934$as_echo "$ac_pt_PKG_CONFIG" >&6; }
22935else
22936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22937$as_echo "no" >&6; }
22938fi
22939
22940  if test "x$ac_pt_PKG_CONFIG" = x; then
22941    PKG_CONFIG=""
22942  else
22943    case $cross_compiling:$ac_tool_warned in
22944yes:)
22945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22947ac_tool_warned=yes ;;
22948esac
22949    PKG_CONFIG=$ac_pt_PKG_CONFIG
22950  fi
22951else
22952  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
22953fi
22954
22955fi
22956if test -n "$PKG_CONFIG"; then
22957	_pkg_min_version=0.9.0
22958	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
22959$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
22960	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
22961		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22962$as_echo "yes" >&6; }
22963	else
22964		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22965$as_echo "no" >&6; }
22966		PKG_CONFIG=""
22967	fi
22968
22969fi
22970
22971# After basic tools have been setup, we can check build os specific details.
22972
22973  ###############################################################################
22974
22975  # Note that this is the build platform OS version!
22976
22977  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
22978  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
22979  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
22980  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
22981
22982
22983
22984
22985
22986###############################################################################
22987#
22988# Determine OpenJDK variants, options and version numbers.
22989#
22990###############################################################################
22991
22992# We need build & target for this.
22993
22994
22995  ###############################################################################
22996  #
22997  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
22998  # We always build headless support.
22999  #
23000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23001$as_echo_n "checking headful support... " >&6; }
23002  # Check whether --enable-headful was given.
23003if test "${enable_headful+set}" = set; then :
23004  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23005else
23006  SUPPORT_HEADFUL=yes
23007fi
23008
23009
23010  SUPPORT_HEADLESS=yes
23011  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23012
23013  if test "x$SUPPORT_HEADFUL" = xyes; then
23014    # We are building both headful and headless.
23015    headful_msg="include support for both headful and headless"
23016  fi
23017
23018  if test "x$SUPPORT_HEADFUL" = xno; then
23019    # Thus we are building headless only.
23020    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23021    headful_msg="headless only"
23022  fi
23023
23024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23025$as_echo "$headful_msg" >&6; }
23026
23027
23028
23029
23030
23031  # Control wether Hotspot runs Queens test after build.
23032  # Check whether --enable-hotspot-test-in-build was given.
23033if test "${enable_hotspot_test_in_build+set}" = set; then :
23034  enableval=$enable_hotspot_test_in_build;
23035else
23036  enable_hotspot_test_in_build=no
23037fi
23038
23039  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23040    TEST_IN_BUILD=true
23041  else
23042    TEST_IN_BUILD=false
23043  fi
23044
23045
23046  ###############################################################################
23047  #
23048  # Choose cacerts source file
23049  #
23050
23051# Check whether --with-cacerts-file was given.
23052if test "${with_cacerts_file+set}" = set; then :
23053  withval=$with_cacerts_file;
23054fi
23055
23056  if test "x$with_cacerts_file" != x; then
23057    CACERTS_FILE=$with_cacerts_file
23058  fi
23059
23060
23061  ###############################################################################
23062  #
23063  # Enable or disable unlimited crypto
23064  #
23065  # Check whether --enable-unlimited-crypto was given.
23066if test "${enable_unlimited_crypto+set}" = set; then :
23067  enableval=$enable_unlimited_crypto;
23068else
23069  enable_unlimited_crypto=no
23070fi
23071
23072  if test "x$enable_unlimited_crypto" = "xyes"; then
23073    UNLIMITED_CRYPTO=true
23074  else
23075    UNLIMITED_CRYPTO=false
23076  fi
23077
23078
23079  ###############################################################################
23080  #
23081  # Enable or disable the elliptic curve crypto implementation
23082  #
23083
23084
23085  ###############################################################################
23086  #
23087  # Compress jars
23088  #
23089  COMPRESS_JARS=false
23090
23091
23092
23093
23094  # Source the version numbers
23095  . $AUTOCONF_DIR/version-numbers
23096
23097  # Get the settings from parameters
23098
23099# Check whether --with-milestone was given.
23100if test "${with_milestone+set}" = set; then :
23101  withval=$with_milestone;
23102fi
23103
23104  if test "x$with_milestone" = xyes; then
23105    as_fn_error $? "Milestone must have a value" "$LINENO" 5
23106  elif test "x$with_milestone" != x; then
23107    MILESTONE="$with_milestone"
23108  fi
23109  if test "x$MILESTONE" = x; then
23110    MILESTONE=internal
23111  fi
23112
23113
23114# Check whether --with-update-version was given.
23115if test "${with_update_version+set}" = set; then :
23116  withval=$with_update_version;
23117fi
23118
23119  if test "x$with_update_version" = xyes; then
23120    as_fn_error $? "Update version must have a value" "$LINENO" 5
23121  elif test "x$with_update_version" != x; then
23122    JDK_UPDATE_VERSION="$with_update_version"
23123    # On macosx 10.7, it's not possible to set --with-update-version=0X due
23124    # to a bug in expr (which reduces it to just X). To work around this, we
23125    # always add a 0 to one digit update versions.
23126    if test "${#JDK_UPDATE_VERSION}" = "1"; then
23127      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
23128    fi
23129  fi
23130
23131
23132# Check whether --with-user-release-suffix was given.
23133if test "${with_user_release_suffix+set}" = set; then :
23134  withval=$with_user_release_suffix;
23135fi
23136
23137  if test "x$with_user_release_suffix" = xyes; then
23138    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
23139  elif test "x$with_user_release_suffix" != x; then
23140    USER_RELEASE_SUFFIX="$with_user_release_suffix"
23141  fi
23142
23143
23144# Check whether --with-build-number was given.
23145if test "${with_build_number+set}" = set; then :
23146  withval=$with_build_number;
23147fi
23148
23149  if test "x$with_build_number" = xyes; then
23150    as_fn_error $? "Build number must have a value" "$LINENO" 5
23151  elif test "x$with_build_number" != x; then
23152    JDK_BUILD_NUMBER="$with_build_number"
23153  fi
23154  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
23155  if test "x$JDK_BUILD_NUMBER" = x; then
23156    JDK_BUILD_NUMBER=b00
23157    if test "x$USER_RELEASE_SUFFIX" = x; then
23158      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
23159      # Avoid [:alnum:] since it depends on the locale.
23160      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
23161      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23162    fi
23163  fi
23164
23165  # Now set the JDK version, milestone, build number etc.
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182# Check whether --with-copyright-year was given.
23183if test "${with_copyright_year+set}" = set; then :
23184  withval=$with_copyright_year;
23185fi
23186
23187  if test "x$with_copyright_year" = xyes; then
23188    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23189  elif test "x$with_copyright_year" != x; then
23190    COPYRIGHT_YEAR="$with_copyright_year"
23191  else
23192    COPYRIGHT_YEAR=`date +'%Y'`
23193  fi
23194
23195
23196  if test "x$JDK_UPDATE_VERSION" != x; then
23197    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
23198  else
23199    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
23200  fi
23201
23202
23203  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
23204
23205
23206
23207###############################################################################
23208#
23209# Setup BootJDK, used to bootstrap the build.
23210#
23211###############################################################################
23212
23213
23214  BOOT_JDK_FOUND=no
23215
23216# Check whether --with-boot-jdk was given.
23217if test "${with_boot_jdk+set}" = set; then :
23218  withval=$with_boot_jdk;
23219fi
23220
23221
23222  # We look for the Boot JDK through various means, going from more certain to
23223  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23224  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23225  # must check if this is indeed valid; otherwise we'll continue looking.
23226
23227  # Test: Is bootjdk explicitely set by command line arguments?
23228
23229  if test "x$BOOT_JDK_FOUND" = xno; then
23230    # Now execute the test
23231
23232  if test "x$with_boot_jdk" != x; then
23233    BOOT_JDK=$with_boot_jdk
23234    BOOT_JDK_FOUND=maybe
23235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23236$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23237  fi
23238
23239
23240    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23241    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23242      # Do we have a bin/java?
23243      if test ! -x "$BOOT_JDK/bin/java"; then
23244        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23246        BOOT_JDK_FOUND=no
23247      else
23248        # Do we have a bin/javac?
23249        if test ! -x "$BOOT_JDK/bin/javac"; then
23250          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23252          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23253$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23254          BOOT_JDK_FOUND=no
23255        else
23256          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23257          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23258
23259          # Extra M4 quote needed to protect [] in grep expression.
23260          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23261          if test "x$FOUND_CORRECT_VERSION" = x; then
23262            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23263$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23264            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23265$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23266            BOOT_JDK_FOUND=no
23267          else
23268            # We're done! :-)
23269            BOOT_JDK_FOUND=yes
23270
23271  # Only process if variable expands to non-empty
23272
23273  if test "x$BOOT_JDK" != x; then
23274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23275
23276  # Input might be given as Windows format, start by converting to
23277  # unix format.
23278  path="$BOOT_JDK"
23279  new_path=`$CYGPATH -u "$path"`
23280
23281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23284  # "foo.exe" is OK but "foo" is an error.
23285  #
23286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23287  # It is also a way to make sure we got the proper file name for the real test later on.
23288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23289  if test "x$test_shortpath" = x; then
23290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23291$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23292    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23293  fi
23294
23295  # Call helper function which possibly converts this using DOS-style short mode.
23296  # If so, the updated path is stored in $new_path.
23297
23298  input_path="$new_path"
23299  # Check if we need to convert this using DOS-style short mode. If the path
23300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23301  # take no chances and rewrite it.
23302  # Note: m4 eats our [], so we need to use [ and ] instead.
23303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23304  if test "x$has_forbidden_chars" != x; then
23305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23309      # Going to short mode and back again did indeed matter. Since short mode is
23310      # case insensitive, let's make it lowercase to improve readability.
23311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23312      # Now convert it back to Unix-style (cygpath)
23313      input_path=`$CYGPATH -u "$shortmode_path"`
23314      new_path="$input_path"
23315    fi
23316  fi
23317
23318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23319  if test "x$test_cygdrive_prefix" = x; then
23320    # As a simple fix, exclude /usr/bin since it's not a real path.
23321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23323      # a path prefixed by /cygdrive for fixpath to work.
23324      new_path="$CYGWIN_ROOT_PATH$input_path"
23325    fi
23326  fi
23327
23328
23329  if test "x$path" != "x$new_path"; then
23330    BOOT_JDK="$new_path"
23331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23332$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23333  fi
23334
23335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23336
23337  path="$BOOT_JDK"
23338  has_colon=`$ECHO $path | $GREP ^.:`
23339  new_path="$path"
23340  if test "x$has_colon" = x; then
23341    # Not in mixed or Windows style, start by that.
23342    new_path=`cmd //c echo $path`
23343  fi
23344
23345
23346  input_path="$new_path"
23347  # Check if we need to convert this using DOS-style short mode. If the path
23348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23349  # take no chances and rewrite it.
23350  # Note: m4 eats our [], so we need to use [ and ] instead.
23351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23352  if test "x$has_forbidden_chars" != x; then
23353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23355  fi
23356
23357
23358  windows_path="$new_path"
23359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23360    unix_path=`$CYGPATH -u "$windows_path"`
23361    new_path="$unix_path"
23362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23364    new_path="$unix_path"
23365  fi
23366
23367  if test "x$path" != "x$new_path"; then
23368    BOOT_JDK="$new_path"
23369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23371  fi
23372
23373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23375
23376    else
23377      # We're on a unix platform. Hooray! :)
23378      path="$BOOT_JDK"
23379      has_space=`$ECHO "$path" | $GREP " "`
23380      if test "x$has_space" != x; then
23381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23382$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23384      fi
23385
23386      # Use eval to expand a potential ~
23387      eval path="$path"
23388      if test ! -f "$path" && test ! -d "$path"; then
23389        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23390      fi
23391
23392      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23393    fi
23394  fi
23395
23396            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23397$as_echo_n "checking for Boot JDK... " >&6; }
23398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23399$as_echo "$BOOT_JDK" >&6; }
23400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23401$as_echo_n "checking Boot JDK version... " >&6; }
23402            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23403            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23404$as_echo "$BOOT_JDK_VERSION" >&6; }
23405          fi # end check jdk version
23406        fi # end check javac
23407      fi # end check java
23408    fi # end check boot jdk found
23409  fi
23410
23411  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23412    # Having specified an argument which is incorrect will produce an instant failure;
23413    # we should not go on looking
23414    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23415  fi
23416
23417  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23418
23419  if test "x$BOOT_JDK_FOUND" = xno; then
23420    # Now execute the test
23421
23422  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23423    # First check at user selected default
23424
23425  if test "x$BOOT_JDK_FOUND" = xno; then
23426    # Now execute the test
23427
23428  if test -x /usr/libexec/java_home; then
23429    BOOT_JDK=`/usr/libexec/java_home `
23430    BOOT_JDK_FOUND=maybe
23431    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23432$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23433  fi
23434
23435
23436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23438      # Do we have a bin/java?
23439      if test ! -x "$BOOT_JDK/bin/java"; then
23440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23442        BOOT_JDK_FOUND=no
23443      else
23444        # Do we have a bin/javac?
23445        if test ! -x "$BOOT_JDK/bin/javac"; then
23446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23450          BOOT_JDK_FOUND=no
23451        else
23452          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23453          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23454
23455          # Extra M4 quote needed to protect [] in grep expression.
23456          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23457          if test "x$FOUND_CORRECT_VERSION" = x; then
23458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23461$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23462            BOOT_JDK_FOUND=no
23463          else
23464            # We're done! :-)
23465            BOOT_JDK_FOUND=yes
23466
23467  # Only process if variable expands to non-empty
23468
23469  if test "x$BOOT_JDK" != x; then
23470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23471
23472  # Input might be given as Windows format, start by converting to
23473  # unix format.
23474  path="$BOOT_JDK"
23475  new_path=`$CYGPATH -u "$path"`
23476
23477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23480  # "foo.exe" is OK but "foo" is an error.
23481  #
23482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23483  # It is also a way to make sure we got the proper file name for the real test later on.
23484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23485  if test "x$test_shortpath" = x; then
23486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23489  fi
23490
23491  # Call helper function which possibly converts this using DOS-style short mode.
23492  # If so, the updated path is stored in $new_path.
23493
23494  input_path="$new_path"
23495  # Check if we need to convert this using DOS-style short mode. If the path
23496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23497  # take no chances and rewrite it.
23498  # Note: m4 eats our [], so we need to use [ and ] instead.
23499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23500  if test "x$has_forbidden_chars" != x; then
23501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23505      # Going to short mode and back again did indeed matter. Since short mode is
23506      # case insensitive, let's make it lowercase to improve readability.
23507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23508      # Now convert it back to Unix-style (cygpath)
23509      input_path=`$CYGPATH -u "$shortmode_path"`
23510      new_path="$input_path"
23511    fi
23512  fi
23513
23514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23515  if test "x$test_cygdrive_prefix" = x; then
23516    # As a simple fix, exclude /usr/bin since it's not a real path.
23517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23519      # a path prefixed by /cygdrive for fixpath to work.
23520      new_path="$CYGWIN_ROOT_PATH$input_path"
23521    fi
23522  fi
23523
23524
23525  if test "x$path" != "x$new_path"; then
23526    BOOT_JDK="$new_path"
23527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23529  fi
23530
23531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23532
23533  path="$BOOT_JDK"
23534  has_colon=`$ECHO $path | $GREP ^.:`
23535  new_path="$path"
23536  if test "x$has_colon" = x; then
23537    # Not in mixed or Windows style, start by that.
23538    new_path=`cmd //c echo $path`
23539  fi
23540
23541
23542  input_path="$new_path"
23543  # Check if we need to convert this using DOS-style short mode. If the path
23544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23545  # take no chances and rewrite it.
23546  # Note: m4 eats our [], so we need to use [ and ] instead.
23547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23548  if test "x$has_forbidden_chars" != x; then
23549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23551  fi
23552
23553
23554  windows_path="$new_path"
23555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23556    unix_path=`$CYGPATH -u "$windows_path"`
23557    new_path="$unix_path"
23558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23560    new_path="$unix_path"
23561  fi
23562
23563  if test "x$path" != "x$new_path"; then
23564    BOOT_JDK="$new_path"
23565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23567  fi
23568
23569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23571
23572    else
23573      # We're on a unix platform. Hooray! :)
23574      path="$BOOT_JDK"
23575      has_space=`$ECHO "$path" | $GREP " "`
23576      if test "x$has_space" != x; then
23577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23580      fi
23581
23582      # Use eval to expand a potential ~
23583      eval path="$path"
23584      if test ! -f "$path" && test ! -d "$path"; then
23585        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23586      fi
23587
23588      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23589    fi
23590  fi
23591
23592            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23593$as_echo_n "checking for Boot JDK... " >&6; }
23594            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23595$as_echo "$BOOT_JDK" >&6; }
23596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23597$as_echo_n "checking Boot JDK version... " >&6; }
23598            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23600$as_echo "$BOOT_JDK_VERSION" >&6; }
23601          fi # end check jdk version
23602        fi # end check javac
23603      fi # end check java
23604    fi # end check boot jdk found
23605  fi
23606
23607    # If that did not work out (e.g. too old), try explicit versions instead
23608
23609  if test "x$BOOT_JDK_FOUND" = xno; then
23610    # Now execute the test
23611
23612  if test -x /usr/libexec/java_home; then
23613    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
23614    BOOT_JDK_FOUND=maybe
23615    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
23616$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
23617  fi
23618
23619
23620    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23621    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23622      # Do we have a bin/java?
23623      if test ! -x "$BOOT_JDK/bin/java"; then
23624        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23625$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23626        BOOT_JDK_FOUND=no
23627      else
23628        # Do we have a bin/javac?
23629        if test ! -x "$BOOT_JDK/bin/javac"; then
23630          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23632          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23633$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23634          BOOT_JDK_FOUND=no
23635        else
23636          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23637          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23638
23639          # Extra M4 quote needed to protect [] in grep expression.
23640          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23641          if test "x$FOUND_CORRECT_VERSION" = x; then
23642            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23644            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23645$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23646            BOOT_JDK_FOUND=no
23647          else
23648            # We're done! :-)
23649            BOOT_JDK_FOUND=yes
23650
23651  # Only process if variable expands to non-empty
23652
23653  if test "x$BOOT_JDK" != x; then
23654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23655
23656  # Input might be given as Windows format, start by converting to
23657  # unix format.
23658  path="$BOOT_JDK"
23659  new_path=`$CYGPATH -u "$path"`
23660
23661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23664  # "foo.exe" is OK but "foo" is an error.
23665  #
23666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23667  # It is also a way to make sure we got the proper file name for the real test later on.
23668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23669  if test "x$test_shortpath" = x; then
23670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23671$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23672    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23673  fi
23674
23675  # Call helper function which possibly converts this using DOS-style short mode.
23676  # If so, the updated path is stored in $new_path.
23677
23678  input_path="$new_path"
23679  # Check if we need to convert this using DOS-style short mode. If the path
23680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23681  # take no chances and rewrite it.
23682  # Note: m4 eats our [], so we need to use [ and ] instead.
23683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23684  if test "x$has_forbidden_chars" != x; then
23685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23689      # Going to short mode and back again did indeed matter. Since short mode is
23690      # case insensitive, let's make it lowercase to improve readability.
23691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23692      # Now convert it back to Unix-style (cygpath)
23693      input_path=`$CYGPATH -u "$shortmode_path"`
23694      new_path="$input_path"
23695    fi
23696  fi
23697
23698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23699  if test "x$test_cygdrive_prefix" = x; then
23700    # As a simple fix, exclude /usr/bin since it's not a real path.
23701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23703      # a path prefixed by /cygdrive for fixpath to work.
23704      new_path="$CYGWIN_ROOT_PATH$input_path"
23705    fi
23706  fi
23707
23708
23709  if test "x$path" != "x$new_path"; then
23710    BOOT_JDK="$new_path"
23711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23712$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23713  fi
23714
23715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23716
23717  path="$BOOT_JDK"
23718  has_colon=`$ECHO $path | $GREP ^.:`
23719  new_path="$path"
23720  if test "x$has_colon" = x; then
23721    # Not in mixed or Windows style, start by that.
23722    new_path=`cmd //c echo $path`
23723  fi
23724
23725
23726  input_path="$new_path"
23727  # Check if we need to convert this using DOS-style short mode. If the path
23728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23729  # take no chances and rewrite it.
23730  # Note: m4 eats our [], so we need to use [ and ] instead.
23731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23732  if test "x$has_forbidden_chars" != x; then
23733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23735  fi
23736
23737
23738  windows_path="$new_path"
23739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23740    unix_path=`$CYGPATH -u "$windows_path"`
23741    new_path="$unix_path"
23742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23744    new_path="$unix_path"
23745  fi
23746
23747  if test "x$path" != "x$new_path"; then
23748    BOOT_JDK="$new_path"
23749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23750$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23751  fi
23752
23753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23755
23756    else
23757      # We're on a unix platform. Hooray! :)
23758      path="$BOOT_JDK"
23759      has_space=`$ECHO "$path" | $GREP " "`
23760      if test "x$has_space" != x; then
23761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23764      fi
23765
23766      # Use eval to expand a potential ~
23767      eval path="$path"
23768      if test ! -f "$path" && test ! -d "$path"; then
23769        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23770      fi
23771
23772      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23773    fi
23774  fi
23775
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23777$as_echo_n "checking for Boot JDK... " >&6; }
23778            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23779$as_echo "$BOOT_JDK" >&6; }
23780            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23781$as_echo_n "checking Boot JDK version... " >&6; }
23782            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23784$as_echo "$BOOT_JDK_VERSION" >&6; }
23785          fi # end check jdk version
23786        fi # end check javac
23787      fi # end check java
23788    fi # end check boot jdk found
23789  fi
23790
23791
23792  if test "x$BOOT_JDK_FOUND" = xno; then
23793    # Now execute the test
23794
23795  if test -x /usr/libexec/java_home; then
23796    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
23797    BOOT_JDK_FOUND=maybe
23798    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
23799$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
23800  fi
23801
23802
23803    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23804    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23805      # Do we have a bin/java?
23806      if test ! -x "$BOOT_JDK/bin/java"; then
23807        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23809        BOOT_JDK_FOUND=no
23810      else
23811        # Do we have a bin/javac?
23812        if test ! -x "$BOOT_JDK/bin/javac"; then
23813          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23815          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23816$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23817          BOOT_JDK_FOUND=no
23818        else
23819          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23820          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23821
23822          # Extra M4 quote needed to protect [] in grep expression.
23823          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23824          if test "x$FOUND_CORRECT_VERSION" = x; then
23825            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23827            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23828$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23829            BOOT_JDK_FOUND=no
23830          else
23831            # We're done! :-)
23832            BOOT_JDK_FOUND=yes
23833
23834  # Only process if variable expands to non-empty
23835
23836  if test "x$BOOT_JDK" != x; then
23837    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23838
23839  # Input might be given as Windows format, start by converting to
23840  # unix format.
23841  path="$BOOT_JDK"
23842  new_path=`$CYGPATH -u "$path"`
23843
23844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23847  # "foo.exe" is OK but "foo" is an error.
23848  #
23849  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23850  # It is also a way to make sure we got the proper file name for the real test later on.
23851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23852  if test "x$test_shortpath" = x; then
23853    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23855    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23856  fi
23857
23858  # Call helper function which possibly converts this using DOS-style short mode.
23859  # If so, the updated path is stored in $new_path.
23860
23861  input_path="$new_path"
23862  # Check if we need to convert this using DOS-style short mode. If the path
23863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23864  # take no chances and rewrite it.
23865  # Note: m4 eats our [], so we need to use [ and ] instead.
23866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23867  if test "x$has_forbidden_chars" != x; then
23868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23872      # Going to short mode and back again did indeed matter. Since short mode is
23873      # case insensitive, let's make it lowercase to improve readability.
23874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23875      # Now convert it back to Unix-style (cygpath)
23876      input_path=`$CYGPATH -u "$shortmode_path"`
23877      new_path="$input_path"
23878    fi
23879  fi
23880
23881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23882  if test "x$test_cygdrive_prefix" = x; then
23883    # As a simple fix, exclude /usr/bin since it's not a real path.
23884    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23886      # a path prefixed by /cygdrive for fixpath to work.
23887      new_path="$CYGWIN_ROOT_PATH$input_path"
23888    fi
23889  fi
23890
23891
23892  if test "x$path" != "x$new_path"; then
23893    BOOT_JDK="$new_path"
23894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23896  fi
23897
23898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23899
23900  path="$BOOT_JDK"
23901  has_colon=`$ECHO $path | $GREP ^.:`
23902  new_path="$path"
23903  if test "x$has_colon" = x; then
23904    # Not in mixed or Windows style, start by that.
23905    new_path=`cmd //c echo $path`
23906  fi
23907
23908
23909  input_path="$new_path"
23910  # Check if we need to convert this using DOS-style short mode. If the path
23911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23912  # take no chances and rewrite it.
23913  # Note: m4 eats our [], so we need to use [ and ] instead.
23914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23915  if test "x$has_forbidden_chars" != x; then
23916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23918  fi
23919
23920
23921  windows_path="$new_path"
23922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23923    unix_path=`$CYGPATH -u "$windows_path"`
23924    new_path="$unix_path"
23925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23927    new_path="$unix_path"
23928  fi
23929
23930  if test "x$path" != "x$new_path"; then
23931    BOOT_JDK="$new_path"
23932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23933$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23934  fi
23935
23936  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23937  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23938
23939    else
23940      # We're on a unix platform. Hooray! :)
23941      path="$BOOT_JDK"
23942      has_space=`$ECHO "$path" | $GREP " "`
23943      if test "x$has_space" != x; then
23944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23946        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23947      fi
23948
23949      # Use eval to expand a potential ~
23950      eval path="$path"
23951      if test ! -f "$path" && test ! -d "$path"; then
23952        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23953      fi
23954
23955      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23956    fi
23957  fi
23958
23959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23960$as_echo_n "checking for Boot JDK... " >&6; }
23961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23962$as_echo "$BOOT_JDK" >&6; }
23963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23964$as_echo_n "checking Boot JDK version... " >&6; }
23965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23967$as_echo "$BOOT_JDK_VERSION" >&6; }
23968          fi # end check jdk version
23969        fi # end check javac
23970      fi # end check java
23971    fi # end check boot jdk found
23972  fi
23973
23974
23975  if test "x$BOOT_JDK_FOUND" = xno; then
23976    # Now execute the test
23977
23978  if test -x /usr/libexec/java_home; then
23979    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
23980    BOOT_JDK_FOUND=maybe
23981    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
23982$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
23983  fi
23984
23985
23986    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23987    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23988      # Do we have a bin/java?
23989      if test ! -x "$BOOT_JDK/bin/java"; then
23990        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23992        BOOT_JDK_FOUND=no
23993      else
23994        # Do we have a bin/javac?
23995        if test ! -x "$BOOT_JDK/bin/javac"; then
23996          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23997$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23998          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23999$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24000          BOOT_JDK_FOUND=no
24001        else
24002          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24003          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24004
24005          # Extra M4 quote needed to protect [] in grep expression.
24006          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24007          if test "x$FOUND_CORRECT_VERSION" = x; then
24008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24010            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24011$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24012            BOOT_JDK_FOUND=no
24013          else
24014            # We're done! :-)
24015            BOOT_JDK_FOUND=yes
24016
24017  # Only process if variable expands to non-empty
24018
24019  if test "x$BOOT_JDK" != x; then
24020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24021
24022  # Input might be given as Windows format, start by converting to
24023  # unix format.
24024  path="$BOOT_JDK"
24025  new_path=`$CYGPATH -u "$path"`
24026
24027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24030  # "foo.exe" is OK but "foo" is an error.
24031  #
24032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24033  # It is also a way to make sure we got the proper file name for the real test later on.
24034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24035  if test "x$test_shortpath" = x; then
24036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24038    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24039  fi
24040
24041  # Call helper function which possibly converts this using DOS-style short mode.
24042  # If so, the updated path is stored in $new_path.
24043
24044  input_path="$new_path"
24045  # Check if we need to convert this using DOS-style short mode. If the path
24046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24047  # take no chances and rewrite it.
24048  # Note: m4 eats our [], so we need to use [ and ] instead.
24049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24050  if test "x$has_forbidden_chars" != x; then
24051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24055      # Going to short mode and back again did indeed matter. Since short mode is
24056      # case insensitive, let's make it lowercase to improve readability.
24057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24058      # Now convert it back to Unix-style (cygpath)
24059      input_path=`$CYGPATH -u "$shortmode_path"`
24060      new_path="$input_path"
24061    fi
24062  fi
24063
24064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24065  if test "x$test_cygdrive_prefix" = x; then
24066    # As a simple fix, exclude /usr/bin since it's not a real path.
24067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24069      # a path prefixed by /cygdrive for fixpath to work.
24070      new_path="$CYGWIN_ROOT_PATH$input_path"
24071    fi
24072  fi
24073
24074
24075  if test "x$path" != "x$new_path"; then
24076    BOOT_JDK="$new_path"
24077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24079  fi
24080
24081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24082
24083  path="$BOOT_JDK"
24084  has_colon=`$ECHO $path | $GREP ^.:`
24085  new_path="$path"
24086  if test "x$has_colon" = x; then
24087    # Not in mixed or Windows style, start by that.
24088    new_path=`cmd //c echo $path`
24089  fi
24090
24091
24092  input_path="$new_path"
24093  # Check if we need to convert this using DOS-style short mode. If the path
24094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24095  # take no chances and rewrite it.
24096  # Note: m4 eats our [], so we need to use [ and ] instead.
24097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24098  if test "x$has_forbidden_chars" != x; then
24099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24101  fi
24102
24103
24104  windows_path="$new_path"
24105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24106    unix_path=`$CYGPATH -u "$windows_path"`
24107    new_path="$unix_path"
24108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24110    new_path="$unix_path"
24111  fi
24112
24113  if test "x$path" != "x$new_path"; then
24114    BOOT_JDK="$new_path"
24115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24116$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24117  fi
24118
24119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24121
24122    else
24123      # We're on a unix platform. Hooray! :)
24124      path="$BOOT_JDK"
24125      has_space=`$ECHO "$path" | $GREP " "`
24126      if test "x$has_space" != x; then
24127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24128$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24130      fi
24131
24132      # Use eval to expand a potential ~
24133      eval path="$path"
24134      if test ! -f "$path" && test ! -d "$path"; then
24135        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24136      fi
24137
24138      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24139    fi
24140  fi
24141
24142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24143$as_echo_n "checking for Boot JDK... " >&6; }
24144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24145$as_echo "$BOOT_JDK" >&6; }
24146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24147$as_echo_n "checking Boot JDK version... " >&6; }
24148            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24150$as_echo "$BOOT_JDK_VERSION" >&6; }
24151          fi # end check jdk version
24152        fi # end check javac
24153      fi # end check java
24154    fi # end check boot jdk found
24155  fi
24156
24157  fi
24158
24159
24160    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24161    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24162      # Do we have a bin/java?
24163      if test ! -x "$BOOT_JDK/bin/java"; then
24164        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24166        BOOT_JDK_FOUND=no
24167      else
24168        # Do we have a bin/javac?
24169        if test ! -x "$BOOT_JDK/bin/javac"; then
24170          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24172          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24173$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24174          BOOT_JDK_FOUND=no
24175        else
24176          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24177          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24178
24179          # Extra M4 quote needed to protect [] in grep expression.
24180          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24181          if test "x$FOUND_CORRECT_VERSION" = x; then
24182            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24184            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24185$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24186            BOOT_JDK_FOUND=no
24187          else
24188            # We're done! :-)
24189            BOOT_JDK_FOUND=yes
24190
24191  # Only process if variable expands to non-empty
24192
24193  if test "x$BOOT_JDK" != x; then
24194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24195
24196  # Input might be given as Windows format, start by converting to
24197  # unix format.
24198  path="$BOOT_JDK"
24199  new_path=`$CYGPATH -u "$path"`
24200
24201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24204  # "foo.exe" is OK but "foo" is an error.
24205  #
24206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24207  # It is also a way to make sure we got the proper file name for the real test later on.
24208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24209  if test "x$test_shortpath" = x; then
24210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24212    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24213  fi
24214
24215  # Call helper function which possibly converts this using DOS-style short mode.
24216  # If so, the updated path is stored in $new_path.
24217
24218  input_path="$new_path"
24219  # Check if we need to convert this using DOS-style short mode. If the path
24220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24221  # take no chances and rewrite it.
24222  # Note: m4 eats our [], so we need to use [ and ] instead.
24223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24224  if test "x$has_forbidden_chars" != x; then
24225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24229      # Going to short mode and back again did indeed matter. Since short mode is
24230      # case insensitive, let's make it lowercase to improve readability.
24231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24232      # Now convert it back to Unix-style (cygpath)
24233      input_path=`$CYGPATH -u "$shortmode_path"`
24234      new_path="$input_path"
24235    fi
24236  fi
24237
24238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24239  if test "x$test_cygdrive_prefix" = x; then
24240    # As a simple fix, exclude /usr/bin since it's not a real path.
24241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24243      # a path prefixed by /cygdrive for fixpath to work.
24244      new_path="$CYGWIN_ROOT_PATH$input_path"
24245    fi
24246  fi
24247
24248
24249  if test "x$path" != "x$new_path"; then
24250    BOOT_JDK="$new_path"
24251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24252$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24253  fi
24254
24255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24256
24257  path="$BOOT_JDK"
24258  has_colon=`$ECHO $path | $GREP ^.:`
24259  new_path="$path"
24260  if test "x$has_colon" = x; then
24261    # Not in mixed or Windows style, start by that.
24262    new_path=`cmd //c echo $path`
24263  fi
24264
24265
24266  input_path="$new_path"
24267  # Check if we need to convert this using DOS-style short mode. If the path
24268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24269  # take no chances and rewrite it.
24270  # Note: m4 eats our [], so we need to use [ and ] instead.
24271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24272  if test "x$has_forbidden_chars" != x; then
24273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24275  fi
24276
24277
24278  windows_path="$new_path"
24279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24280    unix_path=`$CYGPATH -u "$windows_path"`
24281    new_path="$unix_path"
24282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24284    new_path="$unix_path"
24285  fi
24286
24287  if test "x$path" != "x$new_path"; then
24288    BOOT_JDK="$new_path"
24289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24291  fi
24292
24293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24295
24296    else
24297      # We're on a unix platform. Hooray! :)
24298      path="$BOOT_JDK"
24299      has_space=`$ECHO "$path" | $GREP " "`
24300      if test "x$has_space" != x; then
24301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24302$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24304      fi
24305
24306      # Use eval to expand a potential ~
24307      eval path="$path"
24308      if test ! -f "$path" && test ! -d "$path"; then
24309        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24310      fi
24311
24312      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24313    fi
24314  fi
24315
24316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24317$as_echo_n "checking for Boot JDK... " >&6; }
24318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24319$as_echo "$BOOT_JDK" >&6; }
24320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24321$as_echo_n "checking Boot JDK version... " >&6; }
24322            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24323            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24324$as_echo "$BOOT_JDK_VERSION" >&6; }
24325          fi # end check jdk version
24326        fi # end check javac
24327      fi # end check java
24328    fi # end check boot jdk found
24329  fi
24330
24331
24332  # Test: Is $JAVA_HOME set?
24333
24334  if test "x$BOOT_JDK_FOUND" = xno; then
24335    # Now execute the test
24336
24337  if test "x$JAVA_HOME" != x; then
24338    JAVA_HOME_PROCESSED="$JAVA_HOME"
24339
24340  # Only process if variable expands to non-empty
24341
24342  if test "x$JAVA_HOME_PROCESSED" != x; then
24343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24344
24345  # Input might be given as Windows format, start by converting to
24346  # unix format.
24347  path="$JAVA_HOME_PROCESSED"
24348  new_path=`$CYGPATH -u "$path"`
24349
24350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24353  # "foo.exe" is OK but "foo" is an error.
24354  #
24355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24356  # It is also a way to make sure we got the proper file name for the real test later on.
24357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24358  if test "x$test_shortpath" = x; then
24359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24360$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24361    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24362  fi
24363
24364  # Call helper function which possibly converts this using DOS-style short mode.
24365  # If so, the updated path is stored in $new_path.
24366
24367  input_path="$new_path"
24368  # Check if we need to convert this using DOS-style short mode. If the path
24369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24370  # take no chances and rewrite it.
24371  # Note: m4 eats our [], so we need to use [ and ] instead.
24372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24373  if test "x$has_forbidden_chars" != x; then
24374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24378      # Going to short mode and back again did indeed matter. Since short mode is
24379      # case insensitive, let's make it lowercase to improve readability.
24380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24381      # Now convert it back to Unix-style (cygpath)
24382      input_path=`$CYGPATH -u "$shortmode_path"`
24383      new_path="$input_path"
24384    fi
24385  fi
24386
24387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24388  if test "x$test_cygdrive_prefix" = x; then
24389    # As a simple fix, exclude /usr/bin since it's not a real path.
24390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24392      # a path prefixed by /cygdrive for fixpath to work.
24393      new_path="$CYGWIN_ROOT_PATH$input_path"
24394    fi
24395  fi
24396
24397
24398  if test "x$path" != "x$new_path"; then
24399    JAVA_HOME_PROCESSED="$new_path"
24400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24401$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24402  fi
24403
24404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24405
24406  path="$JAVA_HOME_PROCESSED"
24407  has_colon=`$ECHO $path | $GREP ^.:`
24408  new_path="$path"
24409  if test "x$has_colon" = x; then
24410    # Not in mixed or Windows style, start by that.
24411    new_path=`cmd //c echo $path`
24412  fi
24413
24414
24415  input_path="$new_path"
24416  # Check if we need to convert this using DOS-style short mode. If the path
24417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24418  # take no chances and rewrite it.
24419  # Note: m4 eats our [], so we need to use [ and ] instead.
24420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24421  if test "x$has_forbidden_chars" != x; then
24422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24424  fi
24425
24426
24427  windows_path="$new_path"
24428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24429    unix_path=`$CYGPATH -u "$windows_path"`
24430    new_path="$unix_path"
24431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24433    new_path="$unix_path"
24434  fi
24435
24436  if test "x$path" != "x$new_path"; then
24437    JAVA_HOME_PROCESSED="$new_path"
24438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24439$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24440  fi
24441
24442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24444
24445    else
24446      # We're on a unix platform. Hooray! :)
24447      path="$JAVA_HOME_PROCESSED"
24448      has_space=`$ECHO "$path" | $GREP " "`
24449      if test "x$has_space" != x; then
24450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24451$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24453      fi
24454
24455      # Use eval to expand a potential ~
24456      eval path="$path"
24457      if test ! -f "$path" && test ! -d "$path"; then
24458        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24459      fi
24460
24461      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24462    fi
24463  fi
24464
24465    if test ! -d "$JAVA_HOME_PROCESSED"; then
24466      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24467$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24468    else
24469      # Aha, the user has set a JAVA_HOME
24470      # let us use that as the Boot JDK.
24471      BOOT_JDK="$JAVA_HOME_PROCESSED"
24472      BOOT_JDK_FOUND=maybe
24473      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24474$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24475    fi
24476  fi
24477
24478
24479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24481      # Do we have a bin/java?
24482      if test ! -x "$BOOT_JDK/bin/java"; then
24483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24485        BOOT_JDK_FOUND=no
24486      else
24487        # Do we have a bin/javac?
24488        if test ! -x "$BOOT_JDK/bin/javac"; then
24489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24493          BOOT_JDK_FOUND=no
24494        else
24495          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24496          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24497
24498          # Extra M4 quote needed to protect [] in grep expression.
24499          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24500          if test "x$FOUND_CORRECT_VERSION" = x; then
24501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24503            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24504$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24505            BOOT_JDK_FOUND=no
24506          else
24507            # We're done! :-)
24508            BOOT_JDK_FOUND=yes
24509
24510  # Only process if variable expands to non-empty
24511
24512  if test "x$BOOT_JDK" != x; then
24513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24514
24515  # Input might be given as Windows format, start by converting to
24516  # unix format.
24517  path="$BOOT_JDK"
24518  new_path=`$CYGPATH -u "$path"`
24519
24520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24523  # "foo.exe" is OK but "foo" is an error.
24524  #
24525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24526  # It is also a way to make sure we got the proper file name for the real test later on.
24527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24528  if test "x$test_shortpath" = x; then
24529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24531    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24532  fi
24533
24534  # Call helper function which possibly converts this using DOS-style short mode.
24535  # If so, the updated path is stored in $new_path.
24536
24537  input_path="$new_path"
24538  # Check if we need to convert this using DOS-style short mode. If the path
24539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24540  # take no chances and rewrite it.
24541  # Note: m4 eats our [], so we need to use [ and ] instead.
24542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24543  if test "x$has_forbidden_chars" != x; then
24544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24548      # Going to short mode and back again did indeed matter. Since short mode is
24549      # case insensitive, let's make it lowercase to improve readability.
24550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24551      # Now convert it back to Unix-style (cygpath)
24552      input_path=`$CYGPATH -u "$shortmode_path"`
24553      new_path="$input_path"
24554    fi
24555  fi
24556
24557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24558  if test "x$test_cygdrive_prefix" = x; then
24559    # As a simple fix, exclude /usr/bin since it's not a real path.
24560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24562      # a path prefixed by /cygdrive for fixpath to work.
24563      new_path="$CYGWIN_ROOT_PATH$input_path"
24564    fi
24565  fi
24566
24567
24568  if test "x$path" != "x$new_path"; then
24569    BOOT_JDK="$new_path"
24570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24572  fi
24573
24574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24575
24576  path="$BOOT_JDK"
24577  has_colon=`$ECHO $path | $GREP ^.:`
24578  new_path="$path"
24579  if test "x$has_colon" = x; then
24580    # Not in mixed or Windows style, start by that.
24581    new_path=`cmd //c echo $path`
24582  fi
24583
24584
24585  input_path="$new_path"
24586  # Check if we need to convert this using DOS-style short mode. If the path
24587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24588  # take no chances and rewrite it.
24589  # Note: m4 eats our [], so we need to use [ and ] instead.
24590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24591  if test "x$has_forbidden_chars" != x; then
24592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24594  fi
24595
24596
24597  windows_path="$new_path"
24598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24599    unix_path=`$CYGPATH -u "$windows_path"`
24600    new_path="$unix_path"
24601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24603    new_path="$unix_path"
24604  fi
24605
24606  if test "x$path" != "x$new_path"; then
24607    BOOT_JDK="$new_path"
24608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24610  fi
24611
24612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24614
24615    else
24616      # We're on a unix platform. Hooray! :)
24617      path="$BOOT_JDK"
24618      has_space=`$ECHO "$path" | $GREP " "`
24619      if test "x$has_space" != x; then
24620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24622        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24623      fi
24624
24625      # Use eval to expand a potential ~
24626      eval path="$path"
24627      if test ! -f "$path" && test ! -d "$path"; then
24628        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24629      fi
24630
24631      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24632    fi
24633  fi
24634
24635            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24636$as_echo_n "checking for Boot JDK... " >&6; }
24637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24638$as_echo "$BOOT_JDK" >&6; }
24639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24640$as_echo_n "checking Boot JDK version... " >&6; }
24641            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24643$as_echo "$BOOT_JDK_VERSION" >&6; }
24644          fi # end check jdk version
24645        fi # end check javac
24646      fi # end check java
24647    fi # end check boot jdk found
24648  fi
24649
24650
24651  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
24652
24653  if test "x$BOOT_JDK_FOUND" = xno; then
24654    # Now execute the test
24655
24656  # Extract the first word of "javac", so it can be a program name with args.
24657set dummy javac; ac_word=$2
24658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24659$as_echo_n "checking for $ac_word... " >&6; }
24660if ${ac_cv_path_JAVAC_CHECK+:} false; then :
24661  $as_echo_n "(cached) " >&6
24662else
24663  case $JAVAC_CHECK in
24664  [\\/]* | ?:[\\/]*)
24665  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
24666  ;;
24667  *)
24668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24669for as_dir in $PATH
24670do
24671  IFS=$as_save_IFS
24672  test -z "$as_dir" && as_dir=.
24673    for ac_exec_ext in '' $ac_executable_extensions; do
24674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24675    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
24676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24677    break 2
24678  fi
24679done
24680  done
24681IFS=$as_save_IFS
24682
24683  ;;
24684esac
24685fi
24686JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
24687if test -n "$JAVAC_CHECK"; then
24688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
24689$as_echo "$JAVAC_CHECK" >&6; }
24690else
24691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24692$as_echo "no" >&6; }
24693fi
24694
24695
24696  # Extract the first word of "java", so it can be a program name with args.
24697set dummy java; ac_word=$2
24698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24699$as_echo_n "checking for $ac_word... " >&6; }
24700if ${ac_cv_path_JAVA_CHECK+:} false; then :
24701  $as_echo_n "(cached) " >&6
24702else
24703  case $JAVA_CHECK in
24704  [\\/]* | ?:[\\/]*)
24705  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
24706  ;;
24707  *)
24708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24709for as_dir in $PATH
24710do
24711  IFS=$as_save_IFS
24712  test -z "$as_dir" && as_dir=.
24713    for ac_exec_ext in '' $ac_executable_extensions; do
24714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24715    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
24716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24717    break 2
24718  fi
24719done
24720  done
24721IFS=$as_save_IFS
24722
24723  ;;
24724esac
24725fi
24726JAVA_CHECK=$ac_cv_path_JAVA_CHECK
24727if test -n "$JAVA_CHECK"; then
24728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
24729$as_echo "$JAVA_CHECK" >&6; }
24730else
24731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24732$as_echo "no" >&6; }
24733fi
24734
24735
24736  BINARY="$JAVAC_CHECK"
24737  if test "x$JAVAC_CHECK" = x; then
24738    BINARY="$JAVA_CHECK"
24739  fi
24740  if test "x$BINARY" != x; then
24741    # So there is a java(c) binary, it might be part of a JDK.
24742    # Lets find the JDK/JRE directory by following symbolic links.
24743    # Linux/GNU systems often have links from /usr/bin/java to
24744    # /etc/alternatives/java to the real JDK binary.
24745
24746  if test "x$OPENJDK_BUILD_OS" != xwindows; then
24747    # Follow a chain of symbolic links. Use readlink
24748    # where it exists, else fall back to horribly
24749    # complicated shell code.
24750    if test "x$READLINK_TESTED" != yes; then
24751      # On MacOSX there is a readlink tool with a different
24752      # purpose than the GNU readlink tool. Check the found readlink.
24753      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
24754      if test "x$ISGNU" = x; then
24755        # A readlink that we do not know how to use.
24756        # Are there other non-GNU readlinks out there?
24757        READLINK_TESTED=yes
24758        READLINK=
24759      fi
24760    fi
24761
24762    if test "x$READLINK" != x; then
24763      BINARY=`$READLINK -f $BINARY`
24764    else
24765      # Save the current directory for restoring afterwards
24766      STARTDIR=$PWD
24767      COUNTER=0
24768      sym_link_dir=`$DIRNAME $BINARY`
24769      sym_link_file=`$BASENAME $BINARY`
24770      cd $sym_link_dir
24771      # Use -P flag to resolve symlinks in directories.
24772      cd `$THEPWDCMD -P`
24773      sym_link_dir=`$THEPWDCMD -P`
24774      # Resolve file symlinks
24775      while test $COUNTER -lt 20; do
24776        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
24777        if test "x$ISLINK" == x; then
24778          # This is not a symbolic link! We are done!
24779          break
24780        fi
24781        # Again resolve directory symlinks since the target of the just found
24782        # link could be in a different directory
24783        cd `$DIRNAME $ISLINK`
24784        sym_link_dir=`$THEPWDCMD -P`
24785        sym_link_file=`$BASENAME $ISLINK`
24786        let COUNTER=COUNTER+1
24787      done
24788      cd $STARTDIR
24789      BINARY=$sym_link_dir/$sym_link_file
24790    fi
24791  fi
24792
24793    BOOT_JDK=`dirname "$BINARY"`
24794    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
24795    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
24796      # Looks like we found ourselves an JDK
24797      BOOT_JDK_FOUND=maybe
24798      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
24799$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
24800    fi
24801  fi
24802
24803
24804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24806      # Do we have a bin/java?
24807      if test ! -x "$BOOT_JDK/bin/java"; then
24808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24810        BOOT_JDK_FOUND=no
24811      else
24812        # Do we have a bin/javac?
24813        if test ! -x "$BOOT_JDK/bin/javac"; then
24814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24818          BOOT_JDK_FOUND=no
24819        else
24820          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24821          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24822
24823          # Extra M4 quote needed to protect [] in grep expression.
24824          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24825          if test "x$FOUND_CORRECT_VERSION" = x; then
24826            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24828            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24829$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24830            BOOT_JDK_FOUND=no
24831          else
24832            # We're done! :-)
24833            BOOT_JDK_FOUND=yes
24834
24835  # Only process if variable expands to non-empty
24836
24837  if test "x$BOOT_JDK" != x; then
24838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24839
24840  # Input might be given as Windows format, start by converting to
24841  # unix format.
24842  path="$BOOT_JDK"
24843  new_path=`$CYGPATH -u "$path"`
24844
24845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24848  # "foo.exe" is OK but "foo" is an error.
24849  #
24850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24851  # It is also a way to make sure we got the proper file name for the real test later on.
24852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24853  if test "x$test_shortpath" = x; then
24854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24856    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24857  fi
24858
24859  # Call helper function which possibly converts this using DOS-style short mode.
24860  # If so, the updated path is stored in $new_path.
24861
24862  input_path="$new_path"
24863  # Check if we need to convert this using DOS-style short mode. If the path
24864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24865  # take no chances and rewrite it.
24866  # Note: m4 eats our [], so we need to use [ and ] instead.
24867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24868  if test "x$has_forbidden_chars" != x; then
24869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24873      # Going to short mode and back again did indeed matter. Since short mode is
24874      # case insensitive, let's make it lowercase to improve readability.
24875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24876      # Now convert it back to Unix-style (cygpath)
24877      input_path=`$CYGPATH -u "$shortmode_path"`
24878      new_path="$input_path"
24879    fi
24880  fi
24881
24882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24883  if test "x$test_cygdrive_prefix" = x; then
24884    # As a simple fix, exclude /usr/bin since it's not a real path.
24885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24887      # a path prefixed by /cygdrive for fixpath to work.
24888      new_path="$CYGWIN_ROOT_PATH$input_path"
24889    fi
24890  fi
24891
24892
24893  if test "x$path" != "x$new_path"; then
24894    BOOT_JDK="$new_path"
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24896$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24897  fi
24898
24899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24900
24901  path="$BOOT_JDK"
24902  has_colon=`$ECHO $path | $GREP ^.:`
24903  new_path="$path"
24904  if test "x$has_colon" = x; then
24905    # Not in mixed or Windows style, start by that.
24906    new_path=`cmd //c echo $path`
24907  fi
24908
24909
24910  input_path="$new_path"
24911  # Check if we need to convert this using DOS-style short mode. If the path
24912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24913  # take no chances and rewrite it.
24914  # Note: m4 eats our [], so we need to use [ and ] instead.
24915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24916  if test "x$has_forbidden_chars" != x; then
24917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24919  fi
24920
24921
24922  windows_path="$new_path"
24923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24924    unix_path=`$CYGPATH -u "$windows_path"`
24925    new_path="$unix_path"
24926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24928    new_path="$unix_path"
24929  fi
24930
24931  if test "x$path" != "x$new_path"; then
24932    BOOT_JDK="$new_path"
24933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24934$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24935  fi
24936
24937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24939
24940    else
24941      # We're on a unix platform. Hooray! :)
24942      path="$BOOT_JDK"
24943      has_space=`$ECHO "$path" | $GREP " "`
24944      if test "x$has_space" != x; then
24945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24948      fi
24949
24950      # Use eval to expand a potential ~
24951      eval path="$path"
24952      if test ! -f "$path" && test ! -d "$path"; then
24953        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24954      fi
24955
24956      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24957    fi
24958  fi
24959
24960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24961$as_echo_n "checking for Boot JDK... " >&6; }
24962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24963$as_echo "$BOOT_JDK" >&6; }
24964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24965$as_echo_n "checking Boot JDK version... " >&6; }
24966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24968$as_echo "$BOOT_JDK_VERSION" >&6; }
24969          fi # end check jdk version
24970        fi # end check javac
24971      fi # end check java
24972    fi # end check boot jdk found
24973  fi
24974
24975
24976  # Test: Is there a JDK installed in default, well-known locations?
24977
24978  if test "x$BOOT_JDK_FOUND" = xno; then
24979    # Now execute the test
24980
24981  if test "x$OPENJDK_TARGET_OS" = xwindows; then
24982
24983  if test "x$BOOT_JDK_FOUND" = xno; then
24984    # Now execute the test
24985
24986  if test "x$ProgramW6432" != x; then
24987    VIRTUAL_DIR="$ProgramW6432/Java"
24988
24989  windows_path="$VIRTUAL_DIR"
24990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24991    unix_path=`$CYGPATH -u "$windows_path"`
24992    VIRTUAL_DIR="$unix_path"
24993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24995    VIRTUAL_DIR="$unix_path"
24996  fi
24997
24998
24999  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25000  BOOT_JDK_SUFFIX=""
25001  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25002  if test "x$ALL_JDKS_FOUND" != x; then
25003    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25004
25005  if test "x$BOOT_JDK_FOUND" = xno; then
25006    # Now execute the test
25007
25008        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25009        if test -d "$BOOT_JDK"; then
25010          BOOT_JDK_FOUND=maybe
25011          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25012$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25013        fi
25014
25015
25016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25018      # Do we have a bin/java?
25019      if test ! -x "$BOOT_JDK/bin/java"; then
25020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25022        BOOT_JDK_FOUND=no
25023      else
25024        # Do we have a bin/javac?
25025        if test ! -x "$BOOT_JDK/bin/javac"; then
25026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25030          BOOT_JDK_FOUND=no
25031        else
25032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25034
25035          # Extra M4 quote needed to protect [] in grep expression.
25036          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25037          if test "x$FOUND_CORRECT_VERSION" = x; then
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25042            BOOT_JDK_FOUND=no
25043          else
25044            # We're done! :-)
25045            BOOT_JDK_FOUND=yes
25046
25047  # Only process if variable expands to non-empty
25048
25049  if test "x$BOOT_JDK" != x; then
25050    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25051
25052  # Input might be given as Windows format, start by converting to
25053  # unix format.
25054  path="$BOOT_JDK"
25055  new_path=`$CYGPATH -u "$path"`
25056
25057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25060  # "foo.exe" is OK but "foo" is an error.
25061  #
25062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25063  # It is also a way to make sure we got the proper file name for the real test later on.
25064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25065  if test "x$test_shortpath" = x; then
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25067$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25068    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25069  fi
25070
25071  # Call helper function which possibly converts this using DOS-style short mode.
25072  # If so, the updated path is stored in $new_path.
25073
25074  input_path="$new_path"
25075  # Check if we need to convert this using DOS-style short mode. If the path
25076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25077  # take no chances and rewrite it.
25078  # Note: m4 eats our [], so we need to use [ and ] instead.
25079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25080  if test "x$has_forbidden_chars" != x; then
25081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25085      # Going to short mode and back again did indeed matter. Since short mode is
25086      # case insensitive, let's make it lowercase to improve readability.
25087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25088      # Now convert it back to Unix-style (cygpath)
25089      input_path=`$CYGPATH -u "$shortmode_path"`
25090      new_path="$input_path"
25091    fi
25092  fi
25093
25094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25095  if test "x$test_cygdrive_prefix" = x; then
25096    # As a simple fix, exclude /usr/bin since it's not a real path.
25097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25099      # a path prefixed by /cygdrive for fixpath to work.
25100      new_path="$CYGWIN_ROOT_PATH$input_path"
25101    fi
25102  fi
25103
25104
25105  if test "x$path" != "x$new_path"; then
25106    BOOT_JDK="$new_path"
25107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25109  fi
25110
25111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112
25113  path="$BOOT_JDK"
25114  has_colon=`$ECHO $path | $GREP ^.:`
25115  new_path="$path"
25116  if test "x$has_colon" = x; then
25117    # Not in mixed or Windows style, start by that.
25118    new_path=`cmd //c echo $path`
25119  fi
25120
25121
25122  input_path="$new_path"
25123  # Check if we need to convert this using DOS-style short mode. If the path
25124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25125  # take no chances and rewrite it.
25126  # Note: m4 eats our [], so we need to use [ and ] instead.
25127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25128  if test "x$has_forbidden_chars" != x; then
25129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25131  fi
25132
25133
25134  windows_path="$new_path"
25135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25136    unix_path=`$CYGPATH -u "$windows_path"`
25137    new_path="$unix_path"
25138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25140    new_path="$unix_path"
25141  fi
25142
25143  if test "x$path" != "x$new_path"; then
25144    BOOT_JDK="$new_path"
25145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25146$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25147  fi
25148
25149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25151
25152    else
25153      # We're on a unix platform. Hooray! :)
25154      path="$BOOT_JDK"
25155      has_space=`$ECHO "$path" | $GREP " "`
25156      if test "x$has_space" != x; then
25157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25158$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25159        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25160      fi
25161
25162      # Use eval to expand a potential ~
25163      eval path="$path"
25164      if test ! -f "$path" && test ! -d "$path"; then
25165        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25166      fi
25167
25168      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25169    fi
25170  fi
25171
25172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25173$as_echo_n "checking for Boot JDK... " >&6; }
25174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25175$as_echo "$BOOT_JDK" >&6; }
25176            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25177$as_echo_n "checking Boot JDK version... " >&6; }
25178            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25179            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25180$as_echo "$BOOT_JDK_VERSION" >&6; }
25181          fi # end check jdk version
25182        fi # end check javac
25183      fi # end check java
25184    fi # end check boot jdk found
25185  fi
25186
25187    done
25188  fi
25189
25190  fi
25191
25192
25193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25195      # Do we have a bin/java?
25196      if test ! -x "$BOOT_JDK/bin/java"; then
25197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25199        BOOT_JDK_FOUND=no
25200      else
25201        # Do we have a bin/javac?
25202        if test ! -x "$BOOT_JDK/bin/javac"; then
25203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25207          BOOT_JDK_FOUND=no
25208        else
25209          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25210          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25211
25212          # Extra M4 quote needed to protect [] in grep expression.
25213          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25214          if test "x$FOUND_CORRECT_VERSION" = x; then
25215            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25217            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25218$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25219            BOOT_JDK_FOUND=no
25220          else
25221            # We're done! :-)
25222            BOOT_JDK_FOUND=yes
25223
25224  # Only process if variable expands to non-empty
25225
25226  if test "x$BOOT_JDK" != x; then
25227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25228
25229  # Input might be given as Windows format, start by converting to
25230  # unix format.
25231  path="$BOOT_JDK"
25232  new_path=`$CYGPATH -u "$path"`
25233
25234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25237  # "foo.exe" is OK but "foo" is an error.
25238  #
25239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25240  # It is also a way to make sure we got the proper file name for the real test later on.
25241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25242  if test "x$test_shortpath" = x; then
25243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25244$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25245    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25246  fi
25247
25248  # Call helper function which possibly converts this using DOS-style short mode.
25249  # If so, the updated path is stored in $new_path.
25250
25251  input_path="$new_path"
25252  # Check if we need to convert this using DOS-style short mode. If the path
25253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25254  # take no chances and rewrite it.
25255  # Note: m4 eats our [], so we need to use [ and ] instead.
25256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25257  if test "x$has_forbidden_chars" != x; then
25258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25262      # Going to short mode and back again did indeed matter. Since short mode is
25263      # case insensitive, let's make it lowercase to improve readability.
25264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25265      # Now convert it back to Unix-style (cygpath)
25266      input_path=`$CYGPATH -u "$shortmode_path"`
25267      new_path="$input_path"
25268    fi
25269  fi
25270
25271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25272  if test "x$test_cygdrive_prefix" = x; then
25273    # As a simple fix, exclude /usr/bin since it's not a real path.
25274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25276      # a path prefixed by /cygdrive for fixpath to work.
25277      new_path="$CYGWIN_ROOT_PATH$input_path"
25278    fi
25279  fi
25280
25281
25282  if test "x$path" != "x$new_path"; then
25283    BOOT_JDK="$new_path"
25284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25286  fi
25287
25288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25289
25290  path="$BOOT_JDK"
25291  has_colon=`$ECHO $path | $GREP ^.:`
25292  new_path="$path"
25293  if test "x$has_colon" = x; then
25294    # Not in mixed or Windows style, start by that.
25295    new_path=`cmd //c echo $path`
25296  fi
25297
25298
25299  input_path="$new_path"
25300  # Check if we need to convert this using DOS-style short mode. If the path
25301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25302  # take no chances and rewrite it.
25303  # Note: m4 eats our [], so we need to use [ and ] instead.
25304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25305  if test "x$has_forbidden_chars" != x; then
25306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25308  fi
25309
25310
25311  windows_path="$new_path"
25312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25313    unix_path=`$CYGPATH -u "$windows_path"`
25314    new_path="$unix_path"
25315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25317    new_path="$unix_path"
25318  fi
25319
25320  if test "x$path" != "x$new_path"; then
25321    BOOT_JDK="$new_path"
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25323$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25324  fi
25325
25326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25328
25329    else
25330      # We're on a unix platform. Hooray! :)
25331      path="$BOOT_JDK"
25332      has_space=`$ECHO "$path" | $GREP " "`
25333      if test "x$has_space" != x; then
25334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25335$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25337      fi
25338
25339      # Use eval to expand a potential ~
25340      eval path="$path"
25341      if test ! -f "$path" && test ! -d "$path"; then
25342        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25343      fi
25344
25345      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25346    fi
25347  fi
25348
25349            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25350$as_echo_n "checking for Boot JDK... " >&6; }
25351            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25352$as_echo "$BOOT_JDK" >&6; }
25353            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25354$as_echo_n "checking Boot JDK version... " >&6; }
25355            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25357$as_echo "$BOOT_JDK_VERSION" >&6; }
25358          fi # end check jdk version
25359        fi # end check javac
25360      fi # end check java
25361    fi # end check boot jdk found
25362  fi
25363
25364
25365  if test "x$BOOT_JDK_FOUND" = xno; then
25366    # Now execute the test
25367
25368  if test "x$PROGRAMW6432" != x; then
25369    VIRTUAL_DIR="$PROGRAMW6432/Java"
25370
25371  windows_path="$VIRTUAL_DIR"
25372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25373    unix_path=`$CYGPATH -u "$windows_path"`
25374    VIRTUAL_DIR="$unix_path"
25375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25377    VIRTUAL_DIR="$unix_path"
25378  fi
25379
25380
25381  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25382  BOOT_JDK_SUFFIX=""
25383  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25384  if test "x$ALL_JDKS_FOUND" != x; then
25385    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25386
25387  if test "x$BOOT_JDK_FOUND" = xno; then
25388    # Now execute the test
25389
25390        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25391        if test -d "$BOOT_JDK"; then
25392          BOOT_JDK_FOUND=maybe
25393          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25394$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25395        fi
25396
25397
25398    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25399    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25400      # Do we have a bin/java?
25401      if test ! -x "$BOOT_JDK/bin/java"; then
25402        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25404        BOOT_JDK_FOUND=no
25405      else
25406        # Do we have a bin/javac?
25407        if test ! -x "$BOOT_JDK/bin/javac"; then
25408          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25410          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25411$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25412          BOOT_JDK_FOUND=no
25413        else
25414          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25415          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25416
25417          # Extra M4 quote needed to protect [] in grep expression.
25418          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25419          if test "x$FOUND_CORRECT_VERSION" = x; then
25420            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25422            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25423$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25424            BOOT_JDK_FOUND=no
25425          else
25426            # We're done! :-)
25427            BOOT_JDK_FOUND=yes
25428
25429  # Only process if variable expands to non-empty
25430
25431  if test "x$BOOT_JDK" != x; then
25432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25433
25434  # Input might be given as Windows format, start by converting to
25435  # unix format.
25436  path="$BOOT_JDK"
25437  new_path=`$CYGPATH -u "$path"`
25438
25439  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25440  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25441  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25442  # "foo.exe" is OK but "foo" is an error.
25443  #
25444  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25445  # It is also a way to make sure we got the proper file name for the real test later on.
25446  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25447  if test "x$test_shortpath" = x; then
25448    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25449$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25450    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25451  fi
25452
25453  # Call helper function which possibly converts this using DOS-style short mode.
25454  # If so, the updated path is stored in $new_path.
25455
25456  input_path="$new_path"
25457  # Check if we need to convert this using DOS-style short mode. If the path
25458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25459  # take no chances and rewrite it.
25460  # Note: m4 eats our [], so we need to use [ and ] instead.
25461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25462  if test "x$has_forbidden_chars" != x; then
25463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25467      # Going to short mode and back again did indeed matter. Since short mode is
25468      # case insensitive, let's make it lowercase to improve readability.
25469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25470      # Now convert it back to Unix-style (cygpath)
25471      input_path=`$CYGPATH -u "$shortmode_path"`
25472      new_path="$input_path"
25473    fi
25474  fi
25475
25476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25477  if test "x$test_cygdrive_prefix" = x; then
25478    # As a simple fix, exclude /usr/bin since it's not a real path.
25479    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25481      # a path prefixed by /cygdrive for fixpath to work.
25482      new_path="$CYGWIN_ROOT_PATH$input_path"
25483    fi
25484  fi
25485
25486
25487  if test "x$path" != "x$new_path"; then
25488    BOOT_JDK="$new_path"
25489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25491  fi
25492
25493    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25494
25495  path="$BOOT_JDK"
25496  has_colon=`$ECHO $path | $GREP ^.:`
25497  new_path="$path"
25498  if test "x$has_colon" = x; then
25499    # Not in mixed or Windows style, start by that.
25500    new_path=`cmd //c echo $path`
25501  fi
25502
25503
25504  input_path="$new_path"
25505  # Check if we need to convert this using DOS-style short mode. If the path
25506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25507  # take no chances and rewrite it.
25508  # Note: m4 eats our [], so we need to use [ and ] instead.
25509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25510  if test "x$has_forbidden_chars" != x; then
25511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25513  fi
25514
25515
25516  windows_path="$new_path"
25517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25518    unix_path=`$CYGPATH -u "$windows_path"`
25519    new_path="$unix_path"
25520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25522    new_path="$unix_path"
25523  fi
25524
25525  if test "x$path" != "x$new_path"; then
25526    BOOT_JDK="$new_path"
25527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25529  fi
25530
25531  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25532  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25533
25534    else
25535      # We're on a unix platform. Hooray! :)
25536      path="$BOOT_JDK"
25537      has_space=`$ECHO "$path" | $GREP " "`
25538      if test "x$has_space" != x; then
25539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25541        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25542      fi
25543
25544      # Use eval to expand a potential ~
25545      eval path="$path"
25546      if test ! -f "$path" && test ! -d "$path"; then
25547        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25548      fi
25549
25550      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25551    fi
25552  fi
25553
25554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25555$as_echo_n "checking for Boot JDK... " >&6; }
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25557$as_echo "$BOOT_JDK" >&6; }
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25559$as_echo_n "checking Boot JDK version... " >&6; }
25560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25562$as_echo "$BOOT_JDK_VERSION" >&6; }
25563          fi # end check jdk version
25564        fi # end check javac
25565      fi # end check java
25566    fi # end check boot jdk found
25567  fi
25568
25569    done
25570  fi
25571
25572  fi
25573
25574
25575    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25576    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25577      # Do we have a bin/java?
25578      if test ! -x "$BOOT_JDK/bin/java"; then
25579        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25581        BOOT_JDK_FOUND=no
25582      else
25583        # Do we have a bin/javac?
25584        if test ! -x "$BOOT_JDK/bin/javac"; then
25585          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25587          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25588$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25589          BOOT_JDK_FOUND=no
25590        else
25591          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25592          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25593
25594          # Extra M4 quote needed to protect [] in grep expression.
25595          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25596          if test "x$FOUND_CORRECT_VERSION" = x; then
25597            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25599            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25600$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25601            BOOT_JDK_FOUND=no
25602          else
25603            # We're done! :-)
25604            BOOT_JDK_FOUND=yes
25605
25606  # Only process if variable expands to non-empty
25607
25608  if test "x$BOOT_JDK" != x; then
25609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25610
25611  # Input might be given as Windows format, start by converting to
25612  # unix format.
25613  path="$BOOT_JDK"
25614  new_path=`$CYGPATH -u "$path"`
25615
25616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25619  # "foo.exe" is OK but "foo" is an error.
25620  #
25621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25622  # It is also a way to make sure we got the proper file name for the real test later on.
25623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25624  if test "x$test_shortpath" = x; then
25625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25627    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25628  fi
25629
25630  # Call helper function which possibly converts this using DOS-style short mode.
25631  # If so, the updated path is stored in $new_path.
25632
25633  input_path="$new_path"
25634  # Check if we need to convert this using DOS-style short mode. If the path
25635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25636  # take no chances and rewrite it.
25637  # Note: m4 eats our [], so we need to use [ and ] instead.
25638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25639  if test "x$has_forbidden_chars" != x; then
25640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25644      # Going to short mode and back again did indeed matter. Since short mode is
25645      # case insensitive, let's make it lowercase to improve readability.
25646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25647      # Now convert it back to Unix-style (cygpath)
25648      input_path=`$CYGPATH -u "$shortmode_path"`
25649      new_path="$input_path"
25650    fi
25651  fi
25652
25653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25654  if test "x$test_cygdrive_prefix" = x; then
25655    # As a simple fix, exclude /usr/bin since it's not a real path.
25656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25658      # a path prefixed by /cygdrive for fixpath to work.
25659      new_path="$CYGWIN_ROOT_PATH$input_path"
25660    fi
25661  fi
25662
25663
25664  if test "x$path" != "x$new_path"; then
25665    BOOT_JDK="$new_path"
25666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25668  fi
25669
25670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25671
25672  path="$BOOT_JDK"
25673  has_colon=`$ECHO $path | $GREP ^.:`
25674  new_path="$path"
25675  if test "x$has_colon" = x; then
25676    # Not in mixed or Windows style, start by that.
25677    new_path=`cmd //c echo $path`
25678  fi
25679
25680
25681  input_path="$new_path"
25682  # Check if we need to convert this using DOS-style short mode. If the path
25683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25684  # take no chances and rewrite it.
25685  # Note: m4 eats our [], so we need to use [ and ] instead.
25686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25687  if test "x$has_forbidden_chars" != x; then
25688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25690  fi
25691
25692
25693  windows_path="$new_path"
25694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25695    unix_path=`$CYGPATH -u "$windows_path"`
25696    new_path="$unix_path"
25697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25699    new_path="$unix_path"
25700  fi
25701
25702  if test "x$path" != "x$new_path"; then
25703    BOOT_JDK="$new_path"
25704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25706  fi
25707
25708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25710
25711    else
25712      # We're on a unix platform. Hooray! :)
25713      path="$BOOT_JDK"
25714      has_space=`$ECHO "$path" | $GREP " "`
25715      if test "x$has_space" != x; then
25716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25719      fi
25720
25721      # Use eval to expand a potential ~
25722      eval path="$path"
25723      if test ! -f "$path" && test ! -d "$path"; then
25724        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25725      fi
25726
25727      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25728    fi
25729  fi
25730
25731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25732$as_echo_n "checking for Boot JDK... " >&6; }
25733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25734$as_echo "$BOOT_JDK" >&6; }
25735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25736$as_echo_n "checking Boot JDK version... " >&6; }
25737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25739$as_echo "$BOOT_JDK_VERSION" >&6; }
25740          fi # end check jdk version
25741        fi # end check javac
25742      fi # end check java
25743    fi # end check boot jdk found
25744  fi
25745
25746
25747  if test "x$BOOT_JDK_FOUND" = xno; then
25748    # Now execute the test
25749
25750  if test "x$PROGRAMFILES" != x; then
25751    VIRTUAL_DIR="$PROGRAMFILES/Java"
25752
25753  windows_path="$VIRTUAL_DIR"
25754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25755    unix_path=`$CYGPATH -u "$windows_path"`
25756    VIRTUAL_DIR="$unix_path"
25757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25759    VIRTUAL_DIR="$unix_path"
25760  fi
25761
25762
25763  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25764  BOOT_JDK_SUFFIX=""
25765  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25766  if test "x$ALL_JDKS_FOUND" != x; then
25767    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25768
25769  if test "x$BOOT_JDK_FOUND" = xno; then
25770    # Now execute the test
25771
25772        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25773        if test -d "$BOOT_JDK"; then
25774          BOOT_JDK_FOUND=maybe
25775          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25776$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25777        fi
25778
25779
25780    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25781    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25782      # Do we have a bin/java?
25783      if test ! -x "$BOOT_JDK/bin/java"; then
25784        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25786        BOOT_JDK_FOUND=no
25787      else
25788        # Do we have a bin/javac?
25789        if test ! -x "$BOOT_JDK/bin/javac"; then
25790          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25792          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25793$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25794          BOOT_JDK_FOUND=no
25795        else
25796          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25797          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25798
25799          # Extra M4 quote needed to protect [] in grep expression.
25800          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25801          if test "x$FOUND_CORRECT_VERSION" = x; then
25802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25804            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25805$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25806            BOOT_JDK_FOUND=no
25807          else
25808            # We're done! :-)
25809            BOOT_JDK_FOUND=yes
25810
25811  # Only process if variable expands to non-empty
25812
25813  if test "x$BOOT_JDK" != x; then
25814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25815
25816  # Input might be given as Windows format, start by converting to
25817  # unix format.
25818  path="$BOOT_JDK"
25819  new_path=`$CYGPATH -u "$path"`
25820
25821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25824  # "foo.exe" is OK but "foo" is an error.
25825  #
25826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25827  # It is also a way to make sure we got the proper file name for the real test later on.
25828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25829  if test "x$test_shortpath" = x; then
25830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25833  fi
25834
25835  # Call helper function which possibly converts this using DOS-style short mode.
25836  # If so, the updated path is stored in $new_path.
25837
25838  input_path="$new_path"
25839  # Check if we need to convert this using DOS-style short mode. If the path
25840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25841  # take no chances and rewrite it.
25842  # Note: m4 eats our [], so we need to use [ and ] instead.
25843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25844  if test "x$has_forbidden_chars" != x; then
25845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25849      # Going to short mode and back again did indeed matter. Since short mode is
25850      # case insensitive, let's make it lowercase to improve readability.
25851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852      # Now convert it back to Unix-style (cygpath)
25853      input_path=`$CYGPATH -u "$shortmode_path"`
25854      new_path="$input_path"
25855    fi
25856  fi
25857
25858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25859  if test "x$test_cygdrive_prefix" = x; then
25860    # As a simple fix, exclude /usr/bin since it's not a real path.
25861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25863      # a path prefixed by /cygdrive for fixpath to work.
25864      new_path="$CYGWIN_ROOT_PATH$input_path"
25865    fi
25866  fi
25867
25868
25869  if test "x$path" != "x$new_path"; then
25870    BOOT_JDK="$new_path"
25871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25873  fi
25874
25875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25876
25877  path="$BOOT_JDK"
25878  has_colon=`$ECHO $path | $GREP ^.:`
25879  new_path="$path"
25880  if test "x$has_colon" = x; then
25881    # Not in mixed or Windows style, start by that.
25882    new_path=`cmd //c echo $path`
25883  fi
25884
25885
25886  input_path="$new_path"
25887  # Check if we need to convert this using DOS-style short mode. If the path
25888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25889  # take no chances and rewrite it.
25890  # Note: m4 eats our [], so we need to use [ and ] instead.
25891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25892  if test "x$has_forbidden_chars" != x; then
25893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25895  fi
25896
25897
25898  windows_path="$new_path"
25899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25900    unix_path=`$CYGPATH -u "$windows_path"`
25901    new_path="$unix_path"
25902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25904    new_path="$unix_path"
25905  fi
25906
25907  if test "x$path" != "x$new_path"; then
25908    BOOT_JDK="$new_path"
25909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25911  fi
25912
25913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25915
25916    else
25917      # We're on a unix platform. Hooray! :)
25918      path="$BOOT_JDK"
25919      has_space=`$ECHO "$path" | $GREP " "`
25920      if test "x$has_space" != x; then
25921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25924      fi
25925
25926      # Use eval to expand a potential ~
25927      eval path="$path"
25928      if test ! -f "$path" && test ! -d "$path"; then
25929        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25930      fi
25931
25932      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25933    fi
25934  fi
25935
25936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25937$as_echo_n "checking for Boot JDK... " >&6; }
25938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25939$as_echo "$BOOT_JDK" >&6; }
25940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25941$as_echo_n "checking Boot JDK version... " >&6; }
25942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25944$as_echo "$BOOT_JDK_VERSION" >&6; }
25945          fi # end check jdk version
25946        fi # end check javac
25947      fi # end check java
25948    fi # end check boot jdk found
25949  fi
25950
25951    done
25952  fi
25953
25954  fi
25955
25956
25957    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25958    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25959      # Do we have a bin/java?
25960      if test ! -x "$BOOT_JDK/bin/java"; then
25961        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25963        BOOT_JDK_FOUND=no
25964      else
25965        # Do we have a bin/javac?
25966        if test ! -x "$BOOT_JDK/bin/javac"; then
25967          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25969          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25970$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25971          BOOT_JDK_FOUND=no
25972        else
25973          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25974          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25975
25976          # Extra M4 quote needed to protect [] in grep expression.
25977          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25978          if test "x$FOUND_CORRECT_VERSION" = x; then
25979            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25981            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25982$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25983            BOOT_JDK_FOUND=no
25984          else
25985            # We're done! :-)
25986            BOOT_JDK_FOUND=yes
25987
25988  # Only process if variable expands to non-empty
25989
25990  if test "x$BOOT_JDK" != x; then
25991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25992
25993  # Input might be given as Windows format, start by converting to
25994  # unix format.
25995  path="$BOOT_JDK"
25996  new_path=`$CYGPATH -u "$path"`
25997
25998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26001  # "foo.exe" is OK but "foo" is an error.
26002  #
26003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26004  # It is also a way to make sure we got the proper file name for the real test later on.
26005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26006  if test "x$test_shortpath" = x; then
26007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26008$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26009    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26010  fi
26011
26012  # Call helper function which possibly converts this using DOS-style short mode.
26013  # If so, the updated path is stored in $new_path.
26014
26015  input_path="$new_path"
26016  # Check if we need to convert this using DOS-style short mode. If the path
26017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26018  # take no chances and rewrite it.
26019  # Note: m4 eats our [], so we need to use [ and ] instead.
26020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26021  if test "x$has_forbidden_chars" != x; then
26022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26026      # Going to short mode and back again did indeed matter. Since short mode is
26027      # case insensitive, let's make it lowercase to improve readability.
26028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26029      # Now convert it back to Unix-style (cygpath)
26030      input_path=`$CYGPATH -u "$shortmode_path"`
26031      new_path="$input_path"
26032    fi
26033  fi
26034
26035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26036  if test "x$test_cygdrive_prefix" = x; then
26037    # As a simple fix, exclude /usr/bin since it's not a real path.
26038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26040      # a path prefixed by /cygdrive for fixpath to work.
26041      new_path="$CYGWIN_ROOT_PATH$input_path"
26042    fi
26043  fi
26044
26045
26046  if test "x$path" != "x$new_path"; then
26047    BOOT_JDK="$new_path"
26048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26049$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26050  fi
26051
26052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26053
26054  path="$BOOT_JDK"
26055  has_colon=`$ECHO $path | $GREP ^.:`
26056  new_path="$path"
26057  if test "x$has_colon" = x; then
26058    # Not in mixed or Windows style, start by that.
26059    new_path=`cmd //c echo $path`
26060  fi
26061
26062
26063  input_path="$new_path"
26064  # Check if we need to convert this using DOS-style short mode. If the path
26065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26066  # take no chances and rewrite it.
26067  # Note: m4 eats our [], so we need to use [ and ] instead.
26068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26069  if test "x$has_forbidden_chars" != x; then
26070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26072  fi
26073
26074
26075  windows_path="$new_path"
26076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26077    unix_path=`$CYGPATH -u "$windows_path"`
26078    new_path="$unix_path"
26079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26081    new_path="$unix_path"
26082  fi
26083
26084  if test "x$path" != "x$new_path"; then
26085    BOOT_JDK="$new_path"
26086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26087$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26088  fi
26089
26090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26092
26093    else
26094      # We're on a unix platform. Hooray! :)
26095      path="$BOOT_JDK"
26096      has_space=`$ECHO "$path" | $GREP " "`
26097      if test "x$has_space" != x; then
26098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26101      fi
26102
26103      # Use eval to expand a potential ~
26104      eval path="$path"
26105      if test ! -f "$path" && test ! -d "$path"; then
26106        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26107      fi
26108
26109      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26110    fi
26111  fi
26112
26113            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26114$as_echo_n "checking for Boot JDK... " >&6; }
26115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26116$as_echo "$BOOT_JDK" >&6; }
26117            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26118$as_echo_n "checking Boot JDK version... " >&6; }
26119            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26120            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26121$as_echo "$BOOT_JDK_VERSION" >&6; }
26122          fi # end check jdk version
26123        fi # end check javac
26124      fi # end check java
26125    fi # end check boot jdk found
26126  fi
26127
26128
26129  if test "x$BOOT_JDK_FOUND" = xno; then
26130    # Now execute the test
26131
26132  if test "x$ProgramFiles" != x; then
26133    VIRTUAL_DIR="$ProgramFiles/Java"
26134
26135  windows_path="$VIRTUAL_DIR"
26136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26137    unix_path=`$CYGPATH -u "$windows_path"`
26138    VIRTUAL_DIR="$unix_path"
26139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26141    VIRTUAL_DIR="$unix_path"
26142  fi
26143
26144
26145  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26146  BOOT_JDK_SUFFIX=""
26147  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26148  if test "x$ALL_JDKS_FOUND" != x; then
26149    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26150
26151  if test "x$BOOT_JDK_FOUND" = xno; then
26152    # Now execute the test
26153
26154        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26155        if test -d "$BOOT_JDK"; then
26156          BOOT_JDK_FOUND=maybe
26157          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26158$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26159        fi
26160
26161
26162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26164      # Do we have a bin/java?
26165      if test ! -x "$BOOT_JDK/bin/java"; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26168        BOOT_JDK_FOUND=no
26169      else
26170        # Do we have a bin/javac?
26171        if test ! -x "$BOOT_JDK/bin/javac"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26176          BOOT_JDK_FOUND=no
26177        else
26178          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26179          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26180
26181          # Extra M4 quote needed to protect [] in grep expression.
26182          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26183          if test "x$FOUND_CORRECT_VERSION" = x; then
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26187$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26188            BOOT_JDK_FOUND=no
26189          else
26190            # We're done! :-)
26191            BOOT_JDK_FOUND=yes
26192
26193  # Only process if variable expands to non-empty
26194
26195  if test "x$BOOT_JDK" != x; then
26196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  path="$BOOT_JDK"
26201  new_path=`$CYGPATH -u "$path"`
26202
26203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26206  # "foo.exe" is OK but "foo" is an error.
26207  #
26208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26209  # It is also a way to make sure we got the proper file name for the real test later on.
26210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26211  if test "x$test_shortpath" = x; then
26212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26215  fi
26216
26217  # Call helper function which possibly converts this using DOS-style short mode.
26218  # If so, the updated path is stored in $new_path.
26219
26220  input_path="$new_path"
26221  # Check if we need to convert this using DOS-style short mode. If the path
26222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26223  # take no chances and rewrite it.
26224  # Note: m4 eats our [], so we need to use [ and ] instead.
26225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26226  if test "x$has_forbidden_chars" != x; then
26227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26231      # Going to short mode and back again did indeed matter. Since short mode is
26232      # case insensitive, let's make it lowercase to improve readability.
26233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234      # Now convert it back to Unix-style (cygpath)
26235      input_path=`$CYGPATH -u "$shortmode_path"`
26236      new_path="$input_path"
26237    fi
26238  fi
26239
26240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26241  if test "x$test_cygdrive_prefix" = x; then
26242    # As a simple fix, exclude /usr/bin since it's not a real path.
26243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26245      # a path prefixed by /cygdrive for fixpath to work.
26246      new_path="$CYGWIN_ROOT_PATH$input_path"
26247    fi
26248  fi
26249
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258
26259  path="$BOOT_JDK"
26260  has_colon=`$ECHO $path | $GREP ^.:`
26261  new_path="$path"
26262  if test "x$has_colon" = x; then
26263    # Not in mixed or Windows style, start by that.
26264    new_path=`cmd //c echo $path`
26265  fi
26266
26267
26268  input_path="$new_path"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277  fi
26278
26279
26280  windows_path="$new_path"
26281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26282    unix_path=`$CYGPATH -u "$windows_path"`
26283    new_path="$unix_path"
26284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26286    new_path="$unix_path"
26287  fi
26288
26289  if test "x$path" != "x$new_path"; then
26290    BOOT_JDK="$new_path"
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26293  fi
26294
26295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26297
26298    else
26299      # We're on a unix platform. Hooray! :)
26300      path="$BOOT_JDK"
26301      has_space=`$ECHO "$path" | $GREP " "`
26302      if test "x$has_space" != x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26306      fi
26307
26308      # Use eval to expand a potential ~
26309      eval path="$path"
26310      if test ! -f "$path" && test ! -d "$path"; then
26311        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26312      fi
26313
26314      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26315    fi
26316  fi
26317
26318            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26319$as_echo_n "checking for Boot JDK... " >&6; }
26320            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26321$as_echo "$BOOT_JDK" >&6; }
26322            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26323$as_echo_n "checking Boot JDK version... " >&6; }
26324            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26326$as_echo "$BOOT_JDK_VERSION" >&6; }
26327          fi # end check jdk version
26328        fi # end check javac
26329      fi # end check java
26330    fi # end check boot jdk found
26331  fi
26332
26333    done
26334  fi
26335
26336  fi
26337
26338
26339    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26340    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26341      # Do we have a bin/java?
26342      if test ! -x "$BOOT_JDK/bin/java"; then
26343        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26345        BOOT_JDK_FOUND=no
26346      else
26347        # Do we have a bin/javac?
26348        if test ! -x "$BOOT_JDK/bin/javac"; then
26349          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26351          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26352$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26353          BOOT_JDK_FOUND=no
26354        else
26355          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26356          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26357
26358          # Extra M4 quote needed to protect [] in grep expression.
26359          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26360          if test "x$FOUND_CORRECT_VERSION" = x; then
26361            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26363            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26364$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26365            BOOT_JDK_FOUND=no
26366          else
26367            # We're done! :-)
26368            BOOT_JDK_FOUND=yes
26369
26370  # Only process if variable expands to non-empty
26371
26372  if test "x$BOOT_JDK" != x; then
26373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26374
26375  # Input might be given as Windows format, start by converting to
26376  # unix format.
26377  path="$BOOT_JDK"
26378  new_path=`$CYGPATH -u "$path"`
26379
26380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26383  # "foo.exe" is OK but "foo" is an error.
26384  #
26385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26386  # It is also a way to make sure we got the proper file name for the real test later on.
26387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26388  if test "x$test_shortpath" = x; then
26389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26390$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26391    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26392  fi
26393
26394  # Call helper function which possibly converts this using DOS-style short mode.
26395  # If so, the updated path is stored in $new_path.
26396
26397  input_path="$new_path"
26398  # Check if we need to convert this using DOS-style short mode. If the path
26399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26400  # take no chances and rewrite it.
26401  # Note: m4 eats our [], so we need to use [ and ] instead.
26402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26403  if test "x$has_forbidden_chars" != x; then
26404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26408      # Going to short mode and back again did indeed matter. Since short mode is
26409      # case insensitive, let's make it lowercase to improve readability.
26410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26411      # Now convert it back to Unix-style (cygpath)
26412      input_path=`$CYGPATH -u "$shortmode_path"`
26413      new_path="$input_path"
26414    fi
26415  fi
26416
26417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26418  if test "x$test_cygdrive_prefix" = x; then
26419    # As a simple fix, exclude /usr/bin since it's not a real path.
26420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26422      # a path prefixed by /cygdrive for fixpath to work.
26423      new_path="$CYGWIN_ROOT_PATH$input_path"
26424    fi
26425  fi
26426
26427
26428  if test "x$path" != "x$new_path"; then
26429    BOOT_JDK="$new_path"
26430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26431$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26432  fi
26433
26434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26435
26436  path="$BOOT_JDK"
26437  has_colon=`$ECHO $path | $GREP ^.:`
26438  new_path="$path"
26439  if test "x$has_colon" = x; then
26440    # Not in mixed or Windows style, start by that.
26441    new_path=`cmd //c echo $path`
26442  fi
26443
26444
26445  input_path="$new_path"
26446  # Check if we need to convert this using DOS-style short mode. If the path
26447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26448  # take no chances and rewrite it.
26449  # Note: m4 eats our [], so we need to use [ and ] instead.
26450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26451  if test "x$has_forbidden_chars" != x; then
26452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26454  fi
26455
26456
26457  windows_path="$new_path"
26458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26459    unix_path=`$CYGPATH -u "$windows_path"`
26460    new_path="$unix_path"
26461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26463    new_path="$unix_path"
26464  fi
26465
26466  if test "x$path" != "x$new_path"; then
26467    BOOT_JDK="$new_path"
26468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26469$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26470  fi
26471
26472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26474
26475    else
26476      # We're on a unix platform. Hooray! :)
26477      path="$BOOT_JDK"
26478      has_space=`$ECHO "$path" | $GREP " "`
26479      if test "x$has_space" != x; then
26480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26482        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26483      fi
26484
26485      # Use eval to expand a potential ~
26486      eval path="$path"
26487      if test ! -f "$path" && test ! -d "$path"; then
26488        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26489      fi
26490
26491      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26492    fi
26493  fi
26494
26495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26496$as_echo_n "checking for Boot JDK... " >&6; }
26497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26498$as_echo "$BOOT_JDK" >&6; }
26499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26500$as_echo_n "checking Boot JDK version... " >&6; }
26501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26503$as_echo "$BOOT_JDK_VERSION" >&6; }
26504          fi # end check jdk version
26505        fi # end check javac
26506      fi # end check java
26507    fi # end check boot jdk found
26508  fi
26509
26510
26511  if test "x$BOOT_JDK_FOUND" = xno; then
26512    # Now execute the test
26513
26514  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
26515  BOOT_JDK_SUFFIX=""
26516  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26517  if test "x$ALL_JDKS_FOUND" != x; then
26518    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26519
26520  if test "x$BOOT_JDK_FOUND" = xno; then
26521    # Now execute the test
26522
26523        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26524        if test -d "$BOOT_JDK"; then
26525          BOOT_JDK_FOUND=maybe
26526          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26527$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26528        fi
26529
26530
26531    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26532    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26533      # Do we have a bin/java?
26534      if test ! -x "$BOOT_JDK/bin/java"; then
26535        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26537        BOOT_JDK_FOUND=no
26538      else
26539        # Do we have a bin/javac?
26540        if test ! -x "$BOOT_JDK/bin/javac"; then
26541          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26543          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26544$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26545          BOOT_JDK_FOUND=no
26546        else
26547          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26548          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26549
26550          # Extra M4 quote needed to protect [] in grep expression.
26551          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26552          if test "x$FOUND_CORRECT_VERSION" = x; then
26553            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26555            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26556$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26557            BOOT_JDK_FOUND=no
26558          else
26559            # We're done! :-)
26560            BOOT_JDK_FOUND=yes
26561
26562  # Only process if variable expands to non-empty
26563
26564  if test "x$BOOT_JDK" != x; then
26565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26566
26567  # Input might be given as Windows format, start by converting to
26568  # unix format.
26569  path="$BOOT_JDK"
26570  new_path=`$CYGPATH -u "$path"`
26571
26572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26575  # "foo.exe" is OK but "foo" is an error.
26576  #
26577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26578  # It is also a way to make sure we got the proper file name for the real test later on.
26579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26580  if test "x$test_shortpath" = x; then
26581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26584  fi
26585
26586  # Call helper function which possibly converts this using DOS-style short mode.
26587  # If so, the updated path is stored in $new_path.
26588
26589  input_path="$new_path"
26590  # Check if we need to convert this using DOS-style short mode. If the path
26591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26592  # take no chances and rewrite it.
26593  # Note: m4 eats our [], so we need to use [ and ] instead.
26594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26595  if test "x$has_forbidden_chars" != x; then
26596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26600      # Going to short mode and back again did indeed matter. Since short mode is
26601      # case insensitive, let's make it lowercase to improve readability.
26602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26603      # Now convert it back to Unix-style (cygpath)
26604      input_path=`$CYGPATH -u "$shortmode_path"`
26605      new_path="$input_path"
26606    fi
26607  fi
26608
26609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26610  if test "x$test_cygdrive_prefix" = x; then
26611    # As a simple fix, exclude /usr/bin since it's not a real path.
26612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26614      # a path prefixed by /cygdrive for fixpath to work.
26615      new_path="$CYGWIN_ROOT_PATH$input_path"
26616    fi
26617  fi
26618
26619
26620  if test "x$path" != "x$new_path"; then
26621    BOOT_JDK="$new_path"
26622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26624  fi
26625
26626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26627
26628  path="$BOOT_JDK"
26629  has_colon=`$ECHO $path | $GREP ^.:`
26630  new_path="$path"
26631  if test "x$has_colon" = x; then
26632    # Not in mixed or Windows style, start by that.
26633    new_path=`cmd //c echo $path`
26634  fi
26635
26636
26637  input_path="$new_path"
26638  # Check if we need to convert this using DOS-style short mode. If the path
26639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26640  # take no chances and rewrite it.
26641  # Note: m4 eats our [], so we need to use [ and ] instead.
26642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26643  if test "x$has_forbidden_chars" != x; then
26644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26646  fi
26647
26648
26649  windows_path="$new_path"
26650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26651    unix_path=`$CYGPATH -u "$windows_path"`
26652    new_path="$unix_path"
26653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26655    new_path="$unix_path"
26656  fi
26657
26658  if test "x$path" != "x$new_path"; then
26659    BOOT_JDK="$new_path"
26660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26662  fi
26663
26664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26666
26667    else
26668      # We're on a unix platform. Hooray! :)
26669      path="$BOOT_JDK"
26670      has_space=`$ECHO "$path" | $GREP " "`
26671      if test "x$has_space" != x; then
26672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26675      fi
26676
26677      # Use eval to expand a potential ~
26678      eval path="$path"
26679      if test ! -f "$path" && test ! -d "$path"; then
26680        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26681      fi
26682
26683      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26684    fi
26685  fi
26686
26687            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26688$as_echo_n "checking for Boot JDK... " >&6; }
26689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26690$as_echo "$BOOT_JDK" >&6; }
26691            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26692$as_echo_n "checking Boot JDK version... " >&6; }
26693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26695$as_echo "$BOOT_JDK_VERSION" >&6; }
26696          fi # end check jdk version
26697        fi # end check javac
26698      fi # end check java
26699    fi # end check boot jdk found
26700  fi
26701
26702    done
26703  fi
26704
26705
26706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26708      # Do we have a bin/java?
26709      if test ! -x "$BOOT_JDK/bin/java"; then
26710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26712        BOOT_JDK_FOUND=no
26713      else
26714        # Do we have a bin/javac?
26715        if test ! -x "$BOOT_JDK/bin/javac"; then
26716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26720          BOOT_JDK_FOUND=no
26721        else
26722          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26723          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26724
26725          # Extra M4 quote needed to protect [] in grep expression.
26726          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26727          if test "x$FOUND_CORRECT_VERSION" = x; then
26728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26730            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26732            BOOT_JDK_FOUND=no
26733          else
26734            # We're done! :-)
26735            BOOT_JDK_FOUND=yes
26736
26737  # Only process if variable expands to non-empty
26738
26739  if test "x$BOOT_JDK" != x; then
26740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26741
26742  # Input might be given as Windows format, start by converting to
26743  # unix format.
26744  path="$BOOT_JDK"
26745  new_path=`$CYGPATH -u "$path"`
26746
26747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26750  # "foo.exe" is OK but "foo" is an error.
26751  #
26752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26753  # It is also a way to make sure we got the proper file name for the real test later on.
26754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26755  if test "x$test_shortpath" = x; then
26756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26759  fi
26760
26761  # Call helper function which possibly converts this using DOS-style short mode.
26762  # If so, the updated path is stored in $new_path.
26763
26764  input_path="$new_path"
26765  # Check if we need to convert this using DOS-style short mode. If the path
26766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26767  # take no chances and rewrite it.
26768  # Note: m4 eats our [], so we need to use [ and ] instead.
26769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26770  if test "x$has_forbidden_chars" != x; then
26771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26775      # Going to short mode and back again did indeed matter. Since short mode is
26776      # case insensitive, let's make it lowercase to improve readability.
26777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26778      # Now convert it back to Unix-style (cygpath)
26779      input_path=`$CYGPATH -u "$shortmode_path"`
26780      new_path="$input_path"
26781    fi
26782  fi
26783
26784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26785  if test "x$test_cygdrive_prefix" = x; then
26786    # As a simple fix, exclude /usr/bin since it's not a real path.
26787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26789      # a path prefixed by /cygdrive for fixpath to work.
26790      new_path="$CYGWIN_ROOT_PATH$input_path"
26791    fi
26792  fi
26793
26794
26795  if test "x$path" != "x$new_path"; then
26796    BOOT_JDK="$new_path"
26797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26799  fi
26800
26801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26802
26803  path="$BOOT_JDK"
26804  has_colon=`$ECHO $path | $GREP ^.:`
26805  new_path="$path"
26806  if test "x$has_colon" = x; then
26807    # Not in mixed or Windows style, start by that.
26808    new_path=`cmd //c echo $path`
26809  fi
26810
26811
26812  input_path="$new_path"
26813  # Check if we need to convert this using DOS-style short mode. If the path
26814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26815  # take no chances and rewrite it.
26816  # Note: m4 eats our [], so we need to use [ and ] instead.
26817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26818  if test "x$has_forbidden_chars" != x; then
26819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26821  fi
26822
26823
26824  windows_path="$new_path"
26825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26826    unix_path=`$CYGPATH -u "$windows_path"`
26827    new_path="$unix_path"
26828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26830    new_path="$unix_path"
26831  fi
26832
26833  if test "x$path" != "x$new_path"; then
26834    BOOT_JDK="$new_path"
26835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26837  fi
26838
26839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26841
26842    else
26843      # We're on a unix platform. Hooray! :)
26844      path="$BOOT_JDK"
26845      has_space=`$ECHO "$path" | $GREP " "`
26846      if test "x$has_space" != x; then
26847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26850      fi
26851
26852      # Use eval to expand a potential ~
26853      eval path="$path"
26854      if test ! -f "$path" && test ! -d "$path"; then
26855        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26856      fi
26857
26858      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26859    fi
26860  fi
26861
26862            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26863$as_echo_n "checking for Boot JDK... " >&6; }
26864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26865$as_echo "$BOOT_JDK" >&6; }
26866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26867$as_echo_n "checking Boot JDK version... " >&6; }
26868            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26870$as_echo "$BOOT_JDK_VERSION" >&6; }
26871          fi # end check jdk version
26872        fi # end check javac
26873      fi # end check java
26874    fi # end check boot jdk found
26875  fi
26876
26877  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
26878
26879  if test "x$BOOT_JDK_FOUND" = xno; then
26880    # Now execute the test
26881
26882  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
26883  BOOT_JDK_SUFFIX="/Contents/Home"
26884  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26885  if test "x$ALL_JDKS_FOUND" != x; then
26886    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26887
26888  if test "x$BOOT_JDK_FOUND" = xno; then
26889    # Now execute the test
26890
26891        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26892        if test -d "$BOOT_JDK"; then
26893          BOOT_JDK_FOUND=maybe
26894          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26895$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26896        fi
26897
26898
26899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26901      # Do we have a bin/java?
26902      if test ! -x "$BOOT_JDK/bin/java"; then
26903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26905        BOOT_JDK_FOUND=no
26906      else
26907        # Do we have a bin/javac?
26908        if test ! -x "$BOOT_JDK/bin/javac"; then
26909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26913          BOOT_JDK_FOUND=no
26914        else
26915          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26916          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26917
26918          # Extra M4 quote needed to protect [] in grep expression.
26919          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
26920          if test "x$FOUND_CORRECT_VERSION" = x; then
26921            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26923            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26924$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26925            BOOT_JDK_FOUND=no
26926          else
26927            # We're done! :-)
26928            BOOT_JDK_FOUND=yes
26929
26930  # Only process if variable expands to non-empty
26931
26932  if test "x$BOOT_JDK" != x; then
26933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26934
26935  # Input might be given as Windows format, start by converting to
26936  # unix format.
26937  path="$BOOT_JDK"
26938  new_path=`$CYGPATH -u "$path"`
26939
26940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26943  # "foo.exe" is OK but "foo" is an error.
26944  #
26945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26946  # It is also a way to make sure we got the proper file name for the real test later on.
26947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26948  if test "x$test_shortpath" = x; then
26949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26951    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26952  fi
26953
26954  # Call helper function which possibly converts this using DOS-style short mode.
26955  # If so, the updated path is stored in $new_path.
26956
26957  input_path="$new_path"
26958  # Check if we need to convert this using DOS-style short mode. If the path
26959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26960  # take no chances and rewrite it.
26961  # Note: m4 eats our [], so we need to use [ and ] instead.
26962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26963  if test "x$has_forbidden_chars" != x; then
26964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26968      # Going to short mode and back again did indeed matter. Since short mode is
26969      # case insensitive, let's make it lowercase to improve readability.
26970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26971      # Now convert it back to Unix-style (cygpath)
26972      input_path=`$CYGPATH -u "$shortmode_path"`
26973      new_path="$input_path"
26974    fi
26975  fi
26976
26977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26978  if test "x$test_cygdrive_prefix" = x; then
26979    # As a simple fix, exclude /usr/bin since it's not a real path.
26980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26982      # a path prefixed by /cygdrive for fixpath to work.
26983      new_path="$CYGWIN_ROOT_PATH$input_path"
26984    fi
26985  fi
26986
26987
26988  if test "x$path" != "x$new_path"; then
26989    BOOT_JDK="$new_path"
26990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26992  fi
26993
26994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26995
26996  path="$BOOT_JDK"
26997  has_colon=`$ECHO $path | $GREP ^.:`
26998  new_path="$path"
26999  if test "x$has_colon" = x; then
27000    # Not in mixed or Windows style, start by that.
27001    new_path=`cmd //c echo $path`
27002  fi
27003
27004
27005  input_path="$new_path"
27006  # Check if we need to convert this using DOS-style short mode. If the path
27007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27008  # take no chances and rewrite it.
27009  # Note: m4 eats our [], so we need to use [ and ] instead.
27010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27011  if test "x$has_forbidden_chars" != x; then
27012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27014  fi
27015
27016
27017  windows_path="$new_path"
27018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27019    unix_path=`$CYGPATH -u "$windows_path"`
27020    new_path="$unix_path"
27021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27023    new_path="$unix_path"
27024  fi
27025
27026  if test "x$path" != "x$new_path"; then
27027    BOOT_JDK="$new_path"
27028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27030  fi
27031
27032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27034
27035    else
27036      # We're on a unix platform. Hooray! :)
27037      path="$BOOT_JDK"
27038      has_space=`$ECHO "$path" | $GREP " "`
27039      if test "x$has_space" != x; then
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27043      fi
27044
27045      # Use eval to expand a potential ~
27046      eval path="$path"
27047      if test ! -f "$path" && test ! -d "$path"; then
27048        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27049      fi
27050
27051      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27052    fi
27053  fi
27054
27055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27056$as_echo_n "checking for Boot JDK... " >&6; }
27057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27058$as_echo "$BOOT_JDK" >&6; }
27059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27060$as_echo_n "checking Boot JDK version... " >&6; }
27061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27063$as_echo "$BOOT_JDK_VERSION" >&6; }
27064          fi # end check jdk version
27065        fi # end check javac
27066      fi # end check java
27067    fi # end check boot jdk found
27068  fi
27069
27070    done
27071  fi
27072
27073
27074    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27075    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27076      # Do we have a bin/java?
27077      if test ! -x "$BOOT_JDK/bin/java"; then
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27080        BOOT_JDK_FOUND=no
27081      else
27082        # Do we have a bin/javac?
27083        if test ! -x "$BOOT_JDK/bin/javac"; then
27084          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27086          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27087$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27088          BOOT_JDK_FOUND=no
27089        else
27090          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27091          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27092
27093          # Extra M4 quote needed to protect [] in grep expression.
27094          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27095          if test "x$FOUND_CORRECT_VERSION" = x; then
27096            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27098            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27099$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27100            BOOT_JDK_FOUND=no
27101          else
27102            # We're done! :-)
27103            BOOT_JDK_FOUND=yes
27104
27105  # Only process if variable expands to non-empty
27106
27107  if test "x$BOOT_JDK" != x; then
27108    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27109
27110  # Input might be given as Windows format, start by converting to
27111  # unix format.
27112  path="$BOOT_JDK"
27113  new_path=`$CYGPATH -u "$path"`
27114
27115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27118  # "foo.exe" is OK but "foo" is an error.
27119  #
27120  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27121  # It is also a way to make sure we got the proper file name for the real test later on.
27122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27123  if test "x$test_shortpath" = x; then
27124    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27126    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27127  fi
27128
27129  # Call helper function which possibly converts this using DOS-style short mode.
27130  # If so, the updated path is stored in $new_path.
27131
27132  input_path="$new_path"
27133  # Check if we need to convert this using DOS-style short mode. If the path
27134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27135  # take no chances and rewrite it.
27136  # Note: m4 eats our [], so we need to use [ and ] instead.
27137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27138  if test "x$has_forbidden_chars" != x; then
27139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27140    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27141    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27142    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27143      # Going to short mode and back again did indeed matter. Since short mode is
27144      # case insensitive, let's make it lowercase to improve readability.
27145      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27146      # Now convert it back to Unix-style (cygpath)
27147      input_path=`$CYGPATH -u "$shortmode_path"`
27148      new_path="$input_path"
27149    fi
27150  fi
27151
27152  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27153  if test "x$test_cygdrive_prefix" = x; then
27154    # As a simple fix, exclude /usr/bin since it's not a real path.
27155    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27156      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27157      # a path prefixed by /cygdrive for fixpath to work.
27158      new_path="$CYGWIN_ROOT_PATH$input_path"
27159    fi
27160  fi
27161
27162
27163  if test "x$path" != "x$new_path"; then
27164    BOOT_JDK="$new_path"
27165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27167  fi
27168
27169    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27170
27171  path="$BOOT_JDK"
27172  has_colon=`$ECHO $path | $GREP ^.:`
27173  new_path="$path"
27174  if test "x$has_colon" = x; then
27175    # Not in mixed or Windows style, start by that.
27176    new_path=`cmd //c echo $path`
27177  fi
27178
27179
27180  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27189  fi
27190
27191
27192  windows_path="$new_path"
27193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27194    unix_path=`$CYGPATH -u "$windows_path"`
27195    new_path="$unix_path"
27196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27198    new_path="$unix_path"
27199  fi
27200
27201  if test "x$path" != "x$new_path"; then
27202    BOOT_JDK="$new_path"
27203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27204$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27205  fi
27206
27207  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27208  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27209
27210    else
27211      # We're on a unix platform. Hooray! :)
27212      path="$BOOT_JDK"
27213      has_space=`$ECHO "$path" | $GREP " "`
27214      if test "x$has_space" != x; then
27215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27217        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27218      fi
27219
27220      # Use eval to expand a potential ~
27221      eval path="$path"
27222      if test ! -f "$path" && test ! -d "$path"; then
27223        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27224      fi
27225
27226      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27227    fi
27228  fi
27229
27230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27231$as_echo_n "checking for Boot JDK... " >&6; }
27232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27233$as_echo "$BOOT_JDK" >&6; }
27234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27235$as_echo_n "checking Boot JDK version... " >&6; }
27236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27238$as_echo "$BOOT_JDK_VERSION" >&6; }
27239          fi # end check jdk version
27240        fi # end check javac
27241      fi # end check java
27242    fi # end check boot jdk found
27243  fi
27244
27245
27246  if test "x$BOOT_JDK_FOUND" = xno; then
27247    # Now execute the test
27248
27249  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27250  BOOT_JDK_SUFFIX="/Contents/Home"
27251  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27252  if test "x$ALL_JDKS_FOUND" != x; then
27253    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27254
27255  if test "x$BOOT_JDK_FOUND" = xno; then
27256    # Now execute the test
27257
27258        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27259        if test -d "$BOOT_JDK"; then
27260          BOOT_JDK_FOUND=maybe
27261          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27262$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27263        fi
27264
27265
27266    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27267    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27268      # Do we have a bin/java?
27269      if test ! -x "$BOOT_JDK/bin/java"; then
27270        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27272        BOOT_JDK_FOUND=no
27273      else
27274        # Do we have a bin/javac?
27275        if test ! -x "$BOOT_JDK/bin/javac"; then
27276          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27278          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27279$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27280          BOOT_JDK_FOUND=no
27281        else
27282          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27283          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27284
27285          # Extra M4 quote needed to protect [] in grep expression.
27286          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27287          if test "x$FOUND_CORRECT_VERSION" = x; then
27288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27290            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27291$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27292            BOOT_JDK_FOUND=no
27293          else
27294            # We're done! :-)
27295            BOOT_JDK_FOUND=yes
27296
27297  # Only process if variable expands to non-empty
27298
27299  if test "x$BOOT_JDK" != x; then
27300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27301
27302  # Input might be given as Windows format, start by converting to
27303  # unix format.
27304  path="$BOOT_JDK"
27305  new_path=`$CYGPATH -u "$path"`
27306
27307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27310  # "foo.exe" is OK but "foo" is an error.
27311  #
27312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27313  # It is also a way to make sure we got the proper file name for the real test later on.
27314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27315  if test "x$test_shortpath" = x; then
27316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27317$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27318    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27319  fi
27320
27321  # Call helper function which possibly converts this using DOS-style short mode.
27322  # If so, the updated path is stored in $new_path.
27323
27324  input_path="$new_path"
27325  # Check if we need to convert this using DOS-style short mode. If the path
27326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27327  # take no chances and rewrite it.
27328  # Note: m4 eats our [], so we need to use [ and ] instead.
27329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27330  if test "x$has_forbidden_chars" != x; then
27331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27335      # Going to short mode and back again did indeed matter. Since short mode is
27336      # case insensitive, let's make it lowercase to improve readability.
27337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27338      # Now convert it back to Unix-style (cygpath)
27339      input_path=`$CYGPATH -u "$shortmode_path"`
27340      new_path="$input_path"
27341    fi
27342  fi
27343
27344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27345  if test "x$test_cygdrive_prefix" = x; then
27346    # As a simple fix, exclude /usr/bin since it's not a real path.
27347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27349      # a path prefixed by /cygdrive for fixpath to work.
27350      new_path="$CYGWIN_ROOT_PATH$input_path"
27351    fi
27352  fi
27353
27354
27355  if test "x$path" != "x$new_path"; then
27356    BOOT_JDK="$new_path"
27357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27359  fi
27360
27361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27362
27363  path="$BOOT_JDK"
27364  has_colon=`$ECHO $path | $GREP ^.:`
27365  new_path="$path"
27366  if test "x$has_colon" = x; then
27367    # Not in mixed or Windows style, start by that.
27368    new_path=`cmd //c echo $path`
27369  fi
27370
27371
27372  input_path="$new_path"
27373  # Check if we need to convert this using DOS-style short mode. If the path
27374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27375  # take no chances and rewrite it.
27376  # Note: m4 eats our [], so we need to use [ and ] instead.
27377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27378  if test "x$has_forbidden_chars" != x; then
27379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27381  fi
27382
27383
27384  windows_path="$new_path"
27385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27386    unix_path=`$CYGPATH -u "$windows_path"`
27387    new_path="$unix_path"
27388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27390    new_path="$unix_path"
27391  fi
27392
27393  if test "x$path" != "x$new_path"; then
27394    BOOT_JDK="$new_path"
27395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27397  fi
27398
27399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27401
27402    else
27403      # We're on a unix platform. Hooray! :)
27404      path="$BOOT_JDK"
27405      has_space=`$ECHO "$path" | $GREP " "`
27406      if test "x$has_space" != x; then
27407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27410      fi
27411
27412      # Use eval to expand a potential ~
27413      eval path="$path"
27414      if test ! -f "$path" && test ! -d "$path"; then
27415        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27416      fi
27417
27418      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27419    fi
27420  fi
27421
27422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27423$as_echo_n "checking for Boot JDK... " >&6; }
27424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27425$as_echo "$BOOT_JDK" >&6; }
27426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27427$as_echo_n "checking Boot JDK version... " >&6; }
27428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27430$as_echo "$BOOT_JDK_VERSION" >&6; }
27431          fi # end check jdk version
27432        fi # end check javac
27433      fi # end check java
27434    fi # end check boot jdk found
27435  fi
27436
27437    done
27438  fi
27439
27440
27441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27443      # Do we have a bin/java?
27444      if test ! -x "$BOOT_JDK/bin/java"; then
27445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27447        BOOT_JDK_FOUND=no
27448      else
27449        # Do we have a bin/javac?
27450        if test ! -x "$BOOT_JDK/bin/javac"; then
27451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27455          BOOT_JDK_FOUND=no
27456        else
27457          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27458          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27459
27460          # Extra M4 quote needed to protect [] in grep expression.
27461          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27462          if test "x$FOUND_CORRECT_VERSION" = x; then
27463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27465            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27466$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27467            BOOT_JDK_FOUND=no
27468          else
27469            # We're done! :-)
27470            BOOT_JDK_FOUND=yes
27471
27472  # Only process if variable expands to non-empty
27473
27474  if test "x$BOOT_JDK" != x; then
27475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27476
27477  # Input might be given as Windows format, start by converting to
27478  # unix format.
27479  path="$BOOT_JDK"
27480  new_path=`$CYGPATH -u "$path"`
27481
27482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27485  # "foo.exe" is OK but "foo" is an error.
27486  #
27487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27488  # It is also a way to make sure we got the proper file name for the real test later on.
27489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27490  if test "x$test_shortpath" = x; then
27491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27493    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27494  fi
27495
27496  # Call helper function which possibly converts this using DOS-style short mode.
27497  # If so, the updated path is stored in $new_path.
27498
27499  input_path="$new_path"
27500  # Check if we need to convert this using DOS-style short mode. If the path
27501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27502  # take no chances and rewrite it.
27503  # Note: m4 eats our [], so we need to use [ and ] instead.
27504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27505  if test "x$has_forbidden_chars" != x; then
27506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27510      # Going to short mode and back again did indeed matter. Since short mode is
27511      # case insensitive, let's make it lowercase to improve readability.
27512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27513      # Now convert it back to Unix-style (cygpath)
27514      input_path=`$CYGPATH -u "$shortmode_path"`
27515      new_path="$input_path"
27516    fi
27517  fi
27518
27519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27520  if test "x$test_cygdrive_prefix" = x; then
27521    # As a simple fix, exclude /usr/bin since it's not a real path.
27522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27524      # a path prefixed by /cygdrive for fixpath to work.
27525      new_path="$CYGWIN_ROOT_PATH$input_path"
27526    fi
27527  fi
27528
27529
27530  if test "x$path" != "x$new_path"; then
27531    BOOT_JDK="$new_path"
27532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27534  fi
27535
27536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27537
27538  path="$BOOT_JDK"
27539  has_colon=`$ECHO $path | $GREP ^.:`
27540  new_path="$path"
27541  if test "x$has_colon" = x; then
27542    # Not in mixed or Windows style, start by that.
27543    new_path=`cmd //c echo $path`
27544  fi
27545
27546
27547  input_path="$new_path"
27548  # Check if we need to convert this using DOS-style short mode. If the path
27549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27550  # take no chances and rewrite it.
27551  # Note: m4 eats our [], so we need to use [ and ] instead.
27552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27553  if test "x$has_forbidden_chars" != x; then
27554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27556  fi
27557
27558
27559  windows_path="$new_path"
27560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27561    unix_path=`$CYGPATH -u "$windows_path"`
27562    new_path="$unix_path"
27563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27565    new_path="$unix_path"
27566  fi
27567
27568  if test "x$path" != "x$new_path"; then
27569    BOOT_JDK="$new_path"
27570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27572  fi
27573
27574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27576
27577    else
27578      # We're on a unix platform. Hooray! :)
27579      path="$BOOT_JDK"
27580      has_space=`$ECHO "$path" | $GREP " "`
27581      if test "x$has_space" != x; then
27582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27585      fi
27586
27587      # Use eval to expand a potential ~
27588      eval path="$path"
27589      if test ! -f "$path" && test ! -d "$path"; then
27590        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27591      fi
27592
27593      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27594    fi
27595  fi
27596
27597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27598$as_echo_n "checking for Boot JDK... " >&6; }
27599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27600$as_echo "$BOOT_JDK" >&6; }
27601            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27602$as_echo_n "checking Boot JDK version... " >&6; }
27603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27605$as_echo "$BOOT_JDK_VERSION" >&6; }
27606          fi # end check jdk version
27607        fi # end check javac
27608      fi # end check java
27609    fi # end check boot jdk found
27610  fi
27611
27612  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
27613
27614  if test "x$BOOT_JDK_FOUND" = xno; then
27615    # Now execute the test
27616
27617  BOOT_JDK_PREFIX="/usr/lib/jvm"
27618  BOOT_JDK_SUFFIX=""
27619  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27620  if test "x$ALL_JDKS_FOUND" != x; then
27621    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27622
27623  if test "x$BOOT_JDK_FOUND" = xno; then
27624    # Now execute the test
27625
27626        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27627        if test -d "$BOOT_JDK"; then
27628          BOOT_JDK_FOUND=maybe
27629          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27630$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27631        fi
27632
27633
27634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27636      # Do we have a bin/java?
27637      if test ! -x "$BOOT_JDK/bin/java"; then
27638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27640        BOOT_JDK_FOUND=no
27641      else
27642        # Do we have a bin/javac?
27643        if test ! -x "$BOOT_JDK/bin/javac"; then
27644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27648          BOOT_JDK_FOUND=no
27649        else
27650          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27651          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27652
27653          # Extra M4 quote needed to protect [] in grep expression.
27654          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27655          if test "x$FOUND_CORRECT_VERSION" = x; then
27656            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27658            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27659$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27660            BOOT_JDK_FOUND=no
27661          else
27662            # We're done! :-)
27663            BOOT_JDK_FOUND=yes
27664
27665  # Only process if variable expands to non-empty
27666
27667  if test "x$BOOT_JDK" != x; then
27668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27669
27670  # Input might be given as Windows format, start by converting to
27671  # unix format.
27672  path="$BOOT_JDK"
27673  new_path=`$CYGPATH -u "$path"`
27674
27675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27678  # "foo.exe" is OK but "foo" is an error.
27679  #
27680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27681  # It is also a way to make sure we got the proper file name for the real test later on.
27682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27683  if test "x$test_shortpath" = x; then
27684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27686    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27687  fi
27688
27689  # Call helper function which possibly converts this using DOS-style short mode.
27690  # If so, the updated path is stored in $new_path.
27691
27692  input_path="$new_path"
27693  # Check if we need to convert this using DOS-style short mode. If the path
27694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27695  # take no chances and rewrite it.
27696  # Note: m4 eats our [], so we need to use [ and ] instead.
27697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27698  if test "x$has_forbidden_chars" != x; then
27699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27703      # Going to short mode and back again did indeed matter. Since short mode is
27704      # case insensitive, let's make it lowercase to improve readability.
27705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27706      # Now convert it back to Unix-style (cygpath)
27707      input_path=`$CYGPATH -u "$shortmode_path"`
27708      new_path="$input_path"
27709    fi
27710  fi
27711
27712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27713  if test "x$test_cygdrive_prefix" = x; then
27714    # As a simple fix, exclude /usr/bin since it's not a real path.
27715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27717      # a path prefixed by /cygdrive for fixpath to work.
27718      new_path="$CYGWIN_ROOT_PATH$input_path"
27719    fi
27720  fi
27721
27722
27723  if test "x$path" != "x$new_path"; then
27724    BOOT_JDK="$new_path"
27725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27727  fi
27728
27729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730
27731  path="$BOOT_JDK"
27732  has_colon=`$ECHO $path | $GREP ^.:`
27733  new_path="$path"
27734  if test "x$has_colon" = x; then
27735    # Not in mixed or Windows style, start by that.
27736    new_path=`cmd //c echo $path`
27737  fi
27738
27739
27740  input_path="$new_path"
27741  # Check if we need to convert this using DOS-style short mode. If the path
27742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27743  # take no chances and rewrite it.
27744  # Note: m4 eats our [], so we need to use [ and ] instead.
27745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27746  if test "x$has_forbidden_chars" != x; then
27747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27749  fi
27750
27751
27752  windows_path="$new_path"
27753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27754    unix_path=`$CYGPATH -u "$windows_path"`
27755    new_path="$unix_path"
27756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27758    new_path="$unix_path"
27759  fi
27760
27761  if test "x$path" != "x$new_path"; then
27762    BOOT_JDK="$new_path"
27763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27765  fi
27766
27767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27769
27770    else
27771      # We're on a unix platform. Hooray! :)
27772      path="$BOOT_JDK"
27773      has_space=`$ECHO "$path" | $GREP " "`
27774      if test "x$has_space" != x; then
27775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27778      fi
27779
27780      # Use eval to expand a potential ~
27781      eval path="$path"
27782      if test ! -f "$path" && test ! -d "$path"; then
27783        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27784      fi
27785
27786      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27787    fi
27788  fi
27789
27790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27791$as_echo_n "checking for Boot JDK... " >&6; }
27792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27793$as_echo "$BOOT_JDK" >&6; }
27794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27795$as_echo_n "checking Boot JDK version... " >&6; }
27796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27798$as_echo "$BOOT_JDK_VERSION" >&6; }
27799          fi # end check jdk version
27800        fi # end check javac
27801      fi # end check java
27802    fi # end check boot jdk found
27803  fi
27804
27805    done
27806  fi
27807
27808
27809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27811      # Do we have a bin/java?
27812      if test ! -x "$BOOT_JDK/bin/java"; then
27813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27815        BOOT_JDK_FOUND=no
27816      else
27817        # Do we have a bin/javac?
27818        if test ! -x "$BOOT_JDK/bin/javac"; then
27819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27823          BOOT_JDK_FOUND=no
27824        else
27825          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27826          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27827
27828          # Extra M4 quote needed to protect [] in grep expression.
27829          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
27830          if test "x$FOUND_CORRECT_VERSION" = x; then
27831            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27833            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27834$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27835            BOOT_JDK_FOUND=no
27836          else
27837            # We're done! :-)
27838            BOOT_JDK_FOUND=yes
27839
27840  # Only process if variable expands to non-empty
27841
27842  if test "x$BOOT_JDK" != x; then
27843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27844
27845  # Input might be given as Windows format, start by converting to
27846  # unix format.
27847  path="$BOOT_JDK"
27848  new_path=`$CYGPATH -u "$path"`
27849
27850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27853  # "foo.exe" is OK but "foo" is an error.
27854  #
27855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27856  # It is also a way to make sure we got the proper file name for the real test later on.
27857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27858  if test "x$test_shortpath" = x; then
27859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27861    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27862  fi
27863
27864  # Call helper function which possibly converts this using DOS-style short mode.
27865  # If so, the updated path is stored in $new_path.
27866
27867  input_path="$new_path"
27868  # Check if we need to convert this using DOS-style short mode. If the path
27869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27870  # take no chances and rewrite it.
27871  # Note: m4 eats our [], so we need to use [ and ] instead.
27872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27873  if test "x$has_forbidden_chars" != x; then
27874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27878      # Going to short mode and back again did indeed matter. Since short mode is
27879      # case insensitive, let's make it lowercase to improve readability.
27880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27881      # Now convert it back to Unix-style (cygpath)
27882      input_path=`$CYGPATH -u "$shortmode_path"`
27883      new_path="$input_path"
27884    fi
27885  fi
27886
27887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27888  if test "x$test_cygdrive_prefix" = x; then
27889    # As a simple fix, exclude /usr/bin since it's not a real path.
27890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27892      # a path prefixed by /cygdrive for fixpath to work.
27893      new_path="$CYGWIN_ROOT_PATH$input_path"
27894    fi
27895  fi
27896
27897
27898  if test "x$path" != "x$new_path"; then
27899    BOOT_JDK="$new_path"
27900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27901$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27902  fi
27903
27904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27905
27906  path="$BOOT_JDK"
27907  has_colon=`$ECHO $path | $GREP ^.:`
27908  new_path="$path"
27909  if test "x$has_colon" = x; then
27910    # Not in mixed or Windows style, start by that.
27911    new_path=`cmd //c echo $path`
27912  fi
27913
27914
27915  input_path="$new_path"
27916  # Check if we need to convert this using DOS-style short mode. If the path
27917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27918  # take no chances and rewrite it.
27919  # Note: m4 eats our [], so we need to use [ and ] instead.
27920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27921  if test "x$has_forbidden_chars" != x; then
27922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27924  fi
27925
27926
27927  windows_path="$new_path"
27928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27929    unix_path=`$CYGPATH -u "$windows_path"`
27930    new_path="$unix_path"
27931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27933    new_path="$unix_path"
27934  fi
27935
27936  if test "x$path" != "x$new_path"; then
27937    BOOT_JDK="$new_path"
27938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27940  fi
27941
27942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27944
27945    else
27946      # We're on a unix platform. Hooray! :)
27947      path="$BOOT_JDK"
27948      has_space=`$ECHO "$path" | $GREP " "`
27949      if test "x$has_space" != x; then
27950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27953      fi
27954
27955      # Use eval to expand a potential ~
27956      eval path="$path"
27957      if test ! -f "$path" && test ! -d "$path"; then
27958        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27959      fi
27960
27961      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27962    fi
27963  fi
27964
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27966$as_echo_n "checking for Boot JDK... " >&6; }
27967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27968$as_echo "$BOOT_JDK" >&6; }
27969            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27970$as_echo_n "checking Boot JDK version... " >&6; }
27971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27973$as_echo "$BOOT_JDK_VERSION" >&6; }
27974          fi # end check jdk version
27975        fi # end check javac
27976      fi # end check java
27977    fi # end check boot jdk found
27978  fi
27979
27980  fi
27981
27982
27983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27985      # Do we have a bin/java?
27986      if test ! -x "$BOOT_JDK/bin/java"; then
27987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27989        BOOT_JDK_FOUND=no
27990      else
27991        # Do we have a bin/javac?
27992        if test ! -x "$BOOT_JDK/bin/javac"; then
27993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27997          BOOT_JDK_FOUND=no
27998        else
27999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28001
28002          # Extra M4 quote needed to protect [] in grep expression.
28003          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
28004          if test "x$FOUND_CORRECT_VERSION" = x; then
28005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28009            BOOT_JDK_FOUND=no
28010          else
28011            # We're done! :-)
28012            BOOT_JDK_FOUND=yes
28013
28014  # Only process if variable expands to non-empty
28015
28016  if test "x$BOOT_JDK" != x; then
28017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28018
28019  # Input might be given as Windows format, start by converting to
28020  # unix format.
28021  path="$BOOT_JDK"
28022  new_path=`$CYGPATH -u "$path"`
28023
28024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28027  # "foo.exe" is OK but "foo" is an error.
28028  #
28029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28030  # It is also a way to make sure we got the proper file name for the real test later on.
28031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28032  if test "x$test_shortpath" = x; then
28033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28036  fi
28037
28038  # Call helper function which possibly converts this using DOS-style short mode.
28039  # If so, the updated path is stored in $new_path.
28040
28041  input_path="$new_path"
28042  # Check if we need to convert this using DOS-style short mode. If the path
28043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28044  # take no chances and rewrite it.
28045  # Note: m4 eats our [], so we need to use [ and ] instead.
28046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28047  if test "x$has_forbidden_chars" != x; then
28048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28052      # Going to short mode and back again did indeed matter. Since short mode is
28053      # case insensitive, let's make it lowercase to improve readability.
28054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28055      # Now convert it back to Unix-style (cygpath)
28056      input_path=`$CYGPATH -u "$shortmode_path"`
28057      new_path="$input_path"
28058    fi
28059  fi
28060
28061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28062  if test "x$test_cygdrive_prefix" = x; then
28063    # As a simple fix, exclude /usr/bin since it's not a real path.
28064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28066      # a path prefixed by /cygdrive for fixpath to work.
28067      new_path="$CYGWIN_ROOT_PATH$input_path"
28068    fi
28069  fi
28070
28071
28072  if test "x$path" != "x$new_path"; then
28073    BOOT_JDK="$new_path"
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28076  fi
28077
28078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28079
28080  path="$BOOT_JDK"
28081  has_colon=`$ECHO $path | $GREP ^.:`
28082  new_path="$path"
28083  if test "x$has_colon" = x; then
28084    # Not in mixed or Windows style, start by that.
28085    new_path=`cmd //c echo $path`
28086  fi
28087
28088
28089  input_path="$new_path"
28090  # Check if we need to convert this using DOS-style short mode. If the path
28091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28092  # take no chances and rewrite it.
28093  # Note: m4 eats our [], so we need to use [ and ] instead.
28094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28095  if test "x$has_forbidden_chars" != x; then
28096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28098  fi
28099
28100
28101  windows_path="$new_path"
28102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28103    unix_path=`$CYGPATH -u "$windows_path"`
28104    new_path="$unix_path"
28105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28107    new_path="$unix_path"
28108  fi
28109
28110  if test "x$path" != "x$new_path"; then
28111    BOOT_JDK="$new_path"
28112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28114  fi
28115
28116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28118
28119    else
28120      # We're on a unix platform. Hooray! :)
28121      path="$BOOT_JDK"
28122      has_space=`$ECHO "$path" | $GREP " "`
28123      if test "x$has_space" != x; then
28124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28127      fi
28128
28129      # Use eval to expand a potential ~
28130      eval path="$path"
28131      if test ! -f "$path" && test ! -d "$path"; then
28132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28133      fi
28134
28135      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28136    fi
28137  fi
28138
28139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28140$as_echo_n "checking for Boot JDK... " >&6; }
28141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28142$as_echo "$BOOT_JDK" >&6; }
28143            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28144$as_echo_n "checking Boot JDK version... " >&6; }
28145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28147$as_echo "$BOOT_JDK_VERSION" >&6; }
28148          fi # end check jdk version
28149        fi # end check javac
28150      fi # end check java
28151    fi # end check boot jdk found
28152  fi
28153
28154
28155  # If we haven't found anything yet, we've truly lost. Give up.
28156  if test "x$BOOT_JDK_FOUND" = xno; then
28157
28158  # Print a helpful message on how to acquire the necessary build dependency.
28159  # openjdk is the help tag: freetype, cups, alsa etc
28160  MISSING_DEPENDENCY=openjdk
28161
28162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28163    cygwin_help $MISSING_DEPENDENCY
28164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165    msys_help $MISSING_DEPENDENCY
28166  else
28167    PKGHANDLER_COMMAND=
28168
28169    case $PKGHANDLER in
28170      apt-get)
28171        apt_help     $MISSING_DEPENDENCY ;;
28172      yum)
28173        yum_help     $MISSING_DEPENDENCY ;;
28174      port)
28175        port_help    $MISSING_DEPENDENCY ;;
28176      pkgutil)
28177        pkgutil_help $MISSING_DEPENDENCY ;;
28178      pkgadd)
28179        pkgadd_help  $MISSING_DEPENDENCY ;;
28180    esac
28181
28182    if test "x$PKGHANDLER_COMMAND" != x; then
28183      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28184    fi
28185  fi
28186
28187    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28188$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28189    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28190$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28191    as_fn_error $? "Cannot continue" "$LINENO" 5
28192  fi
28193
28194
28195
28196  # Setup tools from the Boot JDK.
28197
28198  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28199
28200  # Publish this variable in the help.
28201
28202
28203  if [ -z "${JAVA+x}" ]; then
28204    # The variable is not set by user, try to locate tool using the code snippet
28205
28206      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28207$as_echo_n "checking for java in Boot JDK... " >&6; }
28208      JAVA=$BOOT_JDK/bin/java
28209      if test ! -x $JAVA; then
28210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28211$as_echo "not found" >&6; }
28212        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28213$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28214        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28215      fi
28216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28217$as_echo "ok" >&6; }
28218
28219
28220  else
28221    # The variable is set, but is it from the command line or the environment?
28222
28223    # Try to remove the string !JAVA! from our list.
28224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28226      # If it failed, the variable was not from the command line. Ignore it,
28227      # but warn the user (except for BASH, which is always set by the calling BASH).
28228      if test "xJAVA" != xBASH; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28230$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28231      fi
28232      # Try to locate tool using the code snippet
28233
28234      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28235$as_echo_n "checking for java in Boot JDK... " >&6; }
28236      JAVA=$BOOT_JDK/bin/java
28237      if test ! -x $JAVA; then
28238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28239$as_echo "not found" >&6; }
28240        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28241$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28242        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28243      fi
28244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28245$as_echo "ok" >&6; }
28246
28247
28248    else
28249      # If it succeeded, then it was overridden by the user. We will use it
28250      # for the tool.
28251
28252      # First remove it from the list of overridden variables, so we can test
28253      # for unknown variables in the end.
28254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28255
28256      # Check if we try to supply an empty value
28257      if test "x$JAVA" = x; then
28258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28259$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28261$as_echo_n "checking for JAVA... " >&6; }
28262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28263$as_echo "disabled" >&6; }
28264      else
28265        # Check if the provided tool contains a complete path.
28266        tool_specified="$JAVA"
28267        tool_basename="${tool_specified##*/}"
28268        if test "x$tool_basename" = "x$tool_specified"; then
28269          # A command without a complete path is provided, search $PATH.
28270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28271$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28272          # Extract the first word of "$tool_basename", so it can be a program name with args.
28273set dummy $tool_basename; ac_word=$2
28274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28275$as_echo_n "checking for $ac_word... " >&6; }
28276if ${ac_cv_path_JAVA+:} false; then :
28277  $as_echo_n "(cached) " >&6
28278else
28279  case $JAVA in
28280  [\\/]* | ?:[\\/]*)
28281  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28282  ;;
28283  *)
28284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28285for as_dir in $PATH
28286do
28287  IFS=$as_save_IFS
28288  test -z "$as_dir" && as_dir=.
28289    for ac_exec_ext in '' $ac_executable_extensions; do
28290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28291    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28293    break 2
28294  fi
28295done
28296  done
28297IFS=$as_save_IFS
28298
28299  ;;
28300esac
28301fi
28302JAVA=$ac_cv_path_JAVA
28303if test -n "$JAVA"; then
28304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28305$as_echo "$JAVA" >&6; }
28306else
28307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28308$as_echo "no" >&6; }
28309fi
28310
28311
28312          if test "x$JAVA" = x; then
28313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28314          fi
28315        else
28316          # Otherwise we believe it is a complete path. Use it as it is.
28317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28318$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28320$as_echo_n "checking for JAVA... " >&6; }
28321          if test ! -x "$tool_specified"; then
28322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28323$as_echo "not found" >&6; }
28324            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28325          fi
28326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28327$as_echo "$tool_specified" >&6; }
28328        fi
28329      fi
28330    fi
28331
28332  fi
28333
28334
28335
28336  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28337
28338  # Publish this variable in the help.
28339
28340
28341  if [ -z "${JAVAC+x}" ]; then
28342    # The variable is not set by user, try to locate tool using the code snippet
28343
28344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28345$as_echo_n "checking for javac in Boot JDK... " >&6; }
28346      JAVAC=$BOOT_JDK/bin/javac
28347      if test ! -x $JAVAC; then
28348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28349$as_echo "not found" >&6; }
28350        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28351$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28352        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28353      fi
28354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28355$as_echo "ok" >&6; }
28356
28357
28358  else
28359    # The variable is set, but is it from the command line or the environment?
28360
28361    # Try to remove the string !JAVAC! from our list.
28362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28364      # If it failed, the variable was not from the command line. Ignore it,
28365      # but warn the user (except for BASH, which is always set by the calling BASH).
28366      if test "xJAVAC" != xBASH; then
28367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28368$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28369      fi
28370      # Try to locate tool using the code snippet
28371
28372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28373$as_echo_n "checking for javac in Boot JDK... " >&6; }
28374      JAVAC=$BOOT_JDK/bin/javac
28375      if test ! -x $JAVAC; then
28376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28377$as_echo "not found" >&6; }
28378        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28379$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28380        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28381      fi
28382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28383$as_echo "ok" >&6; }
28384
28385
28386    else
28387      # If it succeeded, then it was overridden by the user. We will use it
28388      # for the tool.
28389
28390      # First remove it from the list of overridden variables, so we can test
28391      # for unknown variables in the end.
28392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28393
28394      # Check if we try to supply an empty value
28395      if test "x$JAVAC" = x; then
28396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
28397$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
28398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28399$as_echo_n "checking for JAVAC... " >&6; }
28400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28401$as_echo "disabled" >&6; }
28402      else
28403        # Check if the provided tool contains a complete path.
28404        tool_specified="$JAVAC"
28405        tool_basename="${tool_specified##*/}"
28406        if test "x$tool_basename" = "x$tool_specified"; then
28407          # A command without a complete path is provided, search $PATH.
28408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
28409$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
28410          # Extract the first word of "$tool_basename", so it can be a program name with args.
28411set dummy $tool_basename; ac_word=$2
28412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28413$as_echo_n "checking for $ac_word... " >&6; }
28414if ${ac_cv_path_JAVAC+:} false; then :
28415  $as_echo_n "(cached) " >&6
28416else
28417  case $JAVAC in
28418  [\\/]* | ?:[\\/]*)
28419  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
28420  ;;
28421  *)
28422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28423for as_dir in $PATH
28424do
28425  IFS=$as_save_IFS
28426  test -z "$as_dir" && as_dir=.
28427    for ac_exec_ext in '' $ac_executable_extensions; do
28428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28429    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
28430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28431    break 2
28432  fi
28433done
28434  done
28435IFS=$as_save_IFS
28436
28437  ;;
28438esac
28439fi
28440JAVAC=$ac_cv_path_JAVAC
28441if test -n "$JAVAC"; then
28442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
28443$as_echo "$JAVAC" >&6; }
28444else
28445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28446$as_echo "no" >&6; }
28447fi
28448
28449
28450          if test "x$JAVAC" = x; then
28451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28452          fi
28453        else
28454          # Otherwise we believe it is a complete path. Use it as it is.
28455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
28456$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
28457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
28458$as_echo_n "checking for JAVAC... " >&6; }
28459          if test ! -x "$tool_specified"; then
28460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28461$as_echo "not found" >&6; }
28462            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
28463          fi
28464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28465$as_echo "$tool_specified" >&6; }
28466        fi
28467      fi
28468    fi
28469
28470  fi
28471
28472
28473
28474  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28475
28476  # Publish this variable in the help.
28477
28478
28479  if [ -z "${JAVAH+x}" ]; then
28480    # The variable is not set by user, try to locate tool using the code snippet
28481
28482      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28483$as_echo_n "checking for javah in Boot JDK... " >&6; }
28484      JAVAH=$BOOT_JDK/bin/javah
28485      if test ! -x $JAVAH; then
28486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28487$as_echo "not found" >&6; }
28488        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28489$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28490        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28491      fi
28492      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28493$as_echo "ok" >&6; }
28494
28495
28496  else
28497    # The variable is set, but is it from the command line or the environment?
28498
28499    # Try to remove the string !JAVAH! from our list.
28500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
28501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28502      # If it failed, the variable was not from the command line. Ignore it,
28503      # but warn the user (except for BASH, which is always set by the calling BASH).
28504      if test "xJAVAH" != xBASH; then
28505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
28506$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
28507      fi
28508      # Try to locate tool using the code snippet
28509
28510      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
28511$as_echo_n "checking for javah in Boot JDK... " >&6; }
28512      JAVAH=$BOOT_JDK/bin/javah
28513      if test ! -x $JAVAH; then
28514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28515$as_echo "not found" >&6; }
28516        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28517$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28518        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
28519      fi
28520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28521$as_echo "ok" >&6; }
28522
28523
28524    else
28525      # If it succeeded, then it was overridden by the user. We will use it
28526      # for the tool.
28527
28528      # First remove it from the list of overridden variables, so we can test
28529      # for unknown variables in the end.
28530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28531
28532      # Check if we try to supply an empty value
28533      if test "x$JAVAH" = x; then
28534        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
28535$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
28536        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28537$as_echo_n "checking for JAVAH... " >&6; }
28538        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28539$as_echo "disabled" >&6; }
28540      else
28541        # Check if the provided tool contains a complete path.
28542        tool_specified="$JAVAH"
28543        tool_basename="${tool_specified##*/}"
28544        if test "x$tool_basename" = "x$tool_specified"; then
28545          # A command without a complete path is provided, search $PATH.
28546          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
28547$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
28548          # Extract the first word of "$tool_basename", so it can be a program name with args.
28549set dummy $tool_basename; ac_word=$2
28550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28551$as_echo_n "checking for $ac_word... " >&6; }
28552if ${ac_cv_path_JAVAH+:} false; then :
28553  $as_echo_n "(cached) " >&6
28554else
28555  case $JAVAH in
28556  [\\/]* | ?:[\\/]*)
28557  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
28558  ;;
28559  *)
28560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28561for as_dir in $PATH
28562do
28563  IFS=$as_save_IFS
28564  test -z "$as_dir" && as_dir=.
28565    for ac_exec_ext in '' $ac_executable_extensions; do
28566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28567    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
28568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28569    break 2
28570  fi
28571done
28572  done
28573IFS=$as_save_IFS
28574
28575  ;;
28576esac
28577fi
28578JAVAH=$ac_cv_path_JAVAH
28579if test -n "$JAVAH"; then
28580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
28581$as_echo "$JAVAH" >&6; }
28582else
28583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28584$as_echo "no" >&6; }
28585fi
28586
28587
28588          if test "x$JAVAH" = x; then
28589            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28590          fi
28591        else
28592          # Otherwise we believe it is a complete path. Use it as it is.
28593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
28594$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
28595          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
28596$as_echo_n "checking for JAVAH... " >&6; }
28597          if test ! -x "$tool_specified"; then
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28599$as_echo "not found" >&6; }
28600            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
28601          fi
28602          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28603$as_echo "$tool_specified" >&6; }
28604        fi
28605      fi
28606    fi
28607
28608  fi
28609
28610
28611
28612  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28613
28614  # Publish this variable in the help.
28615
28616
28617  if [ -z "${JAR+x}" ]; then
28618    # The variable is not set by user, try to locate tool using the code snippet
28619
28620      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28621$as_echo_n "checking for jar in Boot JDK... " >&6; }
28622      JAR=$BOOT_JDK/bin/jar
28623      if test ! -x $JAR; then
28624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28625$as_echo "not found" >&6; }
28626        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28627$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28628        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28629      fi
28630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28631$as_echo "ok" >&6; }
28632
28633
28634  else
28635    # The variable is set, but is it from the command line or the environment?
28636
28637    # Try to remove the string !JAR! from our list.
28638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
28639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28640      # If it failed, the variable was not from the command line. Ignore it,
28641      # but warn the user (except for BASH, which is always set by the calling BASH).
28642      if test "xJAR" != xBASH; then
28643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
28644$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
28645      fi
28646      # Try to locate tool using the code snippet
28647
28648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
28649$as_echo_n "checking for jar in Boot JDK... " >&6; }
28650      JAR=$BOOT_JDK/bin/jar
28651      if test ! -x $JAR; then
28652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28653$as_echo "not found" >&6; }
28654        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28655$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28656        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
28657      fi
28658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28659$as_echo "ok" >&6; }
28660
28661
28662    else
28663      # If it succeeded, then it was overridden by the user. We will use it
28664      # for the tool.
28665
28666      # First remove it from the list of overridden variables, so we can test
28667      # for unknown variables in the end.
28668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28669
28670      # Check if we try to supply an empty value
28671      if test "x$JAR" = x; then
28672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
28673$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
28674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28675$as_echo_n "checking for JAR... " >&6; }
28676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28677$as_echo "disabled" >&6; }
28678      else
28679        # Check if the provided tool contains a complete path.
28680        tool_specified="$JAR"
28681        tool_basename="${tool_specified##*/}"
28682        if test "x$tool_basename" = "x$tool_specified"; then
28683          # A command without a complete path is provided, search $PATH.
28684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
28685$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
28686          # Extract the first word of "$tool_basename", so it can be a program name with args.
28687set dummy $tool_basename; ac_word=$2
28688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28689$as_echo_n "checking for $ac_word... " >&6; }
28690if ${ac_cv_path_JAR+:} false; then :
28691  $as_echo_n "(cached) " >&6
28692else
28693  case $JAR in
28694  [\\/]* | ?:[\\/]*)
28695  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
28696  ;;
28697  *)
28698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28699for as_dir in $PATH
28700do
28701  IFS=$as_save_IFS
28702  test -z "$as_dir" && as_dir=.
28703    for ac_exec_ext in '' $ac_executable_extensions; do
28704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28705    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
28706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28707    break 2
28708  fi
28709done
28710  done
28711IFS=$as_save_IFS
28712
28713  ;;
28714esac
28715fi
28716JAR=$ac_cv_path_JAR
28717if test -n "$JAR"; then
28718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
28719$as_echo "$JAR" >&6; }
28720else
28721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28722$as_echo "no" >&6; }
28723fi
28724
28725
28726          if test "x$JAR" = x; then
28727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28728          fi
28729        else
28730          # Otherwise we believe it is a complete path. Use it as it is.
28731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
28732$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
28733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
28734$as_echo_n "checking for JAR... " >&6; }
28735          if test ! -x "$tool_specified"; then
28736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28737$as_echo "not found" >&6; }
28738            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
28739          fi
28740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28741$as_echo "$tool_specified" >&6; }
28742        fi
28743      fi
28744    fi
28745
28746  fi
28747
28748
28749
28750  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28751
28752  # Publish this variable in the help.
28753
28754
28755  if [ -z "${JARSIGNER+x}" ]; then
28756    # The variable is not set by user, try to locate tool using the code snippet
28757
28758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28759$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28760      JARSIGNER=$BOOT_JDK/bin/jarsigner
28761      if test ! -x $JARSIGNER; then
28762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28763$as_echo "not found" >&6; }
28764        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28765$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28766        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28767      fi
28768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28769$as_echo "ok" >&6; }
28770
28771
28772  else
28773    # The variable is set, but is it from the command line or the environment?
28774
28775    # Try to remove the string !JARSIGNER! from our list.
28776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
28777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28778      # If it failed, the variable was not from the command line. Ignore it,
28779      # but warn the user (except for BASH, which is always set by the calling BASH).
28780      if test "xJARSIGNER" != xBASH; then
28781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
28782$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
28783      fi
28784      # Try to locate tool using the code snippet
28785
28786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
28787$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
28788      JARSIGNER=$BOOT_JDK/bin/jarsigner
28789      if test ! -x $JARSIGNER; then
28790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28791$as_echo "not found" >&6; }
28792        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28793$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28794        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
28795      fi
28796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28797$as_echo "ok" >&6; }
28798
28799
28800    else
28801      # If it succeeded, then it was overridden by the user. We will use it
28802      # for the tool.
28803
28804      # First remove it from the list of overridden variables, so we can test
28805      # for unknown variables in the end.
28806      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28807
28808      # Check if we try to supply an empty value
28809      if test "x$JARSIGNER" = x; then
28810        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
28811$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
28812        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28813$as_echo_n "checking for JARSIGNER... " >&6; }
28814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28815$as_echo "disabled" >&6; }
28816      else
28817        # Check if the provided tool contains a complete path.
28818        tool_specified="$JARSIGNER"
28819        tool_basename="${tool_specified##*/}"
28820        if test "x$tool_basename" = "x$tool_specified"; then
28821          # A command without a complete path is provided, search $PATH.
28822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
28823$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
28824          # Extract the first word of "$tool_basename", so it can be a program name with args.
28825set dummy $tool_basename; ac_word=$2
28826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28827$as_echo_n "checking for $ac_word... " >&6; }
28828if ${ac_cv_path_JARSIGNER+:} false; then :
28829  $as_echo_n "(cached) " >&6
28830else
28831  case $JARSIGNER in
28832  [\\/]* | ?:[\\/]*)
28833  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
28834  ;;
28835  *)
28836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28837for as_dir in $PATH
28838do
28839  IFS=$as_save_IFS
28840  test -z "$as_dir" && as_dir=.
28841    for ac_exec_ext in '' $ac_executable_extensions; do
28842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28843    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
28844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28845    break 2
28846  fi
28847done
28848  done
28849IFS=$as_save_IFS
28850
28851  ;;
28852esac
28853fi
28854JARSIGNER=$ac_cv_path_JARSIGNER
28855if test -n "$JARSIGNER"; then
28856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
28857$as_echo "$JARSIGNER" >&6; }
28858else
28859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28860$as_echo "no" >&6; }
28861fi
28862
28863
28864          if test "x$JARSIGNER" = x; then
28865            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28866          fi
28867        else
28868          # Otherwise we believe it is a complete path. Use it as it is.
28869          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
28870$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
28871          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
28872$as_echo_n "checking for JARSIGNER... " >&6; }
28873          if test ! -x "$tool_specified"; then
28874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28875$as_echo "not found" >&6; }
28876            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
28877          fi
28878          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28879$as_echo "$tool_specified" >&6; }
28880        fi
28881      fi
28882    fi
28883
28884  fi
28885
28886
28887
28888  # Finally, set some other options...
28889
28890  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
28891  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
28892
28893
28894
28895  # Check if the boot jdk is 32 or 64 bit
28896  if "$JAVA" -d64 -version > /dev/null 2>&1; then
28897    BOOT_JDK_BITS="64"
28898  else
28899    BOOT_JDK_BITS="32"
28900  fi
28901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
28902$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
28903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
28904$as_echo "$BOOT_JDK_BITS" >&6; }
28905
28906
28907
28908###############################################################################
28909#
28910# Configure the sources to use. We can add or override individual directories.
28911#
28912###############################################################################
28913
28914
28915  # Where are the sources.
28916  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
28917  CORBA_TOPDIR="$SRC_ROOT/corba"
28918  JAXP_TOPDIR="$SRC_ROOT/jaxp"
28919  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
28920  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
28921  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
28922  JDK_TOPDIR="$SRC_ROOT/jdk"
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932  # This feature is no longer supported.
28933
28934
28935
28936# Check whether --with-add-source-root was given.
28937if test "${with_add_source_root+set}" = set; then :
28938  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
28939$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
28940fi
28941
28942
28943
28944
28945# Check whether --with-override-source-root was given.
28946if test "${with_override_source_root+set}" = set; then :
28947  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
28948$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
28949fi
28950
28951
28952
28953
28954# Check whether --with-adds-and-overrides was given.
28955if test "${with_adds_and_overrides+set}" = set; then :
28956  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
28957$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
28958fi
28959
28960
28961
28962
28963# Check whether --with-override-langtools was given.
28964if test "${with_override_langtools+set}" = set; then :
28965  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
28966$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
28967fi
28968
28969
28970
28971
28972# Check whether --with-override-corba was given.
28973if test "${with_override_corba+set}" = set; then :
28974  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
28975$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
28976fi
28977
28978
28979
28980
28981# Check whether --with-override-jaxp was given.
28982if test "${with_override_jaxp+set}" = set; then :
28983  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
28984$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
28985fi
28986
28987
28988
28989
28990# Check whether --with-override-jaxws was given.
28991if test "${with_override_jaxws+set}" = set; then :
28992  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
28993$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
28994fi
28995
28996
28997
28998
28999# Check whether --with-override-hotspot was given.
29000if test "${with_override_hotspot+set}" = set; then :
29001  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29002$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29003fi
29004
29005
29006
29007
29008# Check whether --with-override-nashorn was given.
29009if test "${with_override_nashorn+set}" = set; then :
29010  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29011$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29012fi
29013
29014
29015
29016
29017# Check whether --with-override-jdk was given.
29018if test "${with_override_jdk+set}" = set; then :
29019  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29020$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29021fi
29022
29023
29024
29025
29026  BUILD_OUTPUT="$OUTPUT_ROOT"
29027
29028
29029  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29030  BUILD_HOTSPOT=true
29031
29032
29033
29034# Check whether --with-import-hotspot was given.
29035if test "${with_import_hotspot+set}" = set; then :
29036  withval=$with_import_hotspot;
29037fi
29038
29039  if test "x$with_import_hotspot" != x; then
29040    CURDIR="$PWD"
29041    cd "$with_import_hotspot"
29042    HOTSPOT_DIST="`pwd`"
29043    cd "$CURDIR"
29044    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29045      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29046    fi
29047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29048$as_echo_n "checking if hotspot should be imported... " >&6; }
29049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29050$as_echo "yes from $HOTSPOT_DIST" >&6; }
29051    BUILD_HOTSPOT=false
29052  fi
29053
29054  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29055
29056
29057###############################################################################
29058#
29059# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29060# native code.
29061#
29062###############################################################################
29063
29064# See if we are doing a complete static build or not
29065
29066  # Check whether --enable-static-build was given.
29067if test "${enable_static_build+set}" = set; then :
29068  enableval=$enable_static_build;
29069fi
29070
29071  STATIC_BUILD=false
29072  if test "x$enable_static_build" = "xyes"; then
29073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29074$as_echo_n "checking if static build is enabled... " >&6; }
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29076$as_echo "yes" >&6; }
29077    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29078      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29079    fi
29080    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29081    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29082    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29083    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29084    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29085    STATIC_BUILD=true
29086  elif test "x$enable_static_build" = "xno"; then
29087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29088$as_echo_n "checking if static build is enabled... " >&6; }
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29090$as_echo "no" >&6; }
29091  elif test "x$enable_static_build" != "x"; then
29092    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29093  fi
29094
29095
29096
29097
29098# First determine the toolchain type (compiler family)
29099
29100
29101# Check whether --with-toolchain-type was given.
29102if test "${with_toolchain_type+set}" = set; then :
29103  withval=$with_toolchain_type;
29104fi
29105
29106
29107  # Use indirect variable referencing
29108  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29109  VALID_TOOLCHAINS=${!toolchain_var_name}
29110
29111  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29112    if test -n "$XCODEBUILD"; then
29113      # On Mac OS X, default toolchain to clang after Xcode 5
29114      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29115      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29116      if test $? -ne 0; then
29117        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29118      fi
29119      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29120          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29121          $CUT -f 1 -d .`
29122      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29123$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29124      if test $XCODE_MAJOR_VERSION -ge 5; then
29125          DEFAULT_TOOLCHAIN="clang"
29126      else
29127          DEFAULT_TOOLCHAIN="gcc"
29128      fi
29129    else
29130      # If Xcode is not installed, but the command line tools are
29131      # then we can't run xcodebuild. On these systems we should
29132      # default to clang
29133      DEFAULT_TOOLCHAIN="clang"
29134    fi
29135  else
29136    # First toolchain type in the list is the default
29137    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29138  fi
29139
29140  if test "x$with_toolchain_type" = xlist; then
29141    # List all toolchains
29142    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29143$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29144    for toolchain in $VALID_TOOLCHAINS; do
29145      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29146      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29147      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29148    done
29149
29150    exit 0
29151  elif test "x$with_toolchain_type" != x; then
29152    # User override; check that it is valid
29153    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29154      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29155$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29156      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29157$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29158      as_fn_error $? "Cannot continue." "$LINENO" 5
29159    fi
29160    TOOLCHAIN_TYPE=$with_toolchain_type
29161  else
29162    # No flag given, use default
29163    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29164  fi
29165
29166
29167  TOOLCHAIN_CC_BINARY_clang="clang"
29168  TOOLCHAIN_CC_BINARY_gcc="gcc"
29169  TOOLCHAIN_CC_BINARY_microsoft="cl"
29170  TOOLCHAIN_CC_BINARY_solstudio="cc"
29171  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29172
29173  TOOLCHAIN_CXX_BINARY_clang="clang++"
29174  TOOLCHAIN_CXX_BINARY_gcc="g++"
29175  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29176  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29177  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29178
29179  # Use indirect variable referencing
29180  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29181  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29182  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29183  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29184  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29185  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29186
29187
29188  # Define filename patterns
29189  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29190    LIBRARY_PREFIX=
29191    SHARED_LIBRARY_SUFFIX='.dll'
29192    STATIC_LIBRARY_SUFFIX='.lib'
29193    SHARED_LIBRARY='$1.dll'
29194    STATIC_LIBRARY='$1.lib'
29195    OBJ_SUFFIX='.obj'
29196    EXE_SUFFIX='.exe'
29197  else
29198    LIBRARY_PREFIX=lib
29199    SHARED_LIBRARY_SUFFIX='.so'
29200    STATIC_LIBRARY_SUFFIX='.a'
29201    SHARED_LIBRARY='lib$1.so'
29202    STATIC_LIBRARY='lib$1.a'
29203    OBJ_SUFFIX='.o'
29204    EXE_SUFFIX=''
29205    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29206      # For full static builds, we're overloading the SHARED_LIBRARY
29207      # variables in order to limit the amount of changes required.
29208      # It would be better to remove SHARED and just use LIBRARY and
29209      # LIBRARY_SUFFIX for libraries that can be built either
29210      # shared or static and use STATIC_* for libraries that are
29211      # always built statically.
29212      if test "x$STATIC_BUILD" = xtrue; then
29213        SHARED_LIBRARY='lib$1.a'
29214        SHARED_LIBRARY_SUFFIX='.a'
29215      else
29216        SHARED_LIBRARY='lib$1.dylib'
29217        SHARED_LIBRARY_SUFFIX='.dylib'
29218      fi
29219    fi
29220  fi
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29232    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29233$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29234  else
29235    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29236$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29237  fi
29238
29239
29240# User supplied flags should be used when configure detects compilers
29241
29242  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29244$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29245  fi
29246
29247  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29248    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29249$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29250  fi
29251
29252  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29253    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29254$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29255  fi
29256
29257
29258# Check whether --with-extra-cflags was given.
29259if test "${with_extra_cflags+set}" = set; then :
29260  withval=$with_extra_cflags;
29261fi
29262
29263
29264
29265# Check whether --with-extra-cxxflags was given.
29266if test "${with_extra_cxxflags+set}" = set; then :
29267  withval=$with_extra_cxxflags;
29268fi
29269
29270
29271
29272# Check whether --with-extra-ldflags was given.
29273if test "${with_extra_ldflags+set}" = set; then :
29274  withval=$with_extra_ldflags;
29275fi
29276
29277
29278  EXTRA_CFLAGS="$with_extra_cflags"
29279  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29280  EXTRA_LDFLAGS="$with_extra_ldflags"
29281
29282  # Hotspot needs these set in their legacy form
29283  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29284  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29285  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29286
29287
29288
29289
29290
29291  # The global CFLAGS and LDLAGS variables are used by configure tests and
29292  # should include the extra parameters
29293  CFLAGS="$EXTRA_CFLAGS"
29294  CXXFLAGS="$EXTRA_CXXFLAGS"
29295  LDFLAGS="$EXTRA_LDFLAGS"
29296  CPPFLAGS=""
29297
29298# The sysroot cflags are needed for configure to be able to run the compilers
29299
29300  if test "x$SYSROOT" != "x"; then
29301    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29302      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29303        # Solaris Studio does not have a concept of sysroot. Instead we must
29304        # make sure the default include and lib dirs are appended to each
29305        # compile and link command line.
29306        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29307        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29308            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29309            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29310      fi
29311    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29312      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29313      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29314    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29315      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29316      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29317    fi
29318    # Propagate the sysroot args to hotspot
29319    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29320    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29321    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29322    # The global CFLAGS and LDFLAGS variables need these for configure to function
29323    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29324    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29325    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29326    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29327  fi
29328
29329  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29330    # We also need -iframework<path>/System/Library/Frameworks
29331    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29332    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29333    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29334    # set this here so it doesn't have to be peppered throughout the forest
29335    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29336    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29337  fi
29338
29339
29340
29341
29342
29343# Then detect the actual binaries needed
29344
29345  # FIXME: Is this needed?
29346  ac_ext=cpp
29347ac_cpp='$CXXCPP $CPPFLAGS'
29348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29351
29352
29353  # Store the CFLAGS etc passed to the configure script.
29354  ORG_CFLAGS="$CFLAGS"
29355  ORG_CXXFLAGS="$CXXFLAGS"
29356
29357  # autoconf magic only relies on PATH, so update it if tools dir is specified
29358  OLD_PATH="$PATH"
29359
29360  # On Windows, we need to detect the visual studio installation first.
29361  # This will change the PATH, but we need to keep that new PATH even
29362  # after toolchain detection is done, since the compiler (on x86) uses
29363  # it for DLL resolution in runtime.
29364  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29365      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29366
29367  # Store path to cygwin link.exe to help excluding it when searching for
29368  # VS linker. This must be done before changing the PATH when looking for VS.
29369  # Extract the first word of "link", so it can be a program name with args.
29370set dummy link; ac_word=$2
29371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29372$as_echo_n "checking for $ac_word... " >&6; }
29373if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29374  $as_echo_n "(cached) " >&6
29375else
29376  case $CYGWIN_LINK in
29377  [\\/]* | ?:[\\/]*)
29378  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29379  ;;
29380  *)
29381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29382for as_dir in $PATH
29383do
29384  IFS=$as_save_IFS
29385  test -z "$as_dir" && as_dir=.
29386    for ac_exec_ext in '' $ac_executable_extensions; do
29387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29388    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
29389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29390    break 2
29391  fi
29392done
29393  done
29394IFS=$as_save_IFS
29395
29396  ;;
29397esac
29398fi
29399CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
29400if test -n "$CYGWIN_LINK"; then
29401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
29402$as_echo "$CYGWIN_LINK" >&6; }
29403else
29404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29405$as_echo "no" >&6; }
29406fi
29407
29408
29409  if test "x$CYGWIN_LINK" != x; then
29410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
29411$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
29412    "$CYGWIN_LINK" --version > /dev/null
29413    if test $? -eq 0 ; then
29414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29415$as_echo "yes" >&6; }
29416    else
29417      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29418$as_echo "no" >&6; }
29419      # This might be the VS linker. Don't exclude it later on.
29420      CYGWIN_LINK=""
29421    fi
29422  fi
29423
29424  # First-hand choice is to locate and run the vsvars bat file.
29425
29426
29427# Check whether --with-toolchain-version was given.
29428if test "${with_toolchain_version+set}" = set; then :
29429  withval=$with_toolchain_version;
29430fi
29431
29432
29433  if test "x$with_toolchain_version" = xlist; then
29434    # List all toolchains
29435    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
29436$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
29437    for version in $VALID_VS_VERSIONS; do
29438      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
29439      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
29440    done
29441
29442    exit 0
29443  elif test "x$DEVKIT_VS_VERSION" != x; then
29444    VS_VERSION=$DEVKIT_VS_VERSION
29445    TOOLCHAIN_VERSION=$VS_VERSION
29446    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
29447    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
29448    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
29449    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
29450    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29451    VS_PATH="$TOOLCHAIN_PATH:$PATH"
29452
29453    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
29454    # can still be exported as INCLUDE for compiler invocations without
29455    # SYSROOT_CFLAGS
29456    OLDIFS="$IFS"
29457    IFS=";"
29458    for i in $DEVKIT_VS_INCLUDE; do
29459      ipath=$i
29460
29461  unix_path="$ipath"
29462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463    windows_path=`$CYGPATH -m "$unix_path"`
29464    ipath="$windows_path"
29465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29466    windows_path=`cmd //c echo $unix_path`
29467    ipath="$windows_path"
29468  fi
29469
29470      VS_INCLUDE="$VS_INCLUDE;$ipath"
29471    done
29472    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
29473    # as LIB for compiler invocations without SYSROOT_LDFLAGS
29474    for i in $DEVKIT_VS_LIB; do
29475      libpath=$i
29476
29477  unix_path="$libpath"
29478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29479    windows_path=`$CYGPATH -m "$unix_path"`
29480    libpath="$windows_path"
29481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29482    windows_path=`cmd //c echo $unix_path`
29483    libpath="$windows_path"
29484  fi
29485
29486      VS_LIB="$VS_LIB;$libpath"
29487    done
29488    IFS="$OLDIFS"
29489
29490    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
29491$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
29492
29493  elif test "x$with_toolchain_version" != x; then
29494    # User override; check that it is valid
29495    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
29496      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
29497$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
29498      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
29499$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
29500      as_fn_error $? "Cannot continue." "$LINENO" 5
29501    fi
29502    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
29503  else
29504    # No flag given, use default
29505    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
29506  fi
29507
29508  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
29509
29510  VS_VERSION="$VS_VERSION"
29511  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
29512  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
29513  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
29514  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
29515
29516  # When using --with-tools-dir, assume it points to the correct and default
29517  # version of Visual Studio or that --with-toolchain-version was also set.
29518  if test "x$with_tools_dir" != x; then
29519
29520  if test "x$VS_ENV_CMD" = x; then
29521    VS_VERSION="${VS_VERSION}"
29522    VS_BASE="$with_tools_dir/../.."
29523    METHOD="--with-tools-dir"
29524
29525    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29526      VCVARSFILE="vc/bin/vcvars32.bat"
29527    else
29528      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29529    fi
29530
29531
29532  windows_path="$VS_BASE"
29533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29534    unix_path=`$CYGPATH -u "$windows_path"`
29535    VS_BASE="$unix_path"
29536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29538    VS_BASE="$unix_path"
29539  fi
29540
29541    if test -d "$VS_BASE"; then
29542      if test -f "$VS_BASE/$VCVARSFILE"; then
29543        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29544$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29545        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29546        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29547        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29548        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29549      else
29550        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29551$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29552        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29553$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29554      fi
29555    fi
29556  fi
29557
29558
29559  if test "x$VS_ENV_CMD" = x; then
29560    VS_VERSION="${VS_VERSION}"
29561    VS_BASE="$with_tools_dir/../../.."
29562    METHOD="--with-tools-dir"
29563
29564    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29565      VCVARSFILE="vc/bin/vcvars32.bat"
29566    else
29567      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29568    fi
29569
29570
29571  windows_path="$VS_BASE"
29572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29573    unix_path=`$CYGPATH -u "$windows_path"`
29574    VS_BASE="$unix_path"
29575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29577    VS_BASE="$unix_path"
29578  fi
29579
29580    if test -d "$VS_BASE"; then
29581      if test -f "$VS_BASE/$VCVARSFILE"; then
29582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29583$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29584        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29585        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29586        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29587        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29588      else
29589        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29590$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29591        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29592$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29593      fi
29594    fi
29595  fi
29596
29597    if test "x$VS_ENV_CMD" = x; then
29598      # Having specified an argument which is incorrect will produce an instant failure;
29599      # we should not go on looking
29600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
29601$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
29602      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
29603$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
29604      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
29605$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
29606      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
29607    fi
29608  fi
29609
29610  VS_ENV_CMD=""
29611  VS_ENV_ARGS=""
29612
29613  if test "x$VS_COMNTOOLS" != x; then
29614
29615  if test "x$VS_ENV_CMD" = x; then
29616    VS_VERSION="${VS_VERSION}"
29617    VS_BASE="$VS_COMNTOOLS/../.."
29618    METHOD="$VS_COMNTOOLS_VAR variable"
29619
29620    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29621      VCVARSFILE="vc/bin/vcvars32.bat"
29622    else
29623      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29624    fi
29625
29626
29627  windows_path="$VS_BASE"
29628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29629    unix_path=`$CYGPATH -u "$windows_path"`
29630    VS_BASE="$unix_path"
29631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29633    VS_BASE="$unix_path"
29634  fi
29635
29636    if test -d "$VS_BASE"; then
29637      if test -f "$VS_BASE/$VCVARSFILE"; then
29638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29639$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29640        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29641        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29642        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29643        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29644      else
29645        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29646$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29647        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29648$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29649      fi
29650    fi
29651  fi
29652
29653  fi
29654  if test "x$PROGRAMFILES" != x; then
29655
29656  if test "x$VS_ENV_CMD" = x; then
29657    VS_VERSION="${VS_VERSION}"
29658    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
29659    METHOD="well-known name"
29660
29661    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29662      VCVARSFILE="vc/bin/vcvars32.bat"
29663    else
29664      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29665    fi
29666
29667
29668  windows_path="$VS_BASE"
29669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29670    unix_path=`$CYGPATH -u "$windows_path"`
29671    VS_BASE="$unix_path"
29672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29674    VS_BASE="$unix_path"
29675  fi
29676
29677    if test -d "$VS_BASE"; then
29678      if test -f "$VS_BASE/$VCVARSFILE"; then
29679        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29680$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29681        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29682        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29683        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29684        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29685      else
29686        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29687$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29688        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29689$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29690      fi
29691    fi
29692  fi
29693
29694  fi
29695  # Work around the insanely named ProgramFiles(x86) env variable
29696  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
29697  if test "x$PROGRAMFILES_X86" != x; then
29698
29699  if test "x$VS_ENV_CMD" = x; then
29700    VS_VERSION="${VS_VERSION}"
29701    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
29702    METHOD="well-known name"
29703
29704    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29705      VCVARSFILE="vc/bin/vcvars32.bat"
29706    else
29707      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29708    fi
29709
29710
29711  windows_path="$VS_BASE"
29712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29713    unix_path=`$CYGPATH -u "$windows_path"`
29714    VS_BASE="$unix_path"
29715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29717    VS_BASE="$unix_path"
29718  fi
29719
29720    if test -d "$VS_BASE"; then
29721      if test -f "$VS_BASE/$VCVARSFILE"; then
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29723$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29724        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29725        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29726        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29727        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29728      else
29729        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29730$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29731        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29732$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29733      fi
29734    fi
29735  fi
29736
29737  fi
29738
29739  if test "x$VS_ENV_CMD" = x; then
29740    VS_VERSION="${VS_VERSION}"
29741    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
29742    METHOD="well-known name"
29743
29744    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29745      VCVARSFILE="vc/bin/vcvars32.bat"
29746    else
29747      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29748    fi
29749
29750
29751  windows_path="$VS_BASE"
29752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29753    unix_path=`$CYGPATH -u "$windows_path"`
29754    VS_BASE="$unix_path"
29755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29757    VS_BASE="$unix_path"
29758  fi
29759
29760    if test -d "$VS_BASE"; then
29761      if test -f "$VS_BASE/$VCVARSFILE"; then
29762        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29763$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29764        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29765        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29766        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29767        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29768      else
29769        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29770$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29771        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29772$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29773      fi
29774    fi
29775  fi
29776
29777
29778  if test "x$VS_ENV_CMD" = x; then
29779    VS_VERSION="${VS_VERSION}"
29780    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
29781    METHOD="well-known name"
29782
29783    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29784      VCVARSFILE="vc/bin/vcvars32.bat"
29785    else
29786      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
29787    fi
29788
29789
29790  windows_path="$VS_BASE"
29791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29792    unix_path=`$CYGPATH -u "$windows_path"`
29793    VS_BASE="$unix_path"
29794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29796    VS_BASE="$unix_path"
29797  fi
29798
29799    if test -d "$VS_BASE"; then
29800      if test -f "$VS_BASE/$VCVARSFILE"; then
29801        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29802$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29803        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
29804        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29805        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
29806        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
29807      else
29808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
29809$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
29810        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
29811$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
29812      fi
29813    fi
29814  fi
29815
29816
29817  if test "x$SDK_INSTALL_DIR" != x; then
29818    if test "x$ProgramW6432" != x; then
29819
29820  if test "x$VS_ENV_CMD" = x; then
29821    VS_VERSION="${VS_VERSION}"
29822    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
29823    METHOD="well-known name"
29824
29825  windows_path="$WIN_SDK_BASE"
29826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29827    unix_path=`$CYGPATH -u "$windows_path"`
29828    WIN_SDK_BASE="$unix_path"
29829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29831    WIN_SDK_BASE="$unix_path"
29832  fi
29833
29834    if test -d "$WIN_SDK_BASE"; then
29835      # There have been cases of partial or broken SDK installations. A missing
29836      # lib dir is not going to work.
29837      if test ! -d "$WIN_SDK_BASE/lib"; then
29838        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29839$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29840        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29841$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29842      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29845        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29846        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29847          VS_ENV_ARGS="/x86"
29848        else
29849          VS_ENV_ARGS="/x64"
29850        fi
29851        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29852        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29853        # TODO: improve detection for other versions of SDK
29854        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29855      else
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29857$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29858        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29859$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29860      fi
29861    fi
29862  fi
29863
29864    fi
29865    if test "x$PROGRAMW6432" != x; then
29866
29867  if test "x$VS_ENV_CMD" = x; then
29868    VS_VERSION="${VS_VERSION}"
29869    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
29870    METHOD="well-known name"
29871
29872  windows_path="$WIN_SDK_BASE"
29873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29874    unix_path=`$CYGPATH -u "$windows_path"`
29875    WIN_SDK_BASE="$unix_path"
29876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29878    WIN_SDK_BASE="$unix_path"
29879  fi
29880
29881    if test -d "$WIN_SDK_BASE"; then
29882      # There have been cases of partial or broken SDK installations. A missing
29883      # lib dir is not going to work.
29884      if test ! -d "$WIN_SDK_BASE/lib"; then
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29886$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29887        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29888$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29889      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29891$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29892        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29893        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29894          VS_ENV_ARGS="/x86"
29895        else
29896          VS_ENV_ARGS="/x64"
29897        fi
29898        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29899        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29900        # TODO: improve detection for other versions of SDK
29901        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29902      else
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29904$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29906$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29907      fi
29908    fi
29909  fi
29910
29911    fi
29912    if test "x$PROGRAMFILES" != x; then
29913
29914  if test "x$VS_ENV_CMD" = x; then
29915    VS_VERSION="${VS_VERSION}"
29916    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
29917    METHOD="well-known name"
29918
29919  windows_path="$WIN_SDK_BASE"
29920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29921    unix_path=`$CYGPATH -u "$windows_path"`
29922    WIN_SDK_BASE="$unix_path"
29923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29925    WIN_SDK_BASE="$unix_path"
29926  fi
29927
29928    if test -d "$WIN_SDK_BASE"; then
29929      # There have been cases of partial or broken SDK installations. A missing
29930      # lib dir is not going to work.
29931      if test ! -d "$WIN_SDK_BASE/lib"; then
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29933$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29934        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29935$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29936      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29938$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29939        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29940        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29941          VS_ENV_ARGS="/x86"
29942        else
29943          VS_ENV_ARGS="/x64"
29944        fi
29945        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29946        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29947        # TODO: improve detection for other versions of SDK
29948        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29949      else
29950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29951$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29953$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
29954      fi
29955    fi
29956  fi
29957
29958    fi
29959
29960  if test "x$VS_ENV_CMD" = x; then
29961    VS_VERSION="${VS_VERSION}"
29962    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
29963    METHOD="well-known name"
29964
29965  windows_path="$WIN_SDK_BASE"
29966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29967    unix_path=`$CYGPATH -u "$windows_path"`
29968    WIN_SDK_BASE="$unix_path"
29969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29971    WIN_SDK_BASE="$unix_path"
29972  fi
29973
29974    if test -d "$WIN_SDK_BASE"; then
29975      # There have been cases of partial or broken SDK installations. A missing
29976      # lib dir is not going to work.
29977      if test ! -d "$WIN_SDK_BASE/lib"; then
29978        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29979$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29980        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
29981$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
29982      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
29983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29984$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29985        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
29986        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
29987          VS_ENV_ARGS="/x86"
29988        else
29989          VS_ENV_ARGS="/x64"
29990        fi
29991        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
29992        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
29993        # TODO: improve detection for other versions of SDK
29994        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
29995      else
29996        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
29997$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
29999$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30000      fi
30001    fi
30002  fi
30003
30004
30005  if test "x$VS_ENV_CMD" = x; then
30006    VS_VERSION="${VS_VERSION}"
30007    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30008    METHOD="well-known name"
30009
30010  windows_path="$WIN_SDK_BASE"
30011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30012    unix_path=`$CYGPATH -u "$windows_path"`
30013    WIN_SDK_BASE="$unix_path"
30014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30016    WIN_SDK_BASE="$unix_path"
30017  fi
30018
30019    if test -d "$WIN_SDK_BASE"; then
30020      # There have been cases of partial or broken SDK installations. A missing
30021      # lib dir is not going to work.
30022      if test ! -d "$WIN_SDK_BASE/lib"; then
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30024$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30026$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30027      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30029$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30030        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30031        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30032          VS_ENV_ARGS="/x86"
30033        else
30034          VS_ENV_ARGS="/x64"
30035        fi
30036        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30037        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30038        # TODO: improve detection for other versions of SDK
30039        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30040      else
30041        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30042$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30043        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30044$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30045      fi
30046    fi
30047  fi
30048
30049  fi
30050
30051    if test "x$VS_ENV_CMD" != x; then
30052      TOOLCHAIN_VERSION=$VS_VERSION
30053      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30054      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30055      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30056      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30057      # The rest of the variables are already evaled while probing
30058      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30059$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30060      break
30061    fi
30062  done
30063
30064
30065  # If we have a devkit, skip all of the below.
30066  if test "x$DEVKIT_VS_VERSION" = x; then
30067    if test "x$VS_ENV_CMD" != x; then
30068      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30069
30070  # Only process if variable expands to non-empty
30071
30072  if test "x$VS_ENV_CMD" != x; then
30073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30074
30075  # First separate the path from the arguments. This will split at the first
30076  # space.
30077  complete="$VS_ENV_CMD"
30078  path="${complete%% *}"
30079  tmp="$complete EOL"
30080  arguments="${tmp#* }"
30081
30082  # Input might be given as Windows format, start by converting to
30083  # unix format.
30084  new_path=`$CYGPATH -u "$path"`
30085
30086  # Now try to locate executable using which
30087  new_path=`$WHICH "$new_path" 2> /dev/null`
30088  # bat and cmd files are not always considered executable in cygwin causing which
30089  # to not find them
30090  if test "x$new_path" = x \
30091      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30092      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30093    new_path=`$CYGPATH -u "$path"`
30094  fi
30095  if test "x$new_path" = x; then
30096    # Oops. Which didn't find the executable.
30097    # The splitting of arguments from the executable at a space might have been incorrect,
30098    # since paths with space are more likely in Windows. Give it another try with the whole
30099    # argument.
30100    path="$complete"
30101    arguments="EOL"
30102    new_path=`$CYGPATH -u "$path"`
30103    new_path=`$WHICH "$new_path" 2> /dev/null`
30104    # bat and cmd files are not always considered executable in cygwin causing which
30105    # to not find them
30106    if test "x$new_path" = x \
30107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30109      new_path=`$CYGPATH -u "$path"`
30110    fi
30111    if test "x$new_path" = x; then
30112      # It's still not found. Now this is an unrecoverable error.
30113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30114$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30115      has_space=`$ECHO "$complete" | $GREP " "`
30116      if test "x$has_space" != x; then
30117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30119      fi
30120      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30121    fi
30122  fi
30123
30124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30127  # "foo.exe" is OK but "foo" is an error.
30128  #
30129  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30130  # It is also a way to make sure we got the proper file name for the real test later on.
30131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30132  if test "x$test_shortpath" = x; then
30133    # Short path failed, file does not exist as specified.
30134    # Try adding .exe or .cmd
30135    if test -f "${new_path}.exe"; then
30136      input_to_shortpath="${new_path}.exe"
30137    elif test -f "${new_path}.cmd"; then
30138      input_to_shortpath="${new_path}.cmd"
30139    else
30140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30141$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30142      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30143$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30144      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30145    fi
30146  else
30147    input_to_shortpath="$new_path"
30148  fi
30149
30150  # Call helper function which possibly converts this using DOS-style short mode.
30151  # If so, the updated path is stored in $new_path.
30152  new_path="$input_to_shortpath"
30153
30154  input_path="$input_to_shortpath"
30155  # Check if we need to convert this using DOS-style short mode. If the path
30156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30157  # take no chances and rewrite it.
30158  # Note: m4 eats our [], so we need to use [ and ] instead.
30159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30160  if test "x$has_forbidden_chars" != x; then
30161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30165      # Going to short mode and back again did indeed matter. Since short mode is
30166      # case insensitive, let's make it lowercase to improve readability.
30167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30168      # Now convert it back to Unix-style (cygpath)
30169      input_path=`$CYGPATH -u "$shortmode_path"`
30170      new_path="$input_path"
30171    fi
30172  fi
30173
30174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30175  if test "x$test_cygdrive_prefix" = x; then
30176    # As a simple fix, exclude /usr/bin since it's not a real path.
30177    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30179      # a path prefixed by /cygdrive for fixpath to work.
30180      new_path="$CYGWIN_ROOT_PATH$input_path"
30181    fi
30182  fi
30183
30184  # remove trailing .exe if any
30185  new_path="${new_path/%.exe/}"
30186
30187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30188
30189  # First separate the path from the arguments. This will split at the first
30190  # space.
30191  complete="$VS_ENV_CMD"
30192  path="${complete%% *}"
30193  tmp="$complete EOL"
30194  arguments="${tmp#* }"
30195
30196  # Input might be given as Windows format, start by converting to
30197  # unix format.
30198  new_path="$path"
30199
30200  windows_path="$new_path"
30201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30202    unix_path=`$CYGPATH -u "$windows_path"`
30203    new_path="$unix_path"
30204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30206    new_path="$unix_path"
30207  fi
30208
30209
30210  # Now try to locate executable using which
30211  new_path=`$WHICH "$new_path" 2> /dev/null`
30212
30213  if test "x$new_path" = x; then
30214    # Oops. Which didn't find the executable.
30215    # The splitting of arguments from the executable at a space might have been incorrect,
30216    # since paths with space are more likely in Windows. Give it another try with the whole
30217    # argument.
30218    path="$complete"
30219    arguments="EOL"
30220    new_path="$path"
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231
30232    new_path=`$WHICH "$new_path" 2> /dev/null`
30233    # bat and cmd files are not always considered executable in MSYS causing which
30234    # to not find them
30235    if test "x$new_path" = x \
30236        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30237        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30238      new_path="$path"
30239
30240  windows_path="$new_path"
30241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30242    unix_path=`$CYGPATH -u "$windows_path"`
30243    new_path="$unix_path"
30244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30246    new_path="$unix_path"
30247  fi
30248
30249    fi
30250
30251    if test "x$new_path" = x; then
30252      # It's still not found. Now this is an unrecoverable error.
30253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30254$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30255      has_space=`$ECHO "$complete" | $GREP " "`
30256      if test "x$has_space" != x; then
30257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30259      fi
30260      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30261    fi
30262  fi
30263
30264  # Now new_path has a complete unix path to the binary
30265  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30266    # Keep paths in /bin as-is, but remove trailing .exe if any
30267    new_path="${new_path/%.exe/}"
30268    # Do not save /bin paths to all_fixpath_prefixes!
30269  else
30270    # Not in mixed or Windows style, start by that.
30271    new_path=`cmd //c echo $new_path`
30272
30273  input_path="$new_path"
30274  # Check if we need to convert this using DOS-style short mode. If the path
30275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30276  # take no chances and rewrite it.
30277  # Note: m4 eats our [], so we need to use [ and ] instead.
30278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30279  if test "x$has_forbidden_chars" != x; then
30280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30282  fi
30283
30284    # Output is in $new_path
30285
30286  windows_path="$new_path"
30287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30288    unix_path=`$CYGPATH -u "$windows_path"`
30289    new_path="$unix_path"
30290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30292    new_path="$unix_path"
30293  fi
30294
30295    # remove trailing .exe if any
30296    new_path="${new_path/%.exe/}"
30297
30298    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30299    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30300  fi
30301
30302    else
30303      # We're on a unix platform. Hooray! :)
30304      # First separate the path from the arguments. This will split at the first
30305      # space.
30306      complete="$VS_ENV_CMD"
30307      path="${complete%% *}"
30308      tmp="$complete EOL"
30309      arguments="${tmp#* }"
30310
30311      # Cannot rely on the command "which" here since it doesn't always work.
30312      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30313      if test -z "$is_absolute_path"; then
30314        # Path to executable is not absolute. Find it.
30315        IFS_save="$IFS"
30316        IFS=:
30317        for p in $PATH; do
30318          if test -f "$p/$path" && test -x "$p/$path"; then
30319            new_path="$p/$path"
30320            break
30321          fi
30322        done
30323        IFS="$IFS_save"
30324      else
30325        # This is an absolute path, we can use it without further modifications.
30326        new_path="$path"
30327      fi
30328
30329      if test "x$new_path" = x; then
30330        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30331$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30332        has_space=`$ECHO "$complete" | $GREP " "`
30333        if test "x$has_space" != x; then
30334          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30335$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30336        fi
30337        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30338      fi
30339    fi
30340
30341    # Now join together the path and the arguments once again
30342    if test "x$arguments" != xEOL; then
30343      new_complete="$new_path ${arguments% *}"
30344    else
30345      new_complete="$new_path"
30346    fi
30347
30348    if test "x$complete" != "x$new_complete"; then
30349      VS_ENV_CMD="$new_complete"
30350      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30351$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30352    fi
30353  fi
30354
30355
30356      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30358$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30359
30360      # We need to create a couple of temporary files.
30361      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30362      $MKDIR -p $VS_ENV_TMP_DIR
30363
30364      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30365      # Instead create a shell script which will set the relevant variables when run.
30366      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30367
30368  unix_path="$WINPATH_VS_ENV_CMD"
30369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30370    windows_path=`$CYGPATH -m "$unix_path"`
30371    WINPATH_VS_ENV_CMD="$windows_path"
30372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30373    windows_path=`cmd //c echo $unix_path`
30374    WINPATH_VS_ENV_CMD="$windows_path"
30375  fi
30376
30377      WINPATH_BASH="$BASH"
30378
30379  unix_path="$WINPATH_BASH"
30380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30381    windows_path=`$CYGPATH -m "$unix_path"`
30382    WINPATH_BASH="$windows_path"
30383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30384    windows_path=`cmd //c echo $unix_path`
30385    WINPATH_BASH="$windows_path"
30386  fi
30387
30388
30389      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
30390      # script (executable by bash) that will setup the important variables.
30391      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
30392      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
30393      # This will end up something like:
30394      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
30395      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
30396      # These will end up something like:
30397      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
30398      # The trailing space for everyone except PATH is no typo, but is needed due
30399      # to trailing \ in the Windows paths. These will be stripped later.
30400      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
30401          >> $EXTRACT_VC_ENV_BAT_FILE
30402      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
30403          >> $EXTRACT_VC_ENV_BAT_FILE
30404      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
30405          >> $EXTRACT_VC_ENV_BAT_FILE
30406      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
30407          >> $EXTRACT_VC_ENV_BAT_FILE
30408      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
30409          >> $EXTRACT_VC_ENV_BAT_FILE
30410      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
30411          >> $EXTRACT_VC_ENV_BAT_FILE
30412
30413      # Now execute the newly created bat file.
30414      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
30415      # Change directory so we don't need to mess with Windows paths in redirects.
30416      cd $VS_ENV_TMP_DIR
30417      cmd /c extract-vs-env.bat | $CAT
30418      cd $CURDIR
30419
30420      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
30421        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
30422$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30424$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30425        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30426$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30427        as_fn_error $? "Cannot continue" "$LINENO" 5
30428      fi
30429
30430      # Now set all paths and other env variables. This will allow the rest of
30431      # the configure script to find and run the compiler in the proper way.
30432      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
30433$as_echo "$as_me: Setting extracted environment variables" >&6;}
30434      . $VS_ENV_TMP_DIR/set-vs-env.sh
30435      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
30436      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
30437    else
30438      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
30439      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
30440$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
30441    fi
30442  fi
30443
30444  # At this point, we should have correct variables in the environment, or we can't continue.
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
30446$as_echo_n "checking for Visual Studio variables... " >&6; }
30447
30448  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
30449      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
30450    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
30451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
30452$as_echo "present but broken" >&6; }
30453      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
30454    else
30455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30456$as_echo "ok" >&6; }
30457      # Remove any trailing "\" ";" and " " from the variables.
30458      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
30459      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
30460      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
30461      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
30462      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
30463      # Remove any paths containing # (typically F#) as that messes up make. This
30464      # is needed if visual studio was installed with F# support.
30465      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
30466
30467
30468
30469
30470
30471      # Convert VS_INCLUDE into SYSROOT_CFLAGS
30472      OLDIFS="$IFS"
30473      IFS=";"
30474      for i in $VS_INCLUDE; do
30475        ipath=$i
30476        # Only process non-empty elements
30477        if test "x$ipath" != x; then
30478          IFS="$OLDIFS"
30479          # Check that directory exists before calling fixup_path
30480          testpath=$ipath
30481
30482  windows_path="$testpath"
30483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30484    unix_path=`$CYGPATH -u "$windows_path"`
30485    testpath="$unix_path"
30486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30488    testpath="$unix_path"
30489  fi
30490
30491          if test -d "$testpath"; then
30492
30493  # Only process if variable expands to non-empty
30494
30495  if test "x$ipath" != x; then
30496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30497
30498  # Input might be given as Windows format, start by converting to
30499  # unix format.
30500  path="$ipath"
30501  new_path=`$CYGPATH -u "$path"`
30502
30503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30506  # "foo.exe" is OK but "foo" is an error.
30507  #
30508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30509  # It is also a way to make sure we got the proper file name for the real test later on.
30510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30511  if test "x$test_shortpath" = x; then
30512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30513$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30514    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
30515  fi
30516
30517  # Call helper function which possibly converts this using DOS-style short mode.
30518  # If so, the updated path is stored in $new_path.
30519
30520  input_path="$new_path"
30521  # Check if we need to convert this using DOS-style short mode. If the path
30522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30523  # take no chances and rewrite it.
30524  # Note: m4 eats our [], so we need to use [ and ] instead.
30525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30526  if test "x$has_forbidden_chars" != x; then
30527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30531      # Going to short mode and back again did indeed matter. Since short mode is
30532      # case insensitive, let's make it lowercase to improve readability.
30533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30534      # Now convert it back to Unix-style (cygpath)
30535      input_path=`$CYGPATH -u "$shortmode_path"`
30536      new_path="$input_path"
30537    fi
30538  fi
30539
30540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30541  if test "x$test_cygdrive_prefix" = x; then
30542    # As a simple fix, exclude /usr/bin since it's not a real path.
30543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30545      # a path prefixed by /cygdrive for fixpath to work.
30546      new_path="$CYGWIN_ROOT_PATH$input_path"
30547    fi
30548  fi
30549
30550
30551  if test "x$path" != "x$new_path"; then
30552    ipath="$new_path"
30553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30554$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30555  fi
30556
30557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30558
30559  path="$ipath"
30560  has_colon=`$ECHO $path | $GREP ^.:`
30561  new_path="$path"
30562  if test "x$has_colon" = x; then
30563    # Not in mixed or Windows style, start by that.
30564    new_path=`cmd //c echo $path`
30565  fi
30566
30567
30568  input_path="$new_path"
30569  # Check if we need to convert this using DOS-style short mode. If the path
30570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30571  # take no chances and rewrite it.
30572  # Note: m4 eats our [], so we need to use [ and ] instead.
30573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30574  if test "x$has_forbidden_chars" != x; then
30575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30577  fi
30578
30579
30580  windows_path="$new_path"
30581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30582    unix_path=`$CYGPATH -u "$windows_path"`
30583    new_path="$unix_path"
30584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30586    new_path="$unix_path"
30587  fi
30588
30589  if test "x$path" != "x$new_path"; then
30590    ipath="$new_path"
30591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
30592$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
30593  fi
30594
30595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30597
30598    else
30599      # We're on a unix platform. Hooray! :)
30600      path="$ipath"
30601      has_space=`$ECHO "$path" | $GREP " "`
30602      if test "x$has_space" != x; then
30603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
30604$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
30605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30606      fi
30607
30608      # Use eval to expand a potential ~
30609      eval path="$path"
30610      if test ! -f "$path" && test ! -d "$path"; then
30611        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
30612      fi
30613
30614      ipath="`cd "$path"; $THEPWDCMD -L`"
30615    fi
30616  fi
30617
30618            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
30619          fi
30620          IFS=";"
30621        fi
30622      done
30623      # Convert VS_LIB into SYSROOT_LDFLAGS
30624      for i in $VS_LIB; do
30625        libpath=$i
30626        # Only process non-empty elements
30627        if test "x$libpath" != x; then
30628          IFS="$OLDIFS"
30629          # Check that directory exists before calling fixup_path
30630          testpath=$libpath
30631
30632  windows_path="$testpath"
30633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30634    unix_path=`$CYGPATH -u "$windows_path"`
30635    testpath="$unix_path"
30636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30638    testpath="$unix_path"
30639  fi
30640
30641          if test -d "$testpath"; then
30642
30643  # Only process if variable expands to non-empty
30644
30645  if test "x$libpath" != x; then
30646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30647
30648  # Input might be given as Windows format, start by converting to
30649  # unix format.
30650  path="$libpath"
30651  new_path=`$CYGPATH -u "$path"`
30652
30653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30656  # "foo.exe" is OK but "foo" is an error.
30657  #
30658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30659  # It is also a way to make sure we got the proper file name for the real test later on.
30660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30661  if test "x$test_shortpath" = x; then
30662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30663$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30664    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
30665  fi
30666
30667  # Call helper function which possibly converts this using DOS-style short mode.
30668  # If so, the updated path is stored in $new_path.
30669
30670  input_path="$new_path"
30671  # Check if we need to convert this using DOS-style short mode. If the path
30672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30673  # take no chances and rewrite it.
30674  # Note: m4 eats our [], so we need to use [ and ] instead.
30675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30676  if test "x$has_forbidden_chars" != x; then
30677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30681      # Going to short mode and back again did indeed matter. Since short mode is
30682      # case insensitive, let's make it lowercase to improve readability.
30683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30684      # Now convert it back to Unix-style (cygpath)
30685      input_path=`$CYGPATH -u "$shortmode_path"`
30686      new_path="$input_path"
30687    fi
30688  fi
30689
30690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30691  if test "x$test_cygdrive_prefix" = x; then
30692    # As a simple fix, exclude /usr/bin since it's not a real path.
30693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30695      # a path prefixed by /cygdrive for fixpath to work.
30696      new_path="$CYGWIN_ROOT_PATH$input_path"
30697    fi
30698  fi
30699
30700
30701  if test "x$path" != "x$new_path"; then
30702    libpath="$new_path"
30703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30704$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30705  fi
30706
30707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30708
30709  path="$libpath"
30710  has_colon=`$ECHO $path | $GREP ^.:`
30711  new_path="$path"
30712  if test "x$has_colon" = x; then
30713    # Not in mixed or Windows style, start by that.
30714    new_path=`cmd //c echo $path`
30715  fi
30716
30717
30718  input_path="$new_path"
30719  # Check if we need to convert this using DOS-style short mode. If the path
30720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30721  # take no chances and rewrite it.
30722  # Note: m4 eats our [], so we need to use [ and ] instead.
30723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30724  if test "x$has_forbidden_chars" != x; then
30725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30727  fi
30728
30729
30730  windows_path="$new_path"
30731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30732    unix_path=`$CYGPATH -u "$windows_path"`
30733    new_path="$unix_path"
30734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30736    new_path="$unix_path"
30737  fi
30738
30739  if test "x$path" != "x$new_path"; then
30740    libpath="$new_path"
30741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
30742$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
30743  fi
30744
30745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30747
30748    else
30749      # We're on a unix platform. Hooray! :)
30750      path="$libpath"
30751      has_space=`$ECHO "$path" | $GREP " "`
30752      if test "x$has_space" != x; then
30753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
30754$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
30755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30756      fi
30757
30758      # Use eval to expand a potential ~
30759      eval path="$path"
30760      if test ! -f "$path" && test ! -d "$path"; then
30761        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
30762      fi
30763
30764      libpath="`cd "$path"; $THEPWDCMD -L`"
30765    fi
30766  fi
30767
30768            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
30769          fi
30770          IFS=";"
30771        fi
30772      done
30773      IFS="$OLDIFS"
30774    fi
30775  else
30776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30777$as_echo "not found" >&6; }
30778
30779    if test "x$VS_ENV_CMD" = x; then
30780      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
30781$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
30782      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
30783$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
30784    else
30785      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
30786$as_echo "$as_me: Running the extraction script failed." >&6;}
30787    fi
30788    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
30789$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
30790    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
30791$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
30792    as_fn_error $? "Cannot continue" "$LINENO" 5
30793  fi
30794
30795    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
30796    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
30797    PATH="$VS_PATH"
30798    # The microsoft toolchain also requires INCLUDE and LIB to be set.
30799    export INCLUDE="$VS_INCLUDE"
30800    export LIB="$VS_LIB"
30801  fi
30802
30803  # For solaris we really need solaris tools, and not the GNU equivalent.
30804  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
30805  # so add that to path before starting to probe.
30806  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
30807  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
30808    PATH="/usr/ccs/bin:$PATH"
30809  fi
30810
30811  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
30812  # override all other locations.
30813  if test "x$TOOLCHAIN_PATH" != x; then
30814    PATH=$TOOLCHAIN_PATH:$PATH
30815  fi
30816
30817
30818  #
30819  # Setup the compilers (CC and CXX)
30820  #
30821
30822  COMPILER_NAME=C
30823  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
30824
30825  if test "x$CC" != x; then
30826    # User has supplied compiler name already, always let that override.
30827    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
30828$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
30829    if test "x`basename $CC`" = "x$CC"; then
30830      # A command without a complete path is provided, search $PATH.
30831
30832      for ac_prog in $CC
30833do
30834  # Extract the first word of "$ac_prog", so it can be a program name with args.
30835set dummy $ac_prog; ac_word=$2
30836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30837$as_echo_n "checking for $ac_word... " >&6; }
30838if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30839  $as_echo_n "(cached) " >&6
30840else
30841  case $POTENTIAL_CC in
30842  [\\/]* | ?:[\\/]*)
30843  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30844  ;;
30845  *)
30846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30847for as_dir in $PATH
30848do
30849  IFS=$as_save_IFS
30850  test -z "$as_dir" && as_dir=.
30851    for ac_exec_ext in '' $ac_executable_extensions; do
30852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30853    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30855    break 2
30856  fi
30857done
30858  done
30859IFS=$as_save_IFS
30860
30861  ;;
30862esac
30863fi
30864POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30865if test -n "$POTENTIAL_CC"; then
30866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30867$as_echo "$POTENTIAL_CC" >&6; }
30868else
30869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30870$as_echo "no" >&6; }
30871fi
30872
30873
30874  test -n "$POTENTIAL_CC" && break
30875done
30876
30877      if test "x$POTENTIAL_CC" != x; then
30878        CC=$POTENTIAL_CC
30879      else
30880        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
30881      fi
30882    else
30883      # Otherwise it might already be a complete path
30884      if test ! -x "$CC"; then
30885        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
30886      fi
30887    fi
30888  else
30889    # No user supplied value. Locate compiler ourselves.
30890
30891    # If we are cross compiling, assume cross compilation tools follows the
30892    # cross compilation standard where they are prefixed with the autoconf
30893    # standard name for the target. For example the binary
30894    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30895    # If we are not cross compiling, then the default compiler name will be
30896    # used.
30897
30898    CC=
30899    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30900    # before checking the rest of the PATH.
30901    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30902    # step, this should not be necessary.
30903    if test -n "$TOOLCHAIN_PATH"; then
30904      PATH_save="$PATH"
30905      PATH="$TOOLCHAIN_PATH"
30906      for ac_prog in $SEARCH_LIST
30907do
30908  # Extract the first word of "$ac_prog", so it can be a program name with args.
30909set dummy $ac_prog; ac_word=$2
30910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30911$as_echo_n "checking for $ac_word... " >&6; }
30912if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
30913  $as_echo_n "(cached) " >&6
30914else
30915  case $TOOLCHAIN_PATH_CC in
30916  [\\/]* | ?:[\\/]*)
30917  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
30918  ;;
30919  *)
30920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30921for as_dir in $PATH
30922do
30923  IFS=$as_save_IFS
30924  test -z "$as_dir" && as_dir=.
30925    for ac_exec_ext in '' $ac_executable_extensions; do
30926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30927    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
30928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30929    break 2
30930  fi
30931done
30932  done
30933IFS=$as_save_IFS
30934
30935  ;;
30936esac
30937fi
30938TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
30939if test -n "$TOOLCHAIN_PATH_CC"; then
30940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
30941$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
30942else
30943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30944$as_echo "no" >&6; }
30945fi
30946
30947
30948  test -n "$TOOLCHAIN_PATH_CC" && break
30949done
30950
30951      CC=$TOOLCHAIN_PATH_CC
30952      PATH="$PATH_save"
30953    fi
30954
30955    # AC_PATH_PROGS can't be run multiple times with the same variable,
30956    # so create a new name for this run.
30957    if test "x$CC" = x; then
30958      for ac_prog in $SEARCH_LIST
30959do
30960  # Extract the first word of "$ac_prog", so it can be a program name with args.
30961set dummy $ac_prog; ac_word=$2
30962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30963$as_echo_n "checking for $ac_word... " >&6; }
30964if ${ac_cv_path_POTENTIAL_CC+:} false; then :
30965  $as_echo_n "(cached) " >&6
30966else
30967  case $POTENTIAL_CC in
30968  [\\/]* | ?:[\\/]*)
30969  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
30970  ;;
30971  *)
30972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30973for as_dir in $PATH
30974do
30975  IFS=$as_save_IFS
30976  test -z "$as_dir" && as_dir=.
30977    for ac_exec_ext in '' $ac_executable_extensions; do
30978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30979    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
30980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30981    break 2
30982  fi
30983done
30984  done
30985IFS=$as_save_IFS
30986
30987  ;;
30988esac
30989fi
30990POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
30991if test -n "$POTENTIAL_CC"; then
30992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
30993$as_echo "$POTENTIAL_CC" >&6; }
30994else
30995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30996$as_echo "no" >&6; }
30997fi
30998
30999
31000  test -n "$POTENTIAL_CC" && break
31001done
31002
31003      CC=$POTENTIAL_CC
31004    fi
31005
31006    if test "x$CC" = x; then
31007
31008  # Print a helpful message on how to acquire the necessary build dependency.
31009  # devkit is the help tag: freetype, cups, alsa etc
31010  MISSING_DEPENDENCY=devkit
31011
31012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31013    cygwin_help $MISSING_DEPENDENCY
31014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31015    msys_help $MISSING_DEPENDENCY
31016  else
31017    PKGHANDLER_COMMAND=
31018
31019    case $PKGHANDLER in
31020      apt-get)
31021        apt_help     $MISSING_DEPENDENCY ;;
31022      yum)
31023        yum_help     $MISSING_DEPENDENCY ;;
31024      port)
31025        port_help    $MISSING_DEPENDENCY ;;
31026      pkgutil)
31027        pkgutil_help $MISSING_DEPENDENCY ;;
31028      pkgadd)
31029        pkgadd_help  $MISSING_DEPENDENCY ;;
31030    esac
31031
31032    if test "x$PKGHANDLER_COMMAND" != x; then
31033      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31034    fi
31035  fi
31036
31037      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31038    fi
31039  fi
31040
31041  # Now we have a compiler binary in CC. Make sure it's okay.
31042
31043  # Only process if variable expands to non-empty
31044
31045  if test "x$CC" != x; then
31046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31047
31048  # First separate the path from the arguments. This will split at the first
31049  # space.
31050  complete="$CC"
31051  path="${complete%% *}"
31052  tmp="$complete EOL"
31053  arguments="${tmp#* }"
31054
31055  # Input might be given as Windows format, start by converting to
31056  # unix format.
31057  new_path=`$CYGPATH -u "$path"`
31058
31059  # Now try to locate executable using which
31060  new_path=`$WHICH "$new_path" 2> /dev/null`
31061  # bat and cmd files are not always considered executable in cygwin causing which
31062  # to not find them
31063  if test "x$new_path" = x \
31064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31066    new_path=`$CYGPATH -u "$path"`
31067  fi
31068  if test "x$new_path" = x; then
31069    # Oops. Which didn't find the executable.
31070    # The splitting of arguments from the executable at a space might have been incorrect,
31071    # since paths with space are more likely in Windows. Give it another try with the whole
31072    # argument.
31073    path="$complete"
31074    arguments="EOL"
31075    new_path=`$CYGPATH -u "$path"`
31076    new_path=`$WHICH "$new_path" 2> /dev/null`
31077    # bat and cmd files are not always considered executable in cygwin causing which
31078    # to not find them
31079    if test "x$new_path" = x \
31080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31082      new_path=`$CYGPATH -u "$path"`
31083    fi
31084    if test "x$new_path" = x; then
31085      # It's still not found. Now this is an unrecoverable error.
31086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31087$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31088      has_space=`$ECHO "$complete" | $GREP " "`
31089      if test "x$has_space" != x; then
31090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31092      fi
31093      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31094    fi
31095  fi
31096
31097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31100  # "foo.exe" is OK but "foo" is an error.
31101  #
31102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31103  # It is also a way to make sure we got the proper file name for the real test later on.
31104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31105  if test "x$test_shortpath" = x; then
31106    # Short path failed, file does not exist as specified.
31107    # Try adding .exe or .cmd
31108    if test -f "${new_path}.exe"; then
31109      input_to_shortpath="${new_path}.exe"
31110    elif test -f "${new_path}.cmd"; then
31111      input_to_shortpath="${new_path}.cmd"
31112    else
31113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31114$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31117      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31118    fi
31119  else
31120    input_to_shortpath="$new_path"
31121  fi
31122
31123  # Call helper function which possibly converts this using DOS-style short mode.
31124  # If so, the updated path is stored in $new_path.
31125  new_path="$input_to_shortpath"
31126
31127  input_path="$input_to_shortpath"
31128  # Check if we need to convert this using DOS-style short mode. If the path
31129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31130  # take no chances and rewrite it.
31131  # Note: m4 eats our [], so we need to use [ and ] instead.
31132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31133  if test "x$has_forbidden_chars" != x; then
31134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31138      # Going to short mode and back again did indeed matter. Since short mode is
31139      # case insensitive, let's make it lowercase to improve readability.
31140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31141      # Now convert it back to Unix-style (cygpath)
31142      input_path=`$CYGPATH -u "$shortmode_path"`
31143      new_path="$input_path"
31144    fi
31145  fi
31146
31147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31148  if test "x$test_cygdrive_prefix" = x; then
31149    # As a simple fix, exclude /usr/bin since it's not a real path.
31150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31152      # a path prefixed by /cygdrive for fixpath to work.
31153      new_path="$CYGWIN_ROOT_PATH$input_path"
31154    fi
31155  fi
31156
31157  # remove trailing .exe if any
31158  new_path="${new_path/%.exe/}"
31159
31160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31161
31162  # First separate the path from the arguments. This will split at the first
31163  # space.
31164  complete="$CC"
31165  path="${complete%% *}"
31166  tmp="$complete EOL"
31167  arguments="${tmp#* }"
31168
31169  # Input might be given as Windows format, start by converting to
31170  # unix format.
31171  new_path="$path"
31172
31173  windows_path="$new_path"
31174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31175    unix_path=`$CYGPATH -u "$windows_path"`
31176    new_path="$unix_path"
31177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31179    new_path="$unix_path"
31180  fi
31181
31182
31183  # Now try to locate executable using which
31184  new_path=`$WHICH "$new_path" 2> /dev/null`
31185
31186  if test "x$new_path" = x; then
31187    # Oops. Which didn't find the executable.
31188    # The splitting of arguments from the executable at a space might have been incorrect,
31189    # since paths with space are more likely in Windows. Give it another try with the whole
31190    # argument.
31191    path="$complete"
31192    arguments="EOL"
31193    new_path="$path"
31194
31195  windows_path="$new_path"
31196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31197    unix_path=`$CYGPATH -u "$windows_path"`
31198    new_path="$unix_path"
31199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31201    new_path="$unix_path"
31202  fi
31203
31204
31205    new_path=`$WHICH "$new_path" 2> /dev/null`
31206    # bat and cmd files are not always considered executable in MSYS causing which
31207    # to not find them
31208    if test "x$new_path" = x \
31209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31211      new_path="$path"
31212
31213  windows_path="$new_path"
31214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31215    unix_path=`$CYGPATH -u "$windows_path"`
31216    new_path="$unix_path"
31217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31219    new_path="$unix_path"
31220  fi
31221
31222    fi
31223
31224    if test "x$new_path" = x; then
31225      # It's still not found. Now this is an unrecoverable error.
31226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31227$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31228      has_space=`$ECHO "$complete" | $GREP " "`
31229      if test "x$has_space" != x; then
31230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31232      fi
31233      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31234    fi
31235  fi
31236
31237  # Now new_path has a complete unix path to the binary
31238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31239    # Keep paths in /bin as-is, but remove trailing .exe if any
31240    new_path="${new_path/%.exe/}"
31241    # Do not save /bin paths to all_fixpath_prefixes!
31242  else
31243    # Not in mixed or Windows style, start by that.
31244    new_path=`cmd //c echo $new_path`
31245
31246  input_path="$new_path"
31247  # Check if we need to convert this using DOS-style short mode. If the path
31248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31249  # take no chances and rewrite it.
31250  # Note: m4 eats our [], so we need to use [ and ] instead.
31251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31252  if test "x$has_forbidden_chars" != x; then
31253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31255  fi
31256
31257    # Output is in $new_path
31258
31259  windows_path="$new_path"
31260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31261    unix_path=`$CYGPATH -u "$windows_path"`
31262    new_path="$unix_path"
31263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31265    new_path="$unix_path"
31266  fi
31267
31268    # remove trailing .exe if any
31269    new_path="${new_path/%.exe/}"
31270
31271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31273  fi
31274
31275    else
31276      # We're on a unix platform. Hooray! :)
31277      # First separate the path from the arguments. This will split at the first
31278      # space.
31279      complete="$CC"
31280      path="${complete%% *}"
31281      tmp="$complete EOL"
31282      arguments="${tmp#* }"
31283
31284      # Cannot rely on the command "which" here since it doesn't always work.
31285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31286      if test -z "$is_absolute_path"; then
31287        # Path to executable is not absolute. Find it.
31288        IFS_save="$IFS"
31289        IFS=:
31290        for p in $PATH; do
31291          if test -f "$p/$path" && test -x "$p/$path"; then
31292            new_path="$p/$path"
31293            break
31294          fi
31295        done
31296        IFS="$IFS_save"
31297      else
31298        # This is an absolute path, we can use it without further modifications.
31299        new_path="$path"
31300      fi
31301
31302      if test "x$new_path" = x; then
31303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31304$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31305        has_space=`$ECHO "$complete" | $GREP " "`
31306        if test "x$has_space" != x; then
31307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31309        fi
31310        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31311      fi
31312    fi
31313
31314    # Now join together the path and the arguments once again
31315    if test "x$arguments" != xEOL; then
31316      new_complete="$new_path ${arguments% *}"
31317    else
31318      new_complete="$new_path"
31319    fi
31320
31321    if test "x$complete" != "x$new_complete"; then
31322      CC="$new_complete"
31323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31324$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31325    fi
31326  fi
31327
31328  TEST_COMPILER="$CC"
31329  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31330  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31331  if test "x$OPENJDK_BUILD_OS" != xaix; then
31332    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31333    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31334$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31335
31336  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31337    # Follow a chain of symbolic links. Use readlink
31338    # where it exists, else fall back to horribly
31339    # complicated shell code.
31340    if test "x$READLINK_TESTED" != yes; then
31341      # On MacOSX there is a readlink tool with a different
31342      # purpose than the GNU readlink tool. Check the found readlink.
31343      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31344      if test "x$ISGNU" = x; then
31345        # A readlink that we do not know how to use.
31346        # Are there other non-GNU readlinks out there?
31347        READLINK_TESTED=yes
31348        READLINK=
31349      fi
31350    fi
31351
31352    if test "x$READLINK" != x; then
31353      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31354    else
31355      # Save the current directory for restoring afterwards
31356      STARTDIR=$PWD
31357      COUNTER=0
31358      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31359      sym_link_file=`$BASENAME $TEST_COMPILER`
31360      cd $sym_link_dir
31361      # Use -P flag to resolve symlinks in directories.
31362      cd `$THEPWDCMD -P`
31363      sym_link_dir=`$THEPWDCMD -P`
31364      # Resolve file symlinks
31365      while test $COUNTER -lt 20; do
31366        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31367        if test "x$ISLINK" == x; then
31368          # This is not a symbolic link! We are done!
31369          break
31370        fi
31371        # Again resolve directory symlinks since the target of the just found
31372        # link could be in a different directory
31373        cd `$DIRNAME $ISLINK`
31374        sym_link_dir=`$THEPWDCMD -P`
31375        sym_link_file=`$BASENAME $ISLINK`
31376        let COUNTER=COUNTER+1
31377      done
31378      cd $STARTDIR
31379      TEST_COMPILER=$sym_link_dir/$sym_link_file
31380    fi
31381  fi
31382
31383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31384$as_echo "$TEST_COMPILER" >&6; }
31385  fi
31386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
31387$as_echo_n "checking if CC is disguised ccache... " >&6; }
31388
31389  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31390  if test "x$COMPILER_BASENAME" = "xccache"; then
31391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31392$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31393    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31394    # We want to control ccache invocation ourselves, so ignore this cc and try
31395    # searching again.
31396
31397    # Remove the path to the fake ccache cc from the PATH
31398    RETRY_COMPILER_SAVED_PATH="$PATH"
31399    COMPILER_DIRNAME=`$DIRNAME $CC`
31400    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31401
31402    # Try again looking for our compiler
31403    if test -n "$ac_tool_prefix"; then
31404  for ac_prog in $TOOLCHAIN_CC_BINARY
31405  do
31406    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31407set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31409$as_echo_n "checking for $ac_word... " >&6; }
31410if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
31411  $as_echo_n "(cached) " >&6
31412else
31413  if test -n "$PROPER_COMPILER_CC"; then
31414  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
31415else
31416as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31417for as_dir in $PATH
31418do
31419  IFS=$as_save_IFS
31420  test -z "$as_dir" && as_dir=.
31421    for ac_exec_ext in '' $ac_executable_extensions; do
31422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31423    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
31424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31425    break 2
31426  fi
31427done
31428  done
31429IFS=$as_save_IFS
31430
31431fi
31432fi
31433PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
31434if test -n "$PROPER_COMPILER_CC"; then
31435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31436$as_echo "$PROPER_COMPILER_CC" >&6; }
31437else
31438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31439$as_echo "no" >&6; }
31440fi
31441
31442
31443    test -n "$PROPER_COMPILER_CC" && break
31444  done
31445fi
31446if test -z "$PROPER_COMPILER_CC"; then
31447  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
31448  for ac_prog in $TOOLCHAIN_CC_BINARY
31449do
31450  # Extract the first word of "$ac_prog", so it can be a program name with args.
31451set dummy $ac_prog; ac_word=$2
31452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31453$as_echo_n "checking for $ac_word... " >&6; }
31454if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
31455  $as_echo_n "(cached) " >&6
31456else
31457  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31458  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
31459else
31460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31461for as_dir in $PATH
31462do
31463  IFS=$as_save_IFS
31464  test -z "$as_dir" && as_dir=.
31465    for ac_exec_ext in '' $ac_executable_extensions; do
31466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31467    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
31468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31469    break 2
31470  fi
31471done
31472  done
31473IFS=$as_save_IFS
31474
31475fi
31476fi
31477ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
31478if test -n "$ac_ct_PROPER_COMPILER_CC"; then
31479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
31480$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
31481else
31482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31483$as_echo "no" >&6; }
31484fi
31485
31486
31487  test -n "$ac_ct_PROPER_COMPILER_CC" && break
31488done
31489
31490  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
31491    PROPER_COMPILER_CC=""
31492  else
31493    case $cross_compiling:$ac_tool_warned in
31494yes:)
31495{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31496$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31497ac_tool_warned=yes ;;
31498esac
31499    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
31500  fi
31501fi
31502
31503
31504  # Only process if variable expands to non-empty
31505
31506  if test "x$PROPER_COMPILER_CC" != x; then
31507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31508
31509  # First separate the path from the arguments. This will split at the first
31510  # space.
31511  complete="$PROPER_COMPILER_CC"
31512  path="${complete%% *}"
31513  tmp="$complete EOL"
31514  arguments="${tmp#* }"
31515
31516  # Input might be given as Windows format, start by converting to
31517  # unix format.
31518  new_path=`$CYGPATH -u "$path"`
31519
31520  # Now try to locate executable using which
31521  new_path=`$WHICH "$new_path" 2> /dev/null`
31522  # bat and cmd files are not always considered executable in cygwin causing which
31523  # to not find them
31524  if test "x$new_path" = x \
31525      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31526      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31527    new_path=`$CYGPATH -u "$path"`
31528  fi
31529  if test "x$new_path" = x; then
31530    # Oops. Which didn't find the executable.
31531    # The splitting of arguments from the executable at a space might have been incorrect,
31532    # since paths with space are more likely in Windows. Give it another try with the whole
31533    # argument.
31534    path="$complete"
31535    arguments="EOL"
31536    new_path=`$CYGPATH -u "$path"`
31537    new_path=`$WHICH "$new_path" 2> /dev/null`
31538    # bat and cmd files are not always considered executable in cygwin causing which
31539    # to not find them
31540    if test "x$new_path" = x \
31541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31543      new_path=`$CYGPATH -u "$path"`
31544    fi
31545    if test "x$new_path" = x; then
31546      # It's still not found. Now this is an unrecoverable error.
31547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31548$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31549      has_space=`$ECHO "$complete" | $GREP " "`
31550      if test "x$has_space" != x; then
31551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31553      fi
31554      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31555    fi
31556  fi
31557
31558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31561  # "foo.exe" is OK but "foo" is an error.
31562  #
31563  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31564  # It is also a way to make sure we got the proper file name for the real test later on.
31565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31566  if test "x$test_shortpath" = x; then
31567    # Short path failed, file does not exist as specified.
31568    # Try adding .exe or .cmd
31569    if test -f "${new_path}.exe"; then
31570      input_to_shortpath="${new_path}.exe"
31571    elif test -f "${new_path}.cmd"; then
31572      input_to_shortpath="${new_path}.cmd"
31573    else
31574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
31575$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31578      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31579    fi
31580  else
31581    input_to_shortpath="$new_path"
31582  fi
31583
31584  # Call helper function which possibly converts this using DOS-style short mode.
31585  # If so, the updated path is stored in $new_path.
31586  new_path="$input_to_shortpath"
31587
31588  input_path="$input_to_shortpath"
31589  # Check if we need to convert this using DOS-style short mode. If the path
31590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31591  # take no chances and rewrite it.
31592  # Note: m4 eats our [], so we need to use [ and ] instead.
31593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31594  if test "x$has_forbidden_chars" != x; then
31595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31599      # Going to short mode and back again did indeed matter. Since short mode is
31600      # case insensitive, let's make it lowercase to improve readability.
31601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31602      # Now convert it back to Unix-style (cygpath)
31603      input_path=`$CYGPATH -u "$shortmode_path"`
31604      new_path="$input_path"
31605    fi
31606  fi
31607
31608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31609  if test "x$test_cygdrive_prefix" = x; then
31610    # As a simple fix, exclude /usr/bin since it's not a real path.
31611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31613      # a path prefixed by /cygdrive for fixpath to work.
31614      new_path="$CYGWIN_ROOT_PATH$input_path"
31615    fi
31616  fi
31617
31618  # remove trailing .exe if any
31619  new_path="${new_path/%.exe/}"
31620
31621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622
31623  # First separate the path from the arguments. This will split at the first
31624  # space.
31625  complete="$PROPER_COMPILER_CC"
31626  path="${complete%% *}"
31627  tmp="$complete EOL"
31628  arguments="${tmp#* }"
31629
31630  # Input might be given as Windows format, start by converting to
31631  # unix format.
31632  new_path="$path"
31633
31634  windows_path="$new_path"
31635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31636    unix_path=`$CYGPATH -u "$windows_path"`
31637    new_path="$unix_path"
31638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31640    new_path="$unix_path"
31641  fi
31642
31643
31644  # Now try to locate executable using which
31645  new_path=`$WHICH "$new_path" 2> /dev/null`
31646
31647  if test "x$new_path" = x; then
31648    # Oops. Which didn't find the executable.
31649    # The splitting of arguments from the executable at a space might have been incorrect,
31650    # since paths with space are more likely in Windows. Give it another try with the whole
31651    # argument.
31652    path="$complete"
31653    arguments="EOL"
31654    new_path="$path"
31655
31656  windows_path="$new_path"
31657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31658    unix_path=`$CYGPATH -u "$windows_path"`
31659    new_path="$unix_path"
31660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31662    new_path="$unix_path"
31663  fi
31664
31665
31666    new_path=`$WHICH "$new_path" 2> /dev/null`
31667    # bat and cmd files are not always considered executable in MSYS causing which
31668    # to not find them
31669    if test "x$new_path" = x \
31670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31672      new_path="$path"
31673
31674  windows_path="$new_path"
31675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31676    unix_path=`$CYGPATH -u "$windows_path"`
31677    new_path="$unix_path"
31678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31680    new_path="$unix_path"
31681  fi
31682
31683    fi
31684
31685    if test "x$new_path" = x; then
31686      # It's still not found. Now this is an unrecoverable error.
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31688$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31689      has_space=`$ECHO "$complete" | $GREP " "`
31690      if test "x$has_space" != x; then
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31693      fi
31694      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31695    fi
31696  fi
31697
31698  # Now new_path has a complete unix path to the binary
31699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31700    # Keep paths in /bin as-is, but remove trailing .exe if any
31701    new_path="${new_path/%.exe/}"
31702    # Do not save /bin paths to all_fixpath_prefixes!
31703  else
31704    # Not in mixed or Windows style, start by that.
31705    new_path=`cmd //c echo $new_path`
31706
31707  input_path="$new_path"
31708  # Check if we need to convert this using DOS-style short mode. If the path
31709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31710  # take no chances and rewrite it.
31711  # Note: m4 eats our [], so we need to use [ and ] instead.
31712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31713  if test "x$has_forbidden_chars" != x; then
31714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31716  fi
31717
31718    # Output is in $new_path
31719
31720  windows_path="$new_path"
31721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31722    unix_path=`$CYGPATH -u "$windows_path"`
31723    new_path="$unix_path"
31724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31726    new_path="$unix_path"
31727  fi
31728
31729    # remove trailing .exe if any
31730    new_path="${new_path/%.exe/}"
31731
31732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31734  fi
31735
31736    else
31737      # We're on a unix platform. Hooray! :)
31738      # First separate the path from the arguments. This will split at the first
31739      # space.
31740      complete="$PROPER_COMPILER_CC"
31741      path="${complete%% *}"
31742      tmp="$complete EOL"
31743      arguments="${tmp#* }"
31744
31745      # Cannot rely on the command "which" here since it doesn't always work.
31746      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31747      if test -z "$is_absolute_path"; then
31748        # Path to executable is not absolute. Find it.
31749        IFS_save="$IFS"
31750        IFS=:
31751        for p in $PATH; do
31752          if test -f "$p/$path" && test -x "$p/$path"; then
31753            new_path="$p/$path"
31754            break
31755          fi
31756        done
31757        IFS="$IFS_save"
31758      else
31759        # This is an absolute path, we can use it without further modifications.
31760        new_path="$path"
31761      fi
31762
31763      if test "x$new_path" = x; then
31764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
31765$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
31766        has_space=`$ECHO "$complete" | $GREP " "`
31767        if test "x$has_space" != x; then
31768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31770        fi
31771        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
31772      fi
31773    fi
31774
31775    # Now join together the path and the arguments once again
31776    if test "x$arguments" != xEOL; then
31777      new_complete="$new_path ${arguments% *}"
31778    else
31779      new_complete="$new_path"
31780    fi
31781
31782    if test "x$complete" != "x$new_complete"; then
31783      PROPER_COMPILER_CC="$new_complete"
31784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
31785$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
31786    fi
31787  fi
31788
31789    PATH="$RETRY_COMPILER_SAVED_PATH"
31790
31791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
31792$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
31793
31794  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31795    # Follow a chain of symbolic links. Use readlink
31796    # where it exists, else fall back to horribly
31797    # complicated shell code.
31798    if test "x$READLINK_TESTED" != yes; then
31799      # On MacOSX there is a readlink tool with a different
31800      # purpose than the GNU readlink tool. Check the found readlink.
31801      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31802      if test "x$ISGNU" = x; then
31803        # A readlink that we do not know how to use.
31804        # Are there other non-GNU readlinks out there?
31805        READLINK_TESTED=yes
31806        READLINK=
31807      fi
31808    fi
31809
31810    if test "x$READLINK" != x; then
31811      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
31812    else
31813      # Save the current directory for restoring afterwards
31814      STARTDIR=$PWD
31815      COUNTER=0
31816      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
31817      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
31818      cd $sym_link_dir
31819      # Use -P flag to resolve symlinks in directories.
31820      cd `$THEPWDCMD -P`
31821      sym_link_dir=`$THEPWDCMD -P`
31822      # Resolve file symlinks
31823      while test $COUNTER -lt 20; do
31824        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31825        if test "x$ISLINK" == x; then
31826          # This is not a symbolic link! We are done!
31827          break
31828        fi
31829        # Again resolve directory symlinks since the target of the just found
31830        # link could be in a different directory
31831        cd `$DIRNAME $ISLINK`
31832        sym_link_dir=`$THEPWDCMD -P`
31833        sym_link_file=`$BASENAME $ISLINK`
31834        let COUNTER=COUNTER+1
31835      done
31836      cd $STARTDIR
31837      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
31838    fi
31839  fi
31840
31841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
31842$as_echo "$PROPER_COMPILER_CC" >&6; }
31843    CC="$PROPER_COMPILER_CC"
31844  else
31845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
31846$as_echo "no, keeping CC" >&6; }
31847  fi
31848
31849
31850  COMPILER=$CC
31851  COMPILER_NAME=$COMPILER_NAME
31852
31853  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31854    # cc -V output typically looks like
31855    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31856    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31857    # Check that this is likely to be the Solaris Studio cc.
31858    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31859    if test $? -ne 0; then
31860      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31861      { $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
31862$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31863      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31864$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31865      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31866$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31867      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31868    fi
31869    # Remove usage instructions (if present), and
31870    # collapse compiler output into a single line
31871    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31872        $SED -e 's/ *[Uu]sage:.*//'`
31873    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31874        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31875  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31876    # xlc -qversion output typically looks like
31877    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31878    #     Version: 11.01.0000.0015
31879    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31880    # Check that this is likely to be the IBM XL C compiler.
31881    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31882    if test $? -ne 0; then
31883      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31884      { $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
31885$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31886      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31887$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31888      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31889$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31890      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31891    fi
31892    # Collapse compiler output into a single line
31893    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31894    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31895        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31896  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31897    # There is no specific version flag, but all output starts with a version string.
31898    # First line typically looks something like:
31899    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31900    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31901    # Check that this is likely to be Microsoft CL.EXE.
31902    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31903    if test $? -ne 0; then
31904      { $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
31905$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31906      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31907$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31908      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31909    fi
31910    # Collapse compiler output into a single line
31911    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31912    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31913        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31914  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31915    # gcc --version output typically looks like
31916    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31917    #     Copyright (C) 2013 Free Software Foundation, Inc.
31918    #     This is free software; see the source for copying conditions.  There is NO
31919    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31920    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31921    # Check that this is likely to be GCC.
31922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31923    if test $? -ne 0; then
31924      { $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
31925$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31927$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31929    fi
31930    # Remove Copyright and legalese from version string, and
31931    # collapse into a single line
31932    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31933        $SED -e 's/ *Copyright .*//'`
31934    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31935        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31936  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31937    # clang --version output typically looks like
31938    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31939    #    clang version 3.3 (tags/RELEASE_33/final)
31940    # or
31941    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31942    #    Target: x86_64-pc-linux-gnu
31943    #    Thread model: posix
31944    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31945    # Check that this is likely to be clang
31946    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31947    if test $? -ne 0; then
31948      { $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
31949$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31950      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31951$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31952      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31953    fi
31954    # Collapse compiler output into a single line
31955    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31956    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31957        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31958  else
31959      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31960  fi
31961  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31962  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31963  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31964  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
31965
31966  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31967$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31968
31969
31970  # Now that we have resolved CC ourself, let autoconf have its go at it
31971  ac_ext=c
31972ac_cpp='$CPP $CPPFLAGS'
31973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31975ac_compiler_gnu=$ac_cv_c_compiler_gnu
31976if test -n "$ac_tool_prefix"; then
31977  for ac_prog in $CC
31978  do
31979    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31982$as_echo_n "checking for $ac_word... " >&6; }
31983if ${ac_cv_prog_CC+:} false; then :
31984  $as_echo_n "(cached) " >&6
31985else
31986  if test -n "$CC"; then
31987  ac_cv_prog_CC="$CC" # Let the user override the test.
31988else
31989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31990for as_dir in $PATH
31991do
31992  IFS=$as_save_IFS
31993  test -z "$as_dir" && as_dir=.
31994    for ac_exec_ext in '' $ac_executable_extensions; do
31995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31996    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
31997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31998    break 2
31999  fi
32000done
32001  done
32002IFS=$as_save_IFS
32003
32004fi
32005fi
32006CC=$ac_cv_prog_CC
32007if test -n "$CC"; then
32008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32009$as_echo "$CC" >&6; }
32010else
32011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32012$as_echo "no" >&6; }
32013fi
32014
32015
32016    test -n "$CC" && break
32017  done
32018fi
32019if test -z "$CC"; then
32020  ac_ct_CC=$CC
32021  for ac_prog in $CC
32022do
32023  # Extract the first word of "$ac_prog", so it can be a program name with args.
32024set dummy $ac_prog; ac_word=$2
32025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32026$as_echo_n "checking for $ac_word... " >&6; }
32027if ${ac_cv_prog_ac_ct_CC+:} false; then :
32028  $as_echo_n "(cached) " >&6
32029else
32030  if test -n "$ac_ct_CC"; then
32031  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32032else
32033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32034for as_dir in $PATH
32035do
32036  IFS=$as_save_IFS
32037  test -z "$as_dir" && as_dir=.
32038    for ac_exec_ext in '' $ac_executable_extensions; do
32039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32040    ac_cv_prog_ac_ct_CC="$ac_prog"
32041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32042    break 2
32043  fi
32044done
32045  done
32046IFS=$as_save_IFS
32047
32048fi
32049fi
32050ac_ct_CC=$ac_cv_prog_ac_ct_CC
32051if test -n "$ac_ct_CC"; then
32052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32053$as_echo "$ac_ct_CC" >&6; }
32054else
32055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32056$as_echo "no" >&6; }
32057fi
32058
32059
32060  test -n "$ac_ct_CC" && break
32061done
32062
32063  if test "x$ac_ct_CC" = x; then
32064    CC=""
32065  else
32066    case $cross_compiling:$ac_tool_warned in
32067yes:)
32068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32070ac_tool_warned=yes ;;
32071esac
32072    CC=$ac_ct_CC
32073  fi
32074fi
32075
32076
32077test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32079as_fn_error $? "no acceptable C compiler found in \$PATH
32080See \`config.log' for more details" "$LINENO" 5; }
32081
32082# Provide some information about the compiler.
32083$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32084set X $ac_compile
32085ac_compiler=$2
32086for ac_option in --version -v -V -qversion; do
32087  { { ac_try="$ac_compiler $ac_option >&5"
32088case "(($ac_try" in
32089  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32090  *) ac_try_echo=$ac_try;;
32091esac
32092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32093$as_echo "$ac_try_echo"; } >&5
32094  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32095  ac_status=$?
32096  if test -s conftest.err; then
32097    sed '10a\
32098... rest of stderr output deleted ...
32099         10q' conftest.err >conftest.er1
32100    cat conftest.er1 >&5
32101  fi
32102  rm -f conftest.er1 conftest.err
32103  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32104  test $ac_status = 0; }
32105done
32106
32107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32108/* end confdefs.h.  */
32109
32110int
32111main ()
32112{
32113
32114  ;
32115  return 0;
32116}
32117_ACEOF
32118ac_clean_files_save=$ac_clean_files
32119ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32120# Try to create an executable without -o first, disregard a.out.
32121# It will help us diagnose broken compilers, and finding out an intuition
32122# of exeext.
32123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32124$as_echo_n "checking whether the C compiler works... " >&6; }
32125ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32126
32127# The possible output files:
32128ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32129
32130ac_rmfiles=
32131for ac_file in $ac_files
32132do
32133  case $ac_file in
32134    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32135    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32136  esac
32137done
32138rm -f $ac_rmfiles
32139
32140if { { ac_try="$ac_link_default"
32141case "(($ac_try" in
32142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32143  *) ac_try_echo=$ac_try;;
32144esac
32145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32146$as_echo "$ac_try_echo"; } >&5
32147  (eval "$ac_link_default") 2>&5
32148  ac_status=$?
32149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32150  test $ac_status = 0; }; then :
32151  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32152# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32153# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32154# so that the user can short-circuit this test for compilers unknown to
32155# Autoconf.
32156for ac_file in $ac_files ''
32157do
32158  test -f "$ac_file" || continue
32159  case $ac_file in
32160    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32161	;;
32162    [ab].out )
32163	# We found the default executable, but exeext='' is most
32164	# certainly right.
32165	break;;
32166    *.* )
32167	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32168	then :; else
32169	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32170	fi
32171	# We set ac_cv_exeext here because the later test for it is not
32172	# safe: cross compilers may not add the suffix if given an `-o'
32173	# argument, so we may need to know it at that point already.
32174	# Even if this section looks crufty: it has the advantage of
32175	# actually working.
32176	break;;
32177    * )
32178	break;;
32179  esac
32180done
32181test "$ac_cv_exeext" = no && ac_cv_exeext=
32182
32183else
32184  ac_file=''
32185fi
32186if test -z "$ac_file"; then :
32187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32188$as_echo "no" >&6; }
32189$as_echo "$as_me: failed program was:" >&5
32190sed 's/^/| /' conftest.$ac_ext >&5
32191
32192{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32193$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32194as_fn_error 77 "C compiler cannot create executables
32195See \`config.log' for more details" "$LINENO" 5; }
32196else
32197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32198$as_echo "yes" >&6; }
32199fi
32200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32201$as_echo_n "checking for C compiler default output file name... " >&6; }
32202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32203$as_echo "$ac_file" >&6; }
32204ac_exeext=$ac_cv_exeext
32205
32206rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32207ac_clean_files=$ac_clean_files_save
32208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32209$as_echo_n "checking for suffix of executables... " >&6; }
32210if { { ac_try="$ac_link"
32211case "(($ac_try" in
32212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32213  *) ac_try_echo=$ac_try;;
32214esac
32215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32216$as_echo "$ac_try_echo"; } >&5
32217  (eval "$ac_link") 2>&5
32218  ac_status=$?
32219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32220  test $ac_status = 0; }; then :
32221  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32222# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32223# work properly (i.e., refer to `conftest.exe'), while it won't with
32224# `rm'.
32225for ac_file in conftest.exe conftest conftest.*; do
32226  test -f "$ac_file" || continue
32227  case $ac_file in
32228    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32229    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32230	  break;;
32231    * ) break;;
32232  esac
32233done
32234else
32235  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32236$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32237as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32238See \`config.log' for more details" "$LINENO" 5; }
32239fi
32240rm -f conftest conftest$ac_cv_exeext
32241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32242$as_echo "$ac_cv_exeext" >&6; }
32243
32244rm -f conftest.$ac_ext
32245EXEEXT=$ac_cv_exeext
32246ac_exeext=$EXEEXT
32247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32248/* end confdefs.h.  */
32249#include <stdio.h>
32250int
32251main ()
32252{
32253FILE *f = fopen ("conftest.out", "w");
32254 return ferror (f) || fclose (f) != 0;
32255
32256  ;
32257  return 0;
32258}
32259_ACEOF
32260ac_clean_files="$ac_clean_files conftest.out"
32261# Check that the compiler produces executables we can run.  If not, either
32262# the compiler is broken, or we cross compile.
32263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32264$as_echo_n "checking whether we are cross compiling... " >&6; }
32265if test "$cross_compiling" != yes; then
32266  { { ac_try="$ac_link"
32267case "(($ac_try" in
32268  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32269  *) ac_try_echo=$ac_try;;
32270esac
32271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32272$as_echo "$ac_try_echo"; } >&5
32273  (eval "$ac_link") 2>&5
32274  ac_status=$?
32275  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32276  test $ac_status = 0; }
32277  if { ac_try='./conftest$ac_cv_exeext'
32278  { { case "(($ac_try" in
32279  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32280  *) ac_try_echo=$ac_try;;
32281esac
32282eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32283$as_echo "$ac_try_echo"; } >&5
32284  (eval "$ac_try") 2>&5
32285  ac_status=$?
32286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32287  test $ac_status = 0; }; }; then
32288    cross_compiling=no
32289  else
32290    if test "$cross_compiling" = maybe; then
32291	cross_compiling=yes
32292    else
32293	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32295as_fn_error $? "cannot run C compiled programs.
32296If you meant to cross compile, use \`--host'.
32297See \`config.log' for more details" "$LINENO" 5; }
32298    fi
32299  fi
32300fi
32301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32302$as_echo "$cross_compiling" >&6; }
32303
32304rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32305ac_clean_files=$ac_clean_files_save
32306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32307$as_echo_n "checking for suffix of object files... " >&6; }
32308if ${ac_cv_objext+:} false; then :
32309  $as_echo_n "(cached) " >&6
32310else
32311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32312/* end confdefs.h.  */
32313
32314int
32315main ()
32316{
32317
32318  ;
32319  return 0;
32320}
32321_ACEOF
32322rm -f conftest.o conftest.obj
32323if { { ac_try="$ac_compile"
32324case "(($ac_try" in
32325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32326  *) ac_try_echo=$ac_try;;
32327esac
32328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32329$as_echo "$ac_try_echo"; } >&5
32330  (eval "$ac_compile") 2>&5
32331  ac_status=$?
32332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32333  test $ac_status = 0; }; then :
32334  for ac_file in conftest.o conftest.obj conftest.*; do
32335  test -f "$ac_file" || continue;
32336  case $ac_file in
32337    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32338    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32339       break;;
32340  esac
32341done
32342else
32343  $as_echo "$as_me: failed program was:" >&5
32344sed 's/^/| /' conftest.$ac_ext >&5
32345
32346{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32347$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32348as_fn_error $? "cannot compute suffix of object files: cannot compile
32349See \`config.log' for more details" "$LINENO" 5; }
32350fi
32351rm -f conftest.$ac_cv_objext conftest.$ac_ext
32352fi
32353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32354$as_echo "$ac_cv_objext" >&6; }
32355OBJEXT=$ac_cv_objext
32356ac_objext=$OBJEXT
32357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32358$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32359if ${ac_cv_c_compiler_gnu+:} false; then :
32360  $as_echo_n "(cached) " >&6
32361else
32362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32363/* end confdefs.h.  */
32364
32365int
32366main ()
32367{
32368#ifndef __GNUC__
32369       choke me
32370#endif
32371
32372  ;
32373  return 0;
32374}
32375_ACEOF
32376if ac_fn_c_try_compile "$LINENO"; then :
32377  ac_compiler_gnu=yes
32378else
32379  ac_compiler_gnu=no
32380fi
32381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32382ac_cv_c_compiler_gnu=$ac_compiler_gnu
32383
32384fi
32385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
32386$as_echo "$ac_cv_c_compiler_gnu" >&6; }
32387if test $ac_compiler_gnu = yes; then
32388  GCC=yes
32389else
32390  GCC=
32391fi
32392ac_test_CFLAGS=${CFLAGS+set}
32393ac_save_CFLAGS=$CFLAGS
32394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
32395$as_echo_n "checking whether $CC accepts -g... " >&6; }
32396if ${ac_cv_prog_cc_g+:} false; then :
32397  $as_echo_n "(cached) " >&6
32398else
32399  ac_save_c_werror_flag=$ac_c_werror_flag
32400   ac_c_werror_flag=yes
32401   ac_cv_prog_cc_g=no
32402   CFLAGS="-g"
32403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32404/* end confdefs.h.  */
32405
32406int
32407main ()
32408{
32409
32410  ;
32411  return 0;
32412}
32413_ACEOF
32414if ac_fn_c_try_compile "$LINENO"; then :
32415  ac_cv_prog_cc_g=yes
32416else
32417  CFLAGS=""
32418      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32419/* end confdefs.h.  */
32420
32421int
32422main ()
32423{
32424
32425  ;
32426  return 0;
32427}
32428_ACEOF
32429if ac_fn_c_try_compile "$LINENO"; then :
32430
32431else
32432  ac_c_werror_flag=$ac_save_c_werror_flag
32433	 CFLAGS="-g"
32434	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32435/* end confdefs.h.  */
32436
32437int
32438main ()
32439{
32440
32441  ;
32442  return 0;
32443}
32444_ACEOF
32445if ac_fn_c_try_compile "$LINENO"; then :
32446  ac_cv_prog_cc_g=yes
32447fi
32448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32449fi
32450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32451fi
32452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32453   ac_c_werror_flag=$ac_save_c_werror_flag
32454fi
32455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
32456$as_echo "$ac_cv_prog_cc_g" >&6; }
32457if test "$ac_test_CFLAGS" = set; then
32458  CFLAGS=$ac_save_CFLAGS
32459elif test $ac_cv_prog_cc_g = yes; then
32460  if test "$GCC" = yes; then
32461    CFLAGS="-g -O2"
32462  else
32463    CFLAGS="-g"
32464  fi
32465else
32466  if test "$GCC" = yes; then
32467    CFLAGS="-O2"
32468  else
32469    CFLAGS=
32470  fi
32471fi
32472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
32473$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
32474if ${ac_cv_prog_cc_c89+:} false; then :
32475  $as_echo_n "(cached) " >&6
32476else
32477  ac_cv_prog_cc_c89=no
32478ac_save_CC=$CC
32479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32480/* end confdefs.h.  */
32481#include <stdarg.h>
32482#include <stdio.h>
32483struct stat;
32484/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
32485struct buf { int x; };
32486FILE * (*rcsopen) (struct buf *, struct stat *, int);
32487static char *e (p, i)
32488     char **p;
32489     int i;
32490{
32491  return p[i];
32492}
32493static char *f (char * (*g) (char **, int), char **p, ...)
32494{
32495  char *s;
32496  va_list v;
32497  va_start (v,p);
32498  s = g (p, va_arg (v,int));
32499  va_end (v);
32500  return s;
32501}
32502
32503/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
32504   function prototypes and stuff, but not '\xHH' hex character constants.
32505   These don't provoke an error unfortunately, instead are silently treated
32506   as 'x'.  The following induces an error, until -std is added to get
32507   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
32508   array size at least.  It's necessary to write '\x00'==0 to get something
32509   that's true only with -std.  */
32510int osf4_cc_array ['\x00' == 0 ? 1 : -1];
32511
32512/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
32513   inside strings and character constants.  */
32514#define FOO(x) 'x'
32515int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
32516
32517int test (int i, double x);
32518struct s1 {int (*f) (int a);};
32519struct s2 {int (*f) (double a);};
32520int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
32521int argc;
32522char **argv;
32523int
32524main ()
32525{
32526return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
32527  ;
32528  return 0;
32529}
32530_ACEOF
32531for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
32532	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
32533do
32534  CC="$ac_save_CC $ac_arg"
32535  if ac_fn_c_try_compile "$LINENO"; then :
32536  ac_cv_prog_cc_c89=$ac_arg
32537fi
32538rm -f core conftest.err conftest.$ac_objext
32539  test "x$ac_cv_prog_cc_c89" != "xno" && break
32540done
32541rm -f conftest.$ac_ext
32542CC=$ac_save_CC
32543
32544fi
32545# AC_CACHE_VAL
32546case "x$ac_cv_prog_cc_c89" in
32547  x)
32548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
32549$as_echo "none needed" >&6; } ;;
32550  xno)
32551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
32552$as_echo "unsupported" >&6; } ;;
32553  *)
32554    CC="$CC $ac_cv_prog_cc_c89"
32555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
32556$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
32557esac
32558if test "x$ac_cv_prog_cc_c89" != xno; then :
32559
32560fi
32561
32562ac_ext=cpp
32563ac_cpp='$CXXCPP $CPPFLAGS'
32564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32567
32568
32569
32570  COMPILER_NAME=C++
32571  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
32572
32573  if test "x$CXX" != x; then
32574    # User has supplied compiler name already, always let that override.
32575    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
32576$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
32577    if test "x`basename $CXX`" = "x$CXX"; then
32578      # A command without a complete path is provided, search $PATH.
32579
32580      for ac_prog in $CXX
32581do
32582  # Extract the first word of "$ac_prog", so it can be a program name with args.
32583set dummy $ac_prog; ac_word=$2
32584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32585$as_echo_n "checking for $ac_word... " >&6; }
32586if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32587  $as_echo_n "(cached) " >&6
32588else
32589  case $POTENTIAL_CXX in
32590  [\\/]* | ?:[\\/]*)
32591  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32592  ;;
32593  *)
32594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32595for as_dir in $PATH
32596do
32597  IFS=$as_save_IFS
32598  test -z "$as_dir" && as_dir=.
32599    for ac_exec_ext in '' $ac_executable_extensions; do
32600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32601    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32603    break 2
32604  fi
32605done
32606  done
32607IFS=$as_save_IFS
32608
32609  ;;
32610esac
32611fi
32612POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32613if test -n "$POTENTIAL_CXX"; then
32614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32615$as_echo "$POTENTIAL_CXX" >&6; }
32616else
32617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32618$as_echo "no" >&6; }
32619fi
32620
32621
32622  test -n "$POTENTIAL_CXX" && break
32623done
32624
32625      if test "x$POTENTIAL_CXX" != x; then
32626        CXX=$POTENTIAL_CXX
32627      else
32628        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
32629      fi
32630    else
32631      # Otherwise it might already be a complete path
32632      if test ! -x "$CXX"; then
32633        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
32634      fi
32635    fi
32636  else
32637    # No user supplied value. Locate compiler ourselves.
32638
32639    # If we are cross compiling, assume cross compilation tools follows the
32640    # cross compilation standard where they are prefixed with the autoconf
32641    # standard name for the target. For example the binary
32642    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32643    # If we are not cross compiling, then the default compiler name will be
32644    # used.
32645
32646    CXX=
32647    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32648    # before checking the rest of the PATH.
32649    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32650    # step, this should not be necessary.
32651    if test -n "$TOOLCHAIN_PATH"; then
32652      PATH_save="$PATH"
32653      PATH="$TOOLCHAIN_PATH"
32654      for ac_prog in $SEARCH_LIST
32655do
32656  # Extract the first word of "$ac_prog", so it can be a program name with args.
32657set dummy $ac_prog; ac_word=$2
32658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32659$as_echo_n "checking for $ac_word... " >&6; }
32660if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
32661  $as_echo_n "(cached) " >&6
32662else
32663  case $TOOLCHAIN_PATH_CXX in
32664  [\\/]* | ?:[\\/]*)
32665  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
32666  ;;
32667  *)
32668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32669for as_dir in $PATH
32670do
32671  IFS=$as_save_IFS
32672  test -z "$as_dir" && as_dir=.
32673    for ac_exec_ext in '' $ac_executable_extensions; do
32674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32675    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
32676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32677    break 2
32678  fi
32679done
32680  done
32681IFS=$as_save_IFS
32682
32683  ;;
32684esac
32685fi
32686TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
32687if test -n "$TOOLCHAIN_PATH_CXX"; then
32688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
32689$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
32690else
32691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32692$as_echo "no" >&6; }
32693fi
32694
32695
32696  test -n "$TOOLCHAIN_PATH_CXX" && break
32697done
32698
32699      CXX=$TOOLCHAIN_PATH_CXX
32700      PATH="$PATH_save"
32701    fi
32702
32703    # AC_PATH_PROGS can't be run multiple times with the same variable,
32704    # so create a new name for this run.
32705    if test "x$CXX" = x; then
32706      for ac_prog in $SEARCH_LIST
32707do
32708  # Extract the first word of "$ac_prog", so it can be a program name with args.
32709set dummy $ac_prog; ac_word=$2
32710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32711$as_echo_n "checking for $ac_word... " >&6; }
32712if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
32713  $as_echo_n "(cached) " >&6
32714else
32715  case $POTENTIAL_CXX in
32716  [\\/]* | ?:[\\/]*)
32717  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
32718  ;;
32719  *)
32720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32721for as_dir in $PATH
32722do
32723  IFS=$as_save_IFS
32724  test -z "$as_dir" && as_dir=.
32725    for ac_exec_ext in '' $ac_executable_extensions; do
32726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32727    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
32728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32729    break 2
32730  fi
32731done
32732  done
32733IFS=$as_save_IFS
32734
32735  ;;
32736esac
32737fi
32738POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
32739if test -n "$POTENTIAL_CXX"; then
32740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
32741$as_echo "$POTENTIAL_CXX" >&6; }
32742else
32743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32744$as_echo "no" >&6; }
32745fi
32746
32747
32748  test -n "$POTENTIAL_CXX" && break
32749done
32750
32751      CXX=$POTENTIAL_CXX
32752    fi
32753
32754    if test "x$CXX" = x; then
32755
32756  # Print a helpful message on how to acquire the necessary build dependency.
32757  # devkit is the help tag: freetype, cups, alsa etc
32758  MISSING_DEPENDENCY=devkit
32759
32760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32761    cygwin_help $MISSING_DEPENDENCY
32762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32763    msys_help $MISSING_DEPENDENCY
32764  else
32765    PKGHANDLER_COMMAND=
32766
32767    case $PKGHANDLER in
32768      apt-get)
32769        apt_help     $MISSING_DEPENDENCY ;;
32770      yum)
32771        yum_help     $MISSING_DEPENDENCY ;;
32772      port)
32773        port_help    $MISSING_DEPENDENCY ;;
32774      pkgutil)
32775        pkgutil_help $MISSING_DEPENDENCY ;;
32776      pkgadd)
32777        pkgadd_help  $MISSING_DEPENDENCY ;;
32778    esac
32779
32780    if test "x$PKGHANDLER_COMMAND" != x; then
32781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32782    fi
32783  fi
32784
32785      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32786    fi
32787  fi
32788
32789  # Now we have a compiler binary in CXX. Make sure it's okay.
32790
32791  # Only process if variable expands to non-empty
32792
32793  if test "x$CXX" != x; then
32794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32795
32796  # First separate the path from the arguments. This will split at the first
32797  # space.
32798  complete="$CXX"
32799  path="${complete%% *}"
32800  tmp="$complete EOL"
32801  arguments="${tmp#* }"
32802
32803  # Input might be given as Windows format, start by converting to
32804  # unix format.
32805  new_path=`$CYGPATH -u "$path"`
32806
32807  # Now try to locate executable using which
32808  new_path=`$WHICH "$new_path" 2> /dev/null`
32809  # bat and cmd files are not always considered executable in cygwin causing which
32810  # to not find them
32811  if test "x$new_path" = x \
32812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32814    new_path=`$CYGPATH -u "$path"`
32815  fi
32816  if test "x$new_path" = x; then
32817    # Oops. Which didn't find the executable.
32818    # The splitting of arguments from the executable at a space might have been incorrect,
32819    # since paths with space are more likely in Windows. Give it another try with the whole
32820    # argument.
32821    path="$complete"
32822    arguments="EOL"
32823    new_path=`$CYGPATH -u "$path"`
32824    new_path=`$WHICH "$new_path" 2> /dev/null`
32825    # bat and cmd files are not always considered executable in cygwin causing which
32826    # to not find them
32827    if test "x$new_path" = x \
32828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32830      new_path=`$CYGPATH -u "$path"`
32831    fi
32832    if test "x$new_path" = x; then
32833      # It's still not found. Now this is an unrecoverable error.
32834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32835$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32836      has_space=`$ECHO "$complete" | $GREP " "`
32837      if test "x$has_space" != x; then
32838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32840      fi
32841      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32842    fi
32843  fi
32844
32845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32848  # "foo.exe" is OK but "foo" is an error.
32849  #
32850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32851  # It is also a way to make sure we got the proper file name for the real test later on.
32852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32853  if test "x$test_shortpath" = x; then
32854    # Short path failed, file does not exist as specified.
32855    # Try adding .exe or .cmd
32856    if test -f "${new_path}.exe"; then
32857      input_to_shortpath="${new_path}.exe"
32858    elif test -f "${new_path}.cmd"; then
32859      input_to_shortpath="${new_path}.cmd"
32860    else
32861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
32862$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
32863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32865      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32866    fi
32867  else
32868    input_to_shortpath="$new_path"
32869  fi
32870
32871  # Call helper function which possibly converts this using DOS-style short mode.
32872  # If so, the updated path is stored in $new_path.
32873  new_path="$input_to_shortpath"
32874
32875  input_path="$input_to_shortpath"
32876  # Check if we need to convert this using DOS-style short mode. If the path
32877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32878  # take no chances and rewrite it.
32879  # Note: m4 eats our [], so we need to use [ and ] instead.
32880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32881  if test "x$has_forbidden_chars" != x; then
32882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32886      # Going to short mode and back again did indeed matter. Since short mode is
32887      # case insensitive, let's make it lowercase to improve readability.
32888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32889      # Now convert it back to Unix-style (cygpath)
32890      input_path=`$CYGPATH -u "$shortmode_path"`
32891      new_path="$input_path"
32892    fi
32893  fi
32894
32895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32896  if test "x$test_cygdrive_prefix" = x; then
32897    # As a simple fix, exclude /usr/bin since it's not a real path.
32898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32900      # a path prefixed by /cygdrive for fixpath to work.
32901      new_path="$CYGWIN_ROOT_PATH$input_path"
32902    fi
32903  fi
32904
32905  # remove trailing .exe if any
32906  new_path="${new_path/%.exe/}"
32907
32908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32909
32910  # First separate the path from the arguments. This will split at the first
32911  # space.
32912  complete="$CXX"
32913  path="${complete%% *}"
32914  tmp="$complete EOL"
32915  arguments="${tmp#* }"
32916
32917  # Input might be given as Windows format, start by converting to
32918  # unix format.
32919  new_path="$path"
32920
32921  windows_path="$new_path"
32922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32923    unix_path=`$CYGPATH -u "$windows_path"`
32924    new_path="$unix_path"
32925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32927    new_path="$unix_path"
32928  fi
32929
32930
32931  # Now try to locate executable using which
32932  new_path=`$WHICH "$new_path" 2> /dev/null`
32933
32934  if test "x$new_path" = x; then
32935    # Oops. Which didn't find the executable.
32936    # The splitting of arguments from the executable at a space might have been incorrect,
32937    # since paths with space are more likely in Windows. Give it another try with the whole
32938    # argument.
32939    path="$complete"
32940    arguments="EOL"
32941    new_path="$path"
32942
32943  windows_path="$new_path"
32944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32945    unix_path=`$CYGPATH -u "$windows_path"`
32946    new_path="$unix_path"
32947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32949    new_path="$unix_path"
32950  fi
32951
32952
32953    new_path=`$WHICH "$new_path" 2> /dev/null`
32954    # bat and cmd files are not always considered executable in MSYS causing which
32955    # to not find them
32956    if test "x$new_path" = x \
32957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32959      new_path="$path"
32960
32961  windows_path="$new_path"
32962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32963    unix_path=`$CYGPATH -u "$windows_path"`
32964    new_path="$unix_path"
32965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32967    new_path="$unix_path"
32968  fi
32969
32970    fi
32971
32972    if test "x$new_path" = x; then
32973      # It's still not found. Now this is an unrecoverable error.
32974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
32975$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
32976      has_space=`$ECHO "$complete" | $GREP " "`
32977      if test "x$has_space" != x; then
32978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32980      fi
32981      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
32982    fi
32983  fi
32984
32985  # Now new_path has a complete unix path to the binary
32986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32987    # Keep paths in /bin as-is, but remove trailing .exe if any
32988    new_path="${new_path/%.exe/}"
32989    # Do not save /bin paths to all_fixpath_prefixes!
32990  else
32991    # Not in mixed or Windows style, start by that.
32992    new_path=`cmd //c echo $new_path`
32993
32994  input_path="$new_path"
32995  # Check if we need to convert this using DOS-style short mode. If the path
32996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32997  # take no chances and rewrite it.
32998  # Note: m4 eats our [], so we need to use [ and ] instead.
32999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33000  if test "x$has_forbidden_chars" != x; then
33001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33003  fi
33004
33005    # Output is in $new_path
33006
33007  windows_path="$new_path"
33008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33009    unix_path=`$CYGPATH -u "$windows_path"`
33010    new_path="$unix_path"
33011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33013    new_path="$unix_path"
33014  fi
33015
33016    # remove trailing .exe if any
33017    new_path="${new_path/%.exe/}"
33018
33019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33021  fi
33022
33023    else
33024      # We're on a unix platform. Hooray! :)
33025      # First separate the path from the arguments. This will split at the first
33026      # space.
33027      complete="$CXX"
33028      path="${complete%% *}"
33029      tmp="$complete EOL"
33030      arguments="${tmp#* }"
33031
33032      # Cannot rely on the command "which" here since it doesn't always work.
33033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33034      if test -z "$is_absolute_path"; then
33035        # Path to executable is not absolute. Find it.
33036        IFS_save="$IFS"
33037        IFS=:
33038        for p in $PATH; do
33039          if test -f "$p/$path" && test -x "$p/$path"; then
33040            new_path="$p/$path"
33041            break
33042          fi
33043        done
33044        IFS="$IFS_save"
33045      else
33046        # This is an absolute path, we can use it without further modifications.
33047        new_path="$path"
33048      fi
33049
33050      if test "x$new_path" = x; then
33051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33052$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33053        has_space=`$ECHO "$complete" | $GREP " "`
33054        if test "x$has_space" != x; then
33055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33057        fi
33058        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33059      fi
33060    fi
33061
33062    # Now join together the path and the arguments once again
33063    if test "x$arguments" != xEOL; then
33064      new_complete="$new_path ${arguments% *}"
33065    else
33066      new_complete="$new_path"
33067    fi
33068
33069    if test "x$complete" != "x$new_complete"; then
33070      CXX="$new_complete"
33071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33072$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33073    fi
33074  fi
33075
33076  TEST_COMPILER="$CXX"
33077  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33078  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33079  if test "x$OPENJDK_BUILD_OS" != xaix; then
33080    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33082$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33083
33084  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33085    # Follow a chain of symbolic links. Use readlink
33086    # where it exists, else fall back to horribly
33087    # complicated shell code.
33088    if test "x$READLINK_TESTED" != yes; then
33089      # On MacOSX there is a readlink tool with a different
33090      # purpose than the GNU readlink tool. Check the found readlink.
33091      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33092      if test "x$ISGNU" = x; then
33093        # A readlink that we do not know how to use.
33094        # Are there other non-GNU readlinks out there?
33095        READLINK_TESTED=yes
33096        READLINK=
33097      fi
33098    fi
33099
33100    if test "x$READLINK" != x; then
33101      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33102    else
33103      # Save the current directory for restoring afterwards
33104      STARTDIR=$PWD
33105      COUNTER=0
33106      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33107      sym_link_file=`$BASENAME $TEST_COMPILER`
33108      cd $sym_link_dir
33109      # Use -P flag to resolve symlinks in directories.
33110      cd `$THEPWDCMD -P`
33111      sym_link_dir=`$THEPWDCMD -P`
33112      # Resolve file symlinks
33113      while test $COUNTER -lt 20; do
33114        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33115        if test "x$ISLINK" == x; then
33116          # This is not a symbolic link! We are done!
33117          break
33118        fi
33119        # Again resolve directory symlinks since the target of the just found
33120        # link could be in a different directory
33121        cd `$DIRNAME $ISLINK`
33122        sym_link_dir=`$THEPWDCMD -P`
33123        sym_link_file=`$BASENAME $ISLINK`
33124        let COUNTER=COUNTER+1
33125      done
33126      cd $STARTDIR
33127      TEST_COMPILER=$sym_link_dir/$sym_link_file
33128    fi
33129  fi
33130
33131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33132$as_echo "$TEST_COMPILER" >&6; }
33133  fi
33134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33135$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33136
33137  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33138  if test "x$COMPILER_BASENAME" = "xccache"; then
33139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33140$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33141    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33142    # We want to control ccache invocation ourselves, so ignore this cc and try
33143    # searching again.
33144
33145    # Remove the path to the fake ccache cc from the PATH
33146    RETRY_COMPILER_SAVED_PATH="$PATH"
33147    COMPILER_DIRNAME=`$DIRNAME $CXX`
33148    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33149
33150    # Try again looking for our compiler
33151    if test -n "$ac_tool_prefix"; then
33152  for ac_prog in $TOOLCHAIN_CXX_BINARY
33153  do
33154    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33155set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33157$as_echo_n "checking for $ac_word... " >&6; }
33158if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33159  $as_echo_n "(cached) " >&6
33160else
33161  if test -n "$PROPER_COMPILER_CXX"; then
33162  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33163else
33164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33165for as_dir in $PATH
33166do
33167  IFS=$as_save_IFS
33168  test -z "$as_dir" && as_dir=.
33169    for ac_exec_ext in '' $ac_executable_extensions; do
33170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33171    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33173    break 2
33174  fi
33175done
33176  done
33177IFS=$as_save_IFS
33178
33179fi
33180fi
33181PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33182if test -n "$PROPER_COMPILER_CXX"; then
33183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33184$as_echo "$PROPER_COMPILER_CXX" >&6; }
33185else
33186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33187$as_echo "no" >&6; }
33188fi
33189
33190
33191    test -n "$PROPER_COMPILER_CXX" && break
33192  done
33193fi
33194if test -z "$PROPER_COMPILER_CXX"; then
33195  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33196  for ac_prog in $TOOLCHAIN_CXX_BINARY
33197do
33198  # Extract the first word of "$ac_prog", so it can be a program name with args.
33199set dummy $ac_prog; ac_word=$2
33200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33201$as_echo_n "checking for $ac_word... " >&6; }
33202if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33203  $as_echo_n "(cached) " >&6
33204else
33205  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33206  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33207else
33208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33209for as_dir in $PATH
33210do
33211  IFS=$as_save_IFS
33212  test -z "$as_dir" && as_dir=.
33213    for ac_exec_ext in '' $ac_executable_extensions; do
33214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33215    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33217    break 2
33218  fi
33219done
33220  done
33221IFS=$as_save_IFS
33222
33223fi
33224fi
33225ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33226if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33228$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33229else
33230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33231$as_echo "no" >&6; }
33232fi
33233
33234
33235  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33236done
33237
33238  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33239    PROPER_COMPILER_CXX=""
33240  else
33241    case $cross_compiling:$ac_tool_warned in
33242yes:)
33243{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33244$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33245ac_tool_warned=yes ;;
33246esac
33247    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33248  fi
33249fi
33250
33251
33252  # Only process if variable expands to non-empty
33253
33254  if test "x$PROPER_COMPILER_CXX" != x; then
33255    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33256
33257  # First separate the path from the arguments. This will split at the first
33258  # space.
33259  complete="$PROPER_COMPILER_CXX"
33260  path="${complete%% *}"
33261  tmp="$complete EOL"
33262  arguments="${tmp#* }"
33263
33264  # Input might be given as Windows format, start by converting to
33265  # unix format.
33266  new_path=`$CYGPATH -u "$path"`
33267
33268  # Now try to locate executable using which
33269  new_path=`$WHICH "$new_path" 2> /dev/null`
33270  # bat and cmd files are not always considered executable in cygwin causing which
33271  # to not find them
33272  if test "x$new_path" = x \
33273      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33274      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33275    new_path=`$CYGPATH -u "$path"`
33276  fi
33277  if test "x$new_path" = x; then
33278    # Oops. Which didn't find the executable.
33279    # The splitting of arguments from the executable at a space might have been incorrect,
33280    # since paths with space are more likely in Windows. Give it another try with the whole
33281    # argument.
33282    path="$complete"
33283    arguments="EOL"
33284    new_path=`$CYGPATH -u "$path"`
33285    new_path=`$WHICH "$new_path" 2> /dev/null`
33286    # bat and cmd files are not always considered executable in cygwin causing which
33287    # to not find them
33288    if test "x$new_path" = x \
33289        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33290        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33291      new_path=`$CYGPATH -u "$path"`
33292    fi
33293    if test "x$new_path" = x; then
33294      # It's still not found. Now this is an unrecoverable error.
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33296$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33297      has_space=`$ECHO "$complete" | $GREP " "`
33298      if test "x$has_space" != x; then
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33301      fi
33302      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33303    fi
33304  fi
33305
33306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33309  # "foo.exe" is OK but "foo" is an error.
33310  #
33311  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33312  # It is also a way to make sure we got the proper file name for the real test later on.
33313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33314  if test "x$test_shortpath" = x; then
33315    # Short path failed, file does not exist as specified.
33316    # Try adding .exe or .cmd
33317    if test -f "${new_path}.exe"; then
33318      input_to_shortpath="${new_path}.exe"
33319    elif test -f "${new_path}.cmd"; then
33320      input_to_shortpath="${new_path}.cmd"
33321    else
33322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33323$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33324      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33325$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33326      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33327    fi
33328  else
33329    input_to_shortpath="$new_path"
33330  fi
33331
33332  # Call helper function which possibly converts this using DOS-style short mode.
33333  # If so, the updated path is stored in $new_path.
33334  new_path="$input_to_shortpath"
33335
33336  input_path="$input_to_shortpath"
33337  # Check if we need to convert this using DOS-style short mode. If the path
33338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33339  # take no chances and rewrite it.
33340  # Note: m4 eats our [], so we need to use [ and ] instead.
33341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33342  if test "x$has_forbidden_chars" != x; then
33343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33347      # Going to short mode and back again did indeed matter. Since short mode is
33348      # case insensitive, let's make it lowercase to improve readability.
33349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33350      # Now convert it back to Unix-style (cygpath)
33351      input_path=`$CYGPATH -u "$shortmode_path"`
33352      new_path="$input_path"
33353    fi
33354  fi
33355
33356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33357  if test "x$test_cygdrive_prefix" = x; then
33358    # As a simple fix, exclude /usr/bin since it's not a real path.
33359    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33361      # a path prefixed by /cygdrive for fixpath to work.
33362      new_path="$CYGWIN_ROOT_PATH$input_path"
33363    fi
33364  fi
33365
33366  # remove trailing .exe if any
33367  new_path="${new_path/%.exe/}"
33368
33369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33370
33371  # First separate the path from the arguments. This will split at the first
33372  # space.
33373  complete="$PROPER_COMPILER_CXX"
33374  path="${complete%% *}"
33375  tmp="$complete EOL"
33376  arguments="${tmp#* }"
33377
33378  # Input might be given as Windows format, start by converting to
33379  # unix format.
33380  new_path="$path"
33381
33382  windows_path="$new_path"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    new_path="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    new_path="$unix_path"
33389  fi
33390
33391
33392  # Now try to locate executable using which
33393  new_path=`$WHICH "$new_path" 2> /dev/null`
33394
33395  if test "x$new_path" = x; then
33396    # Oops. Which didn't find the executable.
33397    # The splitting of arguments from the executable at a space might have been incorrect,
33398    # since paths with space are more likely in Windows. Give it another try with the whole
33399    # argument.
33400    path="$complete"
33401    arguments="EOL"
33402    new_path="$path"
33403
33404  windows_path="$new_path"
33405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33406    unix_path=`$CYGPATH -u "$windows_path"`
33407    new_path="$unix_path"
33408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33410    new_path="$unix_path"
33411  fi
33412
33413
33414    new_path=`$WHICH "$new_path" 2> /dev/null`
33415    # bat and cmd files are not always considered executable in MSYS causing which
33416    # to not find them
33417    if test "x$new_path" = x \
33418        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33419        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33420      new_path="$path"
33421
33422  windows_path="$new_path"
33423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33424    unix_path=`$CYGPATH -u "$windows_path"`
33425    new_path="$unix_path"
33426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33428    new_path="$unix_path"
33429  fi
33430
33431    fi
33432
33433    if test "x$new_path" = x; then
33434      # It's still not found. Now this is an unrecoverable error.
33435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33436$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33437      has_space=`$ECHO "$complete" | $GREP " "`
33438      if test "x$has_space" != x; then
33439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33441      fi
33442      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33443    fi
33444  fi
33445
33446  # Now new_path has a complete unix path to the binary
33447  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33448    # Keep paths in /bin as-is, but remove trailing .exe if any
33449    new_path="${new_path/%.exe/}"
33450    # Do not save /bin paths to all_fixpath_prefixes!
33451  else
33452    # Not in mixed or Windows style, start by that.
33453    new_path=`cmd //c echo $new_path`
33454
33455  input_path="$new_path"
33456  # Check if we need to convert this using DOS-style short mode. If the path
33457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33458  # take no chances and rewrite it.
33459  # Note: m4 eats our [], so we need to use [ and ] instead.
33460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33461  if test "x$has_forbidden_chars" != x; then
33462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33464  fi
33465
33466    # Output is in $new_path
33467
33468  windows_path="$new_path"
33469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33470    unix_path=`$CYGPATH -u "$windows_path"`
33471    new_path="$unix_path"
33472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33474    new_path="$unix_path"
33475  fi
33476
33477    # remove trailing .exe if any
33478    new_path="${new_path/%.exe/}"
33479
33480    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33481    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33482  fi
33483
33484    else
33485      # We're on a unix platform. Hooray! :)
33486      # First separate the path from the arguments. This will split at the first
33487      # space.
33488      complete="$PROPER_COMPILER_CXX"
33489      path="${complete%% *}"
33490      tmp="$complete EOL"
33491      arguments="${tmp#* }"
33492
33493      # Cannot rely on the command "which" here since it doesn't always work.
33494      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33495      if test -z "$is_absolute_path"; then
33496        # Path to executable is not absolute. Find it.
33497        IFS_save="$IFS"
33498        IFS=:
33499        for p in $PATH; do
33500          if test -f "$p/$path" && test -x "$p/$path"; then
33501            new_path="$p/$path"
33502            break
33503          fi
33504        done
33505        IFS="$IFS_save"
33506      else
33507        # This is an absolute path, we can use it without further modifications.
33508        new_path="$path"
33509      fi
33510
33511      if test "x$new_path" = x; then
33512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33513$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33514        has_space=`$ECHO "$complete" | $GREP " "`
33515        if test "x$has_space" != x; then
33516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33518        fi
33519        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33520      fi
33521    fi
33522
33523    # Now join together the path and the arguments once again
33524    if test "x$arguments" != xEOL; then
33525      new_complete="$new_path ${arguments% *}"
33526    else
33527      new_complete="$new_path"
33528    fi
33529
33530    if test "x$complete" != "x$new_complete"; then
33531      PROPER_COMPILER_CXX="$new_complete"
33532      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
33533$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
33534    fi
33535  fi
33536
33537    PATH="$RETRY_COMPILER_SAVED_PATH"
33538
33539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
33540$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
33541
33542  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33543    # Follow a chain of symbolic links. Use readlink
33544    # where it exists, else fall back to horribly
33545    # complicated shell code.
33546    if test "x$READLINK_TESTED" != yes; then
33547      # On MacOSX there is a readlink tool with a different
33548      # purpose than the GNU readlink tool. Check the found readlink.
33549      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33550      if test "x$ISGNU" = x; then
33551        # A readlink that we do not know how to use.
33552        # Are there other non-GNU readlinks out there?
33553        READLINK_TESTED=yes
33554        READLINK=
33555      fi
33556    fi
33557
33558    if test "x$READLINK" != x; then
33559      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
33560    else
33561      # Save the current directory for restoring afterwards
33562      STARTDIR=$PWD
33563      COUNTER=0
33564      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
33565      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
33566      cd $sym_link_dir
33567      # Use -P flag to resolve symlinks in directories.
33568      cd `$THEPWDCMD -P`
33569      sym_link_dir=`$THEPWDCMD -P`
33570      # Resolve file symlinks
33571      while test $COUNTER -lt 20; do
33572        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33573        if test "x$ISLINK" == x; then
33574          # This is not a symbolic link! We are done!
33575          break
33576        fi
33577        # Again resolve directory symlinks since the target of the just found
33578        # link could be in a different directory
33579        cd `$DIRNAME $ISLINK`
33580        sym_link_dir=`$THEPWDCMD -P`
33581        sym_link_file=`$BASENAME $ISLINK`
33582        let COUNTER=COUNTER+1
33583      done
33584      cd $STARTDIR
33585      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
33586    fi
33587  fi
33588
33589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33590$as_echo "$PROPER_COMPILER_CXX" >&6; }
33591    CXX="$PROPER_COMPILER_CXX"
33592  else
33593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
33594$as_echo "no, keeping CXX" >&6; }
33595  fi
33596
33597
33598  COMPILER=$CXX
33599  COMPILER_NAME=$COMPILER_NAME
33600
33601  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33602    # cc -V output typically looks like
33603    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33604    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33605    # Check that this is likely to be the Solaris Studio cc.
33606    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33607    if test $? -ne 0; then
33608      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33609      { $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
33610$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33612$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33614$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33615      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33616    fi
33617    # Remove usage instructions (if present), and
33618    # collapse compiler output into a single line
33619    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33620        $SED -e 's/ *[Uu]sage:.*//'`
33621    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33622        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33623  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33624    # xlc -qversion output typically looks like
33625    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33626    #     Version: 11.01.0000.0015
33627    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33628    # Check that this is likely to be the IBM XL C compiler.
33629    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33630    if test $? -ne 0; then
33631      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33632      { $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
33633$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33634      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33635$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33636      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33637$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33638      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33639    fi
33640    # Collapse compiler output into a single line
33641    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33642    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33643        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33644  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33645    # There is no specific version flag, but all output starts with a version string.
33646    # First line typically looks something like:
33647    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33648    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33649    # Check that this is likely to be Microsoft CL.EXE.
33650    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33651    if test $? -ne 0; then
33652      { $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
33653$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33654      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33655$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33656      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33657    fi
33658    # Collapse compiler output into a single line
33659    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33660    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33661        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33662  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33663    # gcc --version output typically looks like
33664    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33665    #     Copyright (C) 2013 Free Software Foundation, Inc.
33666    #     This is free software; see the source for copying conditions.  There is NO
33667    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33668    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33669    # Check that this is likely to be GCC.
33670    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33671    if test $? -ne 0; then
33672      { $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
33673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33675$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33676      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33677    fi
33678    # Remove Copyright and legalese from version string, and
33679    # collapse into a single line
33680    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33681        $SED -e 's/ *Copyright .*//'`
33682    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33683        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
33684  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33685    # clang --version output typically looks like
33686    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33687    #    clang version 3.3 (tags/RELEASE_33/final)
33688    # or
33689    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33690    #    Target: x86_64-pc-linux-gnu
33691    #    Thread model: posix
33692    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33693    # Check that this is likely to be clang
33694    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33695    if test $? -ne 0; then
33696      { $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
33697$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33698      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33699$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33700      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33701    fi
33702    # Collapse compiler output into a single line
33703    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33704    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33705        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
33706  else
33707      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33708  fi
33709  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33710  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33711  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33712  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
33713
33714  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33715$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33716
33717
33718  # Now that we have resolved CXX ourself, let autoconf have its go at it
33719  ac_ext=cpp
33720ac_cpp='$CXXCPP $CPPFLAGS'
33721ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33722ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33723ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33724if test -z "$CXX"; then
33725  if test -n "$CCC"; then
33726    CXX=$CCC
33727  else
33728    if test -n "$ac_tool_prefix"; then
33729  for ac_prog in $CXX
33730  do
33731    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33734$as_echo_n "checking for $ac_word... " >&6; }
33735if ${ac_cv_prog_CXX+:} false; then :
33736  $as_echo_n "(cached) " >&6
33737else
33738  if test -n "$CXX"; then
33739  ac_cv_prog_CXX="$CXX" # Let the user override the test.
33740else
33741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33742for as_dir in $PATH
33743do
33744  IFS=$as_save_IFS
33745  test -z "$as_dir" && as_dir=.
33746    for ac_exec_ext in '' $ac_executable_extensions; do
33747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33748    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
33749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33750    break 2
33751  fi
33752done
33753  done
33754IFS=$as_save_IFS
33755
33756fi
33757fi
33758CXX=$ac_cv_prog_CXX
33759if test -n "$CXX"; then
33760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
33761$as_echo "$CXX" >&6; }
33762else
33763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33764$as_echo "no" >&6; }
33765fi
33766
33767
33768    test -n "$CXX" && break
33769  done
33770fi
33771if test -z "$CXX"; then
33772  ac_ct_CXX=$CXX
33773  for ac_prog in $CXX
33774do
33775  # Extract the first word of "$ac_prog", so it can be a program name with args.
33776set dummy $ac_prog; ac_word=$2
33777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33778$as_echo_n "checking for $ac_word... " >&6; }
33779if ${ac_cv_prog_ac_ct_CXX+:} false; then :
33780  $as_echo_n "(cached) " >&6
33781else
33782  if test -n "$ac_ct_CXX"; then
33783  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
33784else
33785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33786for as_dir in $PATH
33787do
33788  IFS=$as_save_IFS
33789  test -z "$as_dir" && as_dir=.
33790    for ac_exec_ext in '' $ac_executable_extensions; do
33791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33792    ac_cv_prog_ac_ct_CXX="$ac_prog"
33793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33794    break 2
33795  fi
33796done
33797  done
33798IFS=$as_save_IFS
33799
33800fi
33801fi
33802ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
33803if test -n "$ac_ct_CXX"; then
33804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
33805$as_echo "$ac_ct_CXX" >&6; }
33806else
33807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33808$as_echo "no" >&6; }
33809fi
33810
33811
33812  test -n "$ac_ct_CXX" && break
33813done
33814
33815  if test "x$ac_ct_CXX" = x; then
33816    CXX="g++"
33817  else
33818    case $cross_compiling:$ac_tool_warned in
33819yes:)
33820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33822ac_tool_warned=yes ;;
33823esac
33824    CXX=$ac_ct_CXX
33825  fi
33826fi
33827
33828  fi
33829fi
33830# Provide some information about the compiler.
33831$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
33832set X $ac_compile
33833ac_compiler=$2
33834for ac_option in --version -v -V -qversion; do
33835  { { ac_try="$ac_compiler $ac_option >&5"
33836case "(($ac_try" in
33837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33838  *) ac_try_echo=$ac_try;;
33839esac
33840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33841$as_echo "$ac_try_echo"; } >&5
33842  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33843  ac_status=$?
33844  if test -s conftest.err; then
33845    sed '10a\
33846... rest of stderr output deleted ...
33847         10q' conftest.err >conftest.er1
33848    cat conftest.er1 >&5
33849  fi
33850  rm -f conftest.er1 conftest.err
33851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33852  test $ac_status = 0; }
33853done
33854
33855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
33856$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
33857if ${ac_cv_cxx_compiler_gnu+:} false; then :
33858  $as_echo_n "(cached) " >&6
33859else
33860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33861/* end confdefs.h.  */
33862
33863int
33864main ()
33865{
33866#ifndef __GNUC__
33867       choke me
33868#endif
33869
33870  ;
33871  return 0;
33872}
33873_ACEOF
33874if ac_fn_cxx_try_compile "$LINENO"; then :
33875  ac_compiler_gnu=yes
33876else
33877  ac_compiler_gnu=no
33878fi
33879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33880ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
33881
33882fi
33883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
33884$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
33885if test $ac_compiler_gnu = yes; then
33886  GXX=yes
33887else
33888  GXX=
33889fi
33890ac_test_CXXFLAGS=${CXXFLAGS+set}
33891ac_save_CXXFLAGS=$CXXFLAGS
33892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
33893$as_echo_n "checking whether $CXX accepts -g... " >&6; }
33894if ${ac_cv_prog_cxx_g+:} false; then :
33895  $as_echo_n "(cached) " >&6
33896else
33897  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
33898   ac_cxx_werror_flag=yes
33899   ac_cv_prog_cxx_g=no
33900   CXXFLAGS="-g"
33901   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33902/* end confdefs.h.  */
33903
33904int
33905main ()
33906{
33907
33908  ;
33909  return 0;
33910}
33911_ACEOF
33912if ac_fn_cxx_try_compile "$LINENO"; then :
33913  ac_cv_prog_cxx_g=yes
33914else
33915  CXXFLAGS=""
33916      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33917/* end confdefs.h.  */
33918
33919int
33920main ()
33921{
33922
33923  ;
33924  return 0;
33925}
33926_ACEOF
33927if ac_fn_cxx_try_compile "$LINENO"; then :
33928
33929else
33930  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33931	 CXXFLAGS="-g"
33932	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33933/* end confdefs.h.  */
33934
33935int
33936main ()
33937{
33938
33939  ;
33940  return 0;
33941}
33942_ACEOF
33943if ac_fn_cxx_try_compile "$LINENO"; then :
33944  ac_cv_prog_cxx_g=yes
33945fi
33946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33947fi
33948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33949fi
33950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33951   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
33952fi
33953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
33954$as_echo "$ac_cv_prog_cxx_g" >&6; }
33955if test "$ac_test_CXXFLAGS" = set; then
33956  CXXFLAGS=$ac_save_CXXFLAGS
33957elif test $ac_cv_prog_cxx_g = yes; then
33958  if test "$GXX" = yes; then
33959    CXXFLAGS="-g -O2"
33960  else
33961    CXXFLAGS="-g"
33962  fi
33963else
33964  if test "$GXX" = yes; then
33965    CXXFLAGS="-O2"
33966  else
33967    CXXFLAGS=
33968  fi
33969fi
33970ac_ext=cpp
33971ac_cpp='$CXXCPP $CPPFLAGS'
33972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33975
33976
33977  #
33978  # Setup the preprocessor (CPP and CXXCPP)
33979  #
33980  ac_ext=c
33981ac_cpp='$CPP $CPPFLAGS'
33982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33984ac_compiler_gnu=$ac_cv_c_compiler_gnu
33985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
33986$as_echo_n "checking how to run the C preprocessor... " >&6; }
33987# On Suns, sometimes $CPP names a directory.
33988if test -n "$CPP" && test -d "$CPP"; then
33989  CPP=
33990fi
33991if test -z "$CPP"; then
33992  if ${ac_cv_prog_CPP+:} false; then :
33993  $as_echo_n "(cached) " >&6
33994else
33995      # Double quotes because CPP needs to be expanded
33996    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
33997    do
33998      ac_preproc_ok=false
33999for ac_c_preproc_warn_flag in '' yes
34000do
34001  # Use a header file that comes with gcc, so configuring glibc
34002  # with a fresh cross-compiler works.
34003  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34004  # <limits.h> exists even on freestanding compilers.
34005  # On the NeXT, cc -E runs the code through the compiler's parser,
34006  # not just through cpp. "Syntax error" is here to catch this case.
34007  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34008/* end confdefs.h.  */
34009#ifdef __STDC__
34010# include <limits.h>
34011#else
34012# include <assert.h>
34013#endif
34014		     Syntax error
34015_ACEOF
34016if ac_fn_c_try_cpp "$LINENO"; then :
34017
34018else
34019  # Broken: fails on valid input.
34020continue
34021fi
34022rm -f conftest.err conftest.i conftest.$ac_ext
34023
34024  # OK, works on sane cases.  Now check whether nonexistent headers
34025  # can be detected and how.
34026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34027/* end confdefs.h.  */
34028#include <ac_nonexistent.h>
34029_ACEOF
34030if ac_fn_c_try_cpp "$LINENO"; then :
34031  # Broken: success on invalid input.
34032continue
34033else
34034  # Passes both tests.
34035ac_preproc_ok=:
34036break
34037fi
34038rm -f conftest.err conftest.i conftest.$ac_ext
34039
34040done
34041# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34042rm -f conftest.i conftest.err conftest.$ac_ext
34043if $ac_preproc_ok; then :
34044  break
34045fi
34046
34047    done
34048    ac_cv_prog_CPP=$CPP
34049
34050fi
34051  CPP=$ac_cv_prog_CPP
34052else
34053  ac_cv_prog_CPP=$CPP
34054fi
34055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34056$as_echo "$CPP" >&6; }
34057ac_preproc_ok=false
34058for ac_c_preproc_warn_flag in '' yes
34059do
34060  # Use a header file that comes with gcc, so configuring glibc
34061  # with a fresh cross-compiler works.
34062  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34063  # <limits.h> exists even on freestanding compilers.
34064  # On the NeXT, cc -E runs the code through the compiler's parser,
34065  # not just through cpp. "Syntax error" is here to catch this case.
34066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34067/* end confdefs.h.  */
34068#ifdef __STDC__
34069# include <limits.h>
34070#else
34071# include <assert.h>
34072#endif
34073		     Syntax error
34074_ACEOF
34075if ac_fn_c_try_cpp "$LINENO"; then :
34076
34077else
34078  # Broken: fails on valid input.
34079continue
34080fi
34081rm -f conftest.err conftest.i conftest.$ac_ext
34082
34083  # OK, works on sane cases.  Now check whether nonexistent headers
34084  # can be detected and how.
34085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086/* end confdefs.h.  */
34087#include <ac_nonexistent.h>
34088_ACEOF
34089if ac_fn_c_try_cpp "$LINENO"; then :
34090  # Broken: success on invalid input.
34091continue
34092else
34093  # Passes both tests.
34094ac_preproc_ok=:
34095break
34096fi
34097rm -f conftest.err conftest.i conftest.$ac_ext
34098
34099done
34100# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34101rm -f conftest.i conftest.err conftest.$ac_ext
34102if $ac_preproc_ok; then :
34103
34104else
34105  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34106$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34107as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34108See \`config.log' for more details" "$LINENO" 5; }
34109fi
34110
34111ac_ext=cpp
34112ac_cpp='$CXXCPP $CPPFLAGS'
34113ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34114ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34115ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34116
34117
34118  # Only process if variable expands to non-empty
34119
34120  if test "x$CPP" != x; then
34121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34122
34123  # First separate the path from the arguments. This will split at the first
34124  # space.
34125  complete="$CPP"
34126  path="${complete%% *}"
34127  tmp="$complete EOL"
34128  arguments="${tmp#* }"
34129
34130  # Input might be given as Windows format, start by converting to
34131  # unix format.
34132  new_path=`$CYGPATH -u "$path"`
34133
34134  # Now try to locate executable using which
34135  new_path=`$WHICH "$new_path" 2> /dev/null`
34136  # bat and cmd files are not always considered executable in cygwin causing which
34137  # to not find them
34138  if test "x$new_path" = x \
34139      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34140      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34141    new_path=`$CYGPATH -u "$path"`
34142  fi
34143  if test "x$new_path" = x; then
34144    # Oops. Which didn't find the executable.
34145    # The splitting of arguments from the executable at a space might have been incorrect,
34146    # since paths with space are more likely in Windows. Give it another try with the whole
34147    # argument.
34148    path="$complete"
34149    arguments="EOL"
34150    new_path=`$CYGPATH -u "$path"`
34151    new_path=`$WHICH "$new_path" 2> /dev/null`
34152    # bat and cmd files are not always considered executable in cygwin causing which
34153    # to not find them
34154    if test "x$new_path" = x \
34155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34157      new_path=`$CYGPATH -u "$path"`
34158    fi
34159    if test "x$new_path" = x; then
34160      # It's still not found. Now this is an unrecoverable error.
34161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34162$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34163      has_space=`$ECHO "$complete" | $GREP " "`
34164      if test "x$has_space" != x; then
34165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34167      fi
34168      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34169    fi
34170  fi
34171
34172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34175  # "foo.exe" is OK but "foo" is an error.
34176  #
34177  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34178  # It is also a way to make sure we got the proper file name for the real test later on.
34179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34180  if test "x$test_shortpath" = x; then
34181    # Short path failed, file does not exist as specified.
34182    # Try adding .exe or .cmd
34183    if test -f "${new_path}.exe"; then
34184      input_to_shortpath="${new_path}.exe"
34185    elif test -f "${new_path}.cmd"; then
34186      input_to_shortpath="${new_path}.cmd"
34187    else
34188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34189$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34190      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34191$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34192      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34193    fi
34194  else
34195    input_to_shortpath="$new_path"
34196  fi
34197
34198  # Call helper function which possibly converts this using DOS-style short mode.
34199  # If so, the updated path is stored in $new_path.
34200  new_path="$input_to_shortpath"
34201
34202  input_path="$input_to_shortpath"
34203  # Check if we need to convert this using DOS-style short mode. If the path
34204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34205  # take no chances and rewrite it.
34206  # Note: m4 eats our [], so we need to use [ and ] instead.
34207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34208  if test "x$has_forbidden_chars" != x; then
34209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34213      # Going to short mode and back again did indeed matter. Since short mode is
34214      # case insensitive, let's make it lowercase to improve readability.
34215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34216      # Now convert it back to Unix-style (cygpath)
34217      input_path=`$CYGPATH -u "$shortmode_path"`
34218      new_path="$input_path"
34219    fi
34220  fi
34221
34222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34223  if test "x$test_cygdrive_prefix" = x; then
34224    # As a simple fix, exclude /usr/bin since it's not a real path.
34225    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34227      # a path prefixed by /cygdrive for fixpath to work.
34228      new_path="$CYGWIN_ROOT_PATH$input_path"
34229    fi
34230  fi
34231
34232  # remove trailing .exe if any
34233  new_path="${new_path/%.exe/}"
34234
34235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34236
34237  # First separate the path from the arguments. This will split at the first
34238  # space.
34239  complete="$CPP"
34240  path="${complete%% *}"
34241  tmp="$complete EOL"
34242  arguments="${tmp#* }"
34243
34244  # Input might be given as Windows format, start by converting to
34245  # unix format.
34246  new_path="$path"
34247
34248  windows_path="$new_path"
34249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34250    unix_path=`$CYGPATH -u "$windows_path"`
34251    new_path="$unix_path"
34252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34254    new_path="$unix_path"
34255  fi
34256
34257
34258  # Now try to locate executable using which
34259  new_path=`$WHICH "$new_path" 2> /dev/null`
34260
34261  if test "x$new_path" = x; then
34262    # Oops. Which didn't find the executable.
34263    # The splitting of arguments from the executable at a space might have been incorrect,
34264    # since paths with space are more likely in Windows. Give it another try with the whole
34265    # argument.
34266    path="$complete"
34267    arguments="EOL"
34268    new_path="$path"
34269
34270  windows_path="$new_path"
34271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34272    unix_path=`$CYGPATH -u "$windows_path"`
34273    new_path="$unix_path"
34274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34276    new_path="$unix_path"
34277  fi
34278
34279
34280    new_path=`$WHICH "$new_path" 2> /dev/null`
34281    # bat and cmd files are not always considered executable in MSYS causing which
34282    # to not find them
34283    if test "x$new_path" = x \
34284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34286      new_path="$path"
34287
34288  windows_path="$new_path"
34289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34290    unix_path=`$CYGPATH -u "$windows_path"`
34291    new_path="$unix_path"
34292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34294    new_path="$unix_path"
34295  fi
34296
34297    fi
34298
34299    if test "x$new_path" = x; then
34300      # It's still not found. Now this is an unrecoverable error.
34301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34302$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34303      has_space=`$ECHO "$complete" | $GREP " "`
34304      if test "x$has_space" != x; then
34305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34307      fi
34308      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34309    fi
34310  fi
34311
34312  # Now new_path has a complete unix path to the binary
34313  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34314    # Keep paths in /bin as-is, but remove trailing .exe if any
34315    new_path="${new_path/%.exe/}"
34316    # Do not save /bin paths to all_fixpath_prefixes!
34317  else
34318    # Not in mixed or Windows style, start by that.
34319    new_path=`cmd //c echo $new_path`
34320
34321  input_path="$new_path"
34322  # Check if we need to convert this using DOS-style short mode. If the path
34323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34324  # take no chances and rewrite it.
34325  # Note: m4 eats our [], so we need to use [ and ] instead.
34326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34327  if test "x$has_forbidden_chars" != x; then
34328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34330  fi
34331
34332    # Output is in $new_path
34333
34334  windows_path="$new_path"
34335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34336    unix_path=`$CYGPATH -u "$windows_path"`
34337    new_path="$unix_path"
34338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34340    new_path="$unix_path"
34341  fi
34342
34343    # remove trailing .exe if any
34344    new_path="${new_path/%.exe/}"
34345
34346    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34347    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34348  fi
34349
34350    else
34351      # We're on a unix platform. Hooray! :)
34352      # First separate the path from the arguments. This will split at the first
34353      # space.
34354      complete="$CPP"
34355      path="${complete%% *}"
34356      tmp="$complete EOL"
34357      arguments="${tmp#* }"
34358
34359      # Cannot rely on the command "which" here since it doesn't always work.
34360      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34361      if test -z "$is_absolute_path"; then
34362        # Path to executable is not absolute. Find it.
34363        IFS_save="$IFS"
34364        IFS=:
34365        for p in $PATH; do
34366          if test -f "$p/$path" && test -x "$p/$path"; then
34367            new_path="$p/$path"
34368            break
34369          fi
34370        done
34371        IFS="$IFS_save"
34372      else
34373        # This is an absolute path, we can use it without further modifications.
34374        new_path="$path"
34375      fi
34376
34377      if test "x$new_path" = x; then
34378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34379$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34380        has_space=`$ECHO "$complete" | $GREP " "`
34381        if test "x$has_space" != x; then
34382          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34383$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34384        fi
34385        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34386      fi
34387    fi
34388
34389    # Now join together the path and the arguments once again
34390    if test "x$arguments" != xEOL; then
34391      new_complete="$new_path ${arguments% *}"
34392    else
34393      new_complete="$new_path"
34394    fi
34395
34396    if test "x$complete" != "x$new_complete"; then
34397      CPP="$new_complete"
34398      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
34399$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
34400    fi
34401  fi
34402
34403  ac_ext=cpp
34404ac_cpp='$CXXCPP $CPPFLAGS'
34405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
34409$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
34410if test -z "$CXXCPP"; then
34411  if ${ac_cv_prog_CXXCPP+:} false; then :
34412  $as_echo_n "(cached) " >&6
34413else
34414      # Double quotes because CXXCPP needs to be expanded
34415    for CXXCPP in "$CXX -E" "/lib/cpp"
34416    do
34417      ac_preproc_ok=false
34418for ac_cxx_preproc_warn_flag in '' yes
34419do
34420  # Use a header file that comes with gcc, so configuring glibc
34421  # with a fresh cross-compiler works.
34422  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34423  # <limits.h> exists even on freestanding compilers.
34424  # On the NeXT, cc -E runs the code through the compiler's parser,
34425  # not just through cpp. "Syntax error" is here to catch this case.
34426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34427/* end confdefs.h.  */
34428#ifdef __STDC__
34429# include <limits.h>
34430#else
34431# include <assert.h>
34432#endif
34433		     Syntax error
34434_ACEOF
34435if ac_fn_cxx_try_cpp "$LINENO"; then :
34436
34437else
34438  # Broken: fails on valid input.
34439continue
34440fi
34441rm -f conftest.err conftest.i conftest.$ac_ext
34442
34443  # OK, works on sane cases.  Now check whether nonexistent headers
34444  # can be detected and how.
34445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34446/* end confdefs.h.  */
34447#include <ac_nonexistent.h>
34448_ACEOF
34449if ac_fn_cxx_try_cpp "$LINENO"; then :
34450  # Broken: success on invalid input.
34451continue
34452else
34453  # Passes both tests.
34454ac_preproc_ok=:
34455break
34456fi
34457rm -f conftest.err conftest.i conftest.$ac_ext
34458
34459done
34460# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34461rm -f conftest.i conftest.err conftest.$ac_ext
34462if $ac_preproc_ok; then :
34463  break
34464fi
34465
34466    done
34467    ac_cv_prog_CXXCPP=$CXXCPP
34468
34469fi
34470  CXXCPP=$ac_cv_prog_CXXCPP
34471else
34472  ac_cv_prog_CXXCPP=$CXXCPP
34473fi
34474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
34475$as_echo "$CXXCPP" >&6; }
34476ac_preproc_ok=false
34477for ac_cxx_preproc_warn_flag in '' yes
34478do
34479  # Use a header file that comes with gcc, so configuring glibc
34480  # with a fresh cross-compiler works.
34481  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34482  # <limits.h> exists even on freestanding compilers.
34483  # On the NeXT, cc -E runs the code through the compiler's parser,
34484  # not just through cpp. "Syntax error" is here to catch this case.
34485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34486/* end confdefs.h.  */
34487#ifdef __STDC__
34488# include <limits.h>
34489#else
34490# include <assert.h>
34491#endif
34492		     Syntax error
34493_ACEOF
34494if ac_fn_cxx_try_cpp "$LINENO"; then :
34495
34496else
34497  # Broken: fails on valid input.
34498continue
34499fi
34500rm -f conftest.err conftest.i conftest.$ac_ext
34501
34502  # OK, works on sane cases.  Now check whether nonexistent headers
34503  # can be detected and how.
34504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34505/* end confdefs.h.  */
34506#include <ac_nonexistent.h>
34507_ACEOF
34508if ac_fn_cxx_try_cpp "$LINENO"; then :
34509  # Broken: success on invalid input.
34510continue
34511else
34512  # Passes both tests.
34513ac_preproc_ok=:
34514break
34515fi
34516rm -f conftest.err conftest.i conftest.$ac_ext
34517
34518done
34519# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34520rm -f conftest.i conftest.err conftest.$ac_ext
34521if $ac_preproc_ok; then :
34522
34523else
34524  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34526as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
34527See \`config.log' for more details" "$LINENO" 5; }
34528fi
34529
34530ac_ext=cpp
34531ac_cpp='$CXXCPP $CPPFLAGS'
34532ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34533ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34534ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34535
34536
34537  # Only process if variable expands to non-empty
34538
34539  if test "x$CXXCPP" != x; then
34540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541
34542  # First separate the path from the arguments. This will split at the first
34543  # space.
34544  complete="$CXXCPP"
34545  path="${complete%% *}"
34546  tmp="$complete EOL"
34547  arguments="${tmp#* }"
34548
34549  # Input might be given as Windows format, start by converting to
34550  # unix format.
34551  new_path=`$CYGPATH -u "$path"`
34552
34553  # Now try to locate executable using which
34554  new_path=`$WHICH "$new_path" 2> /dev/null`
34555  # bat and cmd files are not always considered executable in cygwin causing which
34556  # to not find them
34557  if test "x$new_path" = x \
34558      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34559      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34560    new_path=`$CYGPATH -u "$path"`
34561  fi
34562  if test "x$new_path" = x; then
34563    # Oops. Which didn't find the executable.
34564    # The splitting of arguments from the executable at a space might have been incorrect,
34565    # since paths with space are more likely in Windows. Give it another try with the whole
34566    # argument.
34567    path="$complete"
34568    arguments="EOL"
34569    new_path=`$CYGPATH -u "$path"`
34570    new_path=`$WHICH "$new_path" 2> /dev/null`
34571    # bat and cmd files are not always considered executable in cygwin causing which
34572    # to not find them
34573    if test "x$new_path" = x \
34574        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34575        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34576      new_path=`$CYGPATH -u "$path"`
34577    fi
34578    if test "x$new_path" = x; then
34579      # It's still not found. Now this is an unrecoverable error.
34580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34581$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34582      has_space=`$ECHO "$complete" | $GREP " "`
34583      if test "x$has_space" != x; then
34584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34586      fi
34587      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34588    fi
34589  fi
34590
34591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34594  # "foo.exe" is OK but "foo" is an error.
34595  #
34596  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34597  # It is also a way to make sure we got the proper file name for the real test later on.
34598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34599  if test "x$test_shortpath" = x; then
34600    # Short path failed, file does not exist as specified.
34601    # Try adding .exe or .cmd
34602    if test -f "${new_path}.exe"; then
34603      input_to_shortpath="${new_path}.exe"
34604    elif test -f "${new_path}.cmd"; then
34605      input_to_shortpath="${new_path}.cmd"
34606    else
34607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
34608$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
34609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34611      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34612    fi
34613  else
34614    input_to_shortpath="$new_path"
34615  fi
34616
34617  # Call helper function which possibly converts this using DOS-style short mode.
34618  # If so, the updated path is stored in $new_path.
34619  new_path="$input_to_shortpath"
34620
34621  input_path="$input_to_shortpath"
34622  # Check if we need to convert this using DOS-style short mode. If the path
34623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34624  # take no chances and rewrite it.
34625  # Note: m4 eats our [], so we need to use [ and ] instead.
34626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34627  if test "x$has_forbidden_chars" != x; then
34628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34632      # Going to short mode and back again did indeed matter. Since short mode is
34633      # case insensitive, let's make it lowercase to improve readability.
34634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34635      # Now convert it back to Unix-style (cygpath)
34636      input_path=`$CYGPATH -u "$shortmode_path"`
34637      new_path="$input_path"
34638    fi
34639  fi
34640
34641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34642  if test "x$test_cygdrive_prefix" = x; then
34643    # As a simple fix, exclude /usr/bin since it's not a real path.
34644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34646      # a path prefixed by /cygdrive for fixpath to work.
34647      new_path="$CYGWIN_ROOT_PATH$input_path"
34648    fi
34649  fi
34650
34651  # remove trailing .exe if any
34652  new_path="${new_path/%.exe/}"
34653
34654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34655
34656  # First separate the path from the arguments. This will split at the first
34657  # space.
34658  complete="$CXXCPP"
34659  path="${complete%% *}"
34660  tmp="$complete EOL"
34661  arguments="${tmp#* }"
34662
34663  # Input might be given as Windows format, start by converting to
34664  # unix format.
34665  new_path="$path"
34666
34667  windows_path="$new_path"
34668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34669    unix_path=`$CYGPATH -u "$windows_path"`
34670    new_path="$unix_path"
34671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34673    new_path="$unix_path"
34674  fi
34675
34676
34677  # Now try to locate executable using which
34678  new_path=`$WHICH "$new_path" 2> /dev/null`
34679
34680  if test "x$new_path" = x; then
34681    # Oops. Which didn't find the executable.
34682    # The splitting of arguments from the executable at a space might have been incorrect,
34683    # since paths with space are more likely in Windows. Give it another try with the whole
34684    # argument.
34685    path="$complete"
34686    arguments="EOL"
34687    new_path="$path"
34688
34689  windows_path="$new_path"
34690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691    unix_path=`$CYGPATH -u "$windows_path"`
34692    new_path="$unix_path"
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695    new_path="$unix_path"
34696  fi
34697
34698
34699    new_path=`$WHICH "$new_path" 2> /dev/null`
34700    # bat and cmd files are not always considered executable in MSYS causing which
34701    # to not find them
34702    if test "x$new_path" = x \
34703        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34704        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34705      new_path="$path"
34706
34707  windows_path="$new_path"
34708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34709    unix_path=`$CYGPATH -u "$windows_path"`
34710    new_path="$unix_path"
34711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34713    new_path="$unix_path"
34714  fi
34715
34716    fi
34717
34718    if test "x$new_path" = x; then
34719      # It's still not found. Now this is an unrecoverable error.
34720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34721$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34722      has_space=`$ECHO "$complete" | $GREP " "`
34723      if test "x$has_space" != x; then
34724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34726      fi
34727      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34728    fi
34729  fi
34730
34731  # Now new_path has a complete unix path to the binary
34732  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34733    # Keep paths in /bin as-is, but remove trailing .exe if any
34734    new_path="${new_path/%.exe/}"
34735    # Do not save /bin paths to all_fixpath_prefixes!
34736  else
34737    # Not in mixed or Windows style, start by that.
34738    new_path=`cmd //c echo $new_path`
34739
34740  input_path="$new_path"
34741  # Check if we need to convert this using DOS-style short mode. If the path
34742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34743  # take no chances and rewrite it.
34744  # Note: m4 eats our [], so we need to use [ and ] instead.
34745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34746  if test "x$has_forbidden_chars" != x; then
34747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34749  fi
34750
34751    # Output is in $new_path
34752
34753  windows_path="$new_path"
34754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34755    unix_path=`$CYGPATH -u "$windows_path"`
34756    new_path="$unix_path"
34757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34759    new_path="$unix_path"
34760  fi
34761
34762    # remove trailing .exe if any
34763    new_path="${new_path/%.exe/}"
34764
34765    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34766    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34767  fi
34768
34769    else
34770      # We're on a unix platform. Hooray! :)
34771      # First separate the path from the arguments. This will split at the first
34772      # space.
34773      complete="$CXXCPP"
34774      path="${complete%% *}"
34775      tmp="$complete EOL"
34776      arguments="${tmp#* }"
34777
34778      # Cannot rely on the command "which" here since it doesn't always work.
34779      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34780      if test -z "$is_absolute_path"; then
34781        # Path to executable is not absolute. Find it.
34782        IFS_save="$IFS"
34783        IFS=:
34784        for p in $PATH; do
34785          if test -f "$p/$path" && test -x "$p/$path"; then
34786            new_path="$p/$path"
34787            break
34788          fi
34789        done
34790        IFS="$IFS_save"
34791      else
34792        # This is an absolute path, we can use it without further modifications.
34793        new_path="$path"
34794      fi
34795
34796      if test "x$new_path" = x; then
34797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
34798$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
34799        has_space=`$ECHO "$complete" | $GREP " "`
34800        if test "x$has_space" != x; then
34801          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34802$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34803        fi
34804        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
34805      fi
34806    fi
34807
34808    # Now join together the path and the arguments once again
34809    if test "x$arguments" != xEOL; then
34810      new_complete="$new_path ${arguments% *}"
34811    else
34812      new_complete="$new_path"
34813    fi
34814
34815    if test "x$complete" != "x$new_complete"; then
34816      CXXCPP="$new_complete"
34817      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
34818$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
34819    fi
34820  fi
34821
34822
34823  #
34824  # Setup the linker (LD)
34825  #
34826  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34827    # In the Microsoft toolchain we have a separate LD command "link".
34828    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
34829    # a cygwin program for something completely different.
34830    # Extract the first word of "link", so it can be a program name with args.
34831set dummy link; ac_word=$2
34832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34833$as_echo_n "checking for $ac_word... " >&6; }
34834if ${ac_cv_prog_LD+:} false; then :
34835  $as_echo_n "(cached) " >&6
34836else
34837  if test -n "$LD"; then
34838  ac_cv_prog_LD="$LD" # Let the user override the test.
34839else
34840  ac_prog_rejected=no
34841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34842for as_dir in $PATH
34843do
34844  IFS=$as_save_IFS
34845  test -z "$as_dir" && as_dir=.
34846    for ac_exec_ext in '' $ac_executable_extensions; do
34847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34848    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
34849       ac_prog_rejected=yes
34850       continue
34851     fi
34852    ac_cv_prog_LD="link"
34853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34854    break 2
34855  fi
34856done
34857  done
34858IFS=$as_save_IFS
34859
34860if test $ac_prog_rejected = yes; then
34861  # We found a bogon in the path, so make sure we never use it.
34862  set dummy $ac_cv_prog_LD
34863  shift
34864  if test $# != 0; then
34865    # We chose a different compiler from the bogus one.
34866    # However, it has the same basename, so the bogon will be chosen
34867    # first if we set LD to just the basename; use the full file name.
34868    shift
34869    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
34870  fi
34871fi
34872fi
34873fi
34874LD=$ac_cv_prog_LD
34875if test -n "$LD"; then
34876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34877$as_echo "$LD" >&6; }
34878else
34879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34880$as_echo "no" >&6; }
34881fi
34882
34883
34884
34885  # Only process if variable expands to non-empty
34886
34887  if test "x$LD" != x; then
34888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34889
34890  # First separate the path from the arguments. This will split at the first
34891  # space.
34892  complete="$LD"
34893  path="${complete%% *}"
34894  tmp="$complete EOL"
34895  arguments="${tmp#* }"
34896
34897  # Input might be given as Windows format, start by converting to
34898  # unix format.
34899  new_path=`$CYGPATH -u "$path"`
34900
34901  # Now try to locate executable using which
34902  new_path=`$WHICH "$new_path" 2> /dev/null`
34903  # bat and cmd files are not always considered executable in cygwin causing which
34904  # to not find them
34905  if test "x$new_path" = x \
34906      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34907      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34908    new_path=`$CYGPATH -u "$path"`
34909  fi
34910  if test "x$new_path" = x; then
34911    # Oops. Which didn't find the executable.
34912    # The splitting of arguments from the executable at a space might have been incorrect,
34913    # since paths with space are more likely in Windows. Give it another try with the whole
34914    # argument.
34915    path="$complete"
34916    arguments="EOL"
34917    new_path=`$CYGPATH -u "$path"`
34918    new_path=`$WHICH "$new_path" 2> /dev/null`
34919    # bat and cmd files are not always considered executable in cygwin causing which
34920    # to not find them
34921    if test "x$new_path" = x \
34922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34924      new_path=`$CYGPATH -u "$path"`
34925    fi
34926    if test "x$new_path" = x; then
34927      # It's still not found. Now this is an unrecoverable error.
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
34929$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
34930      has_space=`$ECHO "$complete" | $GREP " "`
34931      if test "x$has_space" != x; then
34932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34934      fi
34935      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34936    fi
34937  fi
34938
34939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34942  # "foo.exe" is OK but "foo" is an error.
34943  #
34944  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34945  # It is also a way to make sure we got the proper file name for the real test later on.
34946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34947  if test "x$test_shortpath" = x; then
34948    # Short path failed, file does not exist as specified.
34949    # Try adding .exe or .cmd
34950    if test -f "${new_path}.exe"; then
34951      input_to_shortpath="${new_path}.exe"
34952    elif test -f "${new_path}.cmd"; then
34953      input_to_shortpath="${new_path}.cmd"
34954    else
34955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
34956$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
34957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34959      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
34960    fi
34961  else
34962    input_to_shortpath="$new_path"
34963  fi
34964
34965  # Call helper function which possibly converts this using DOS-style short mode.
34966  # If so, the updated path is stored in $new_path.
34967  new_path="$input_to_shortpath"
34968
34969  input_path="$input_to_shortpath"
34970  # Check if we need to convert this using DOS-style short mode. If the path
34971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34972  # take no chances and rewrite it.
34973  # Note: m4 eats our [], so we need to use [ and ] instead.
34974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34975  if test "x$has_forbidden_chars" != x; then
34976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34980      # Going to short mode and back again did indeed matter. Since short mode is
34981      # case insensitive, let's make it lowercase to improve readability.
34982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34983      # Now convert it back to Unix-style (cygpath)
34984      input_path=`$CYGPATH -u "$shortmode_path"`
34985      new_path="$input_path"
34986    fi
34987  fi
34988
34989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34990  if test "x$test_cygdrive_prefix" = x; then
34991    # As a simple fix, exclude /usr/bin since it's not a real path.
34992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34994      # a path prefixed by /cygdrive for fixpath to work.
34995      new_path="$CYGWIN_ROOT_PATH$input_path"
34996    fi
34997  fi
34998
34999  # remove trailing .exe if any
35000  new_path="${new_path/%.exe/}"
35001
35002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35003
35004  # First separate the path from the arguments. This will split at the first
35005  # space.
35006  complete="$LD"
35007  path="${complete%% *}"
35008  tmp="$complete EOL"
35009  arguments="${tmp#* }"
35010
35011  # Input might be given as Windows format, start by converting to
35012  # unix format.
35013  new_path="$path"
35014
35015  windows_path="$new_path"
35016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35017    unix_path=`$CYGPATH -u "$windows_path"`
35018    new_path="$unix_path"
35019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35021    new_path="$unix_path"
35022  fi
35023
35024
35025  # Now try to locate executable using which
35026  new_path=`$WHICH "$new_path" 2> /dev/null`
35027
35028  if test "x$new_path" = x; then
35029    # Oops. Which didn't find the executable.
35030    # The splitting of arguments from the executable at a space might have been incorrect,
35031    # since paths with space are more likely in Windows. Give it another try with the whole
35032    # argument.
35033    path="$complete"
35034    arguments="EOL"
35035    new_path="$path"
35036
35037  windows_path="$new_path"
35038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35039    unix_path=`$CYGPATH -u "$windows_path"`
35040    new_path="$unix_path"
35041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35043    new_path="$unix_path"
35044  fi
35045
35046
35047    new_path=`$WHICH "$new_path" 2> /dev/null`
35048    # bat and cmd files are not always considered executable in MSYS causing which
35049    # to not find them
35050    if test "x$new_path" = x \
35051        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35052        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35053      new_path="$path"
35054
35055  windows_path="$new_path"
35056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35057    unix_path=`$CYGPATH -u "$windows_path"`
35058    new_path="$unix_path"
35059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35061    new_path="$unix_path"
35062  fi
35063
35064    fi
35065
35066    if test "x$new_path" = x; then
35067      # It's still not found. Now this is an unrecoverable error.
35068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35069$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35070      has_space=`$ECHO "$complete" | $GREP " "`
35071      if test "x$has_space" != x; then
35072        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35073$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35074      fi
35075      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35076    fi
35077  fi
35078
35079  # Now new_path has a complete unix path to the binary
35080  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35081    # Keep paths in /bin as-is, but remove trailing .exe if any
35082    new_path="${new_path/%.exe/}"
35083    # Do not save /bin paths to all_fixpath_prefixes!
35084  else
35085    # Not in mixed or Windows style, start by that.
35086    new_path=`cmd //c echo $new_path`
35087
35088  input_path="$new_path"
35089  # Check if we need to convert this using DOS-style short mode. If the path
35090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35091  # take no chances and rewrite it.
35092  # Note: m4 eats our [], so we need to use [ and ] instead.
35093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35094  if test "x$has_forbidden_chars" != x; then
35095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35097  fi
35098
35099    # Output is in $new_path
35100
35101  windows_path="$new_path"
35102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35103    unix_path=`$CYGPATH -u "$windows_path"`
35104    new_path="$unix_path"
35105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35107    new_path="$unix_path"
35108  fi
35109
35110    # remove trailing .exe if any
35111    new_path="${new_path/%.exe/}"
35112
35113    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35114    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35115  fi
35116
35117    else
35118      # We're on a unix platform. Hooray! :)
35119      # First separate the path from the arguments. This will split at the first
35120      # space.
35121      complete="$LD"
35122      path="${complete%% *}"
35123      tmp="$complete EOL"
35124      arguments="${tmp#* }"
35125
35126      # Cannot rely on the command "which" here since it doesn't always work.
35127      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35128      if test -z "$is_absolute_path"; then
35129        # Path to executable is not absolute. Find it.
35130        IFS_save="$IFS"
35131        IFS=:
35132        for p in $PATH; do
35133          if test -f "$p/$path" && test -x "$p/$path"; then
35134            new_path="$p/$path"
35135            break
35136          fi
35137        done
35138        IFS="$IFS_save"
35139      else
35140        # This is an absolute path, we can use it without further modifications.
35141        new_path="$path"
35142      fi
35143
35144      if test "x$new_path" = x; then
35145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35146$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35147        has_space=`$ECHO "$complete" | $GREP " "`
35148        if test "x$has_space" != x; then
35149          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35150$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35151        fi
35152        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35153      fi
35154    fi
35155
35156    # Now join together the path and the arguments once again
35157    if test "x$arguments" != xEOL; then
35158      new_complete="$new_path ${arguments% *}"
35159    else
35160      new_complete="$new_path"
35161    fi
35162
35163    if test "x$complete" != "x$new_complete"; then
35164      LD="$new_complete"
35165      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35166$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35167    fi
35168  fi
35169
35170    # Verify that we indeed succeeded with this trick.
35171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35172$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35173    "$LD" --version > /dev/null
35174    if test $? -eq 0 ; then
35175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35176$as_echo "no" >&6; }
35177      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35178    else
35179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35180$as_echo "yes" >&6; }
35181    fi
35182    LDCXX="$LD"
35183  else
35184    # All other toolchains use the compiler to link.
35185    LD="$CC"
35186    LDCXX="$CXX"
35187  fi
35188
35189  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35190
35191
35192  #
35193  # Setup the assembler (AS)
35194  #
35195  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35196    # FIXME: should this really be solaris, or solstudio?
35197
35198
35199  # Publish this variable in the help.
35200
35201
35202  if [ -z "${AS+x}" ]; then
35203    # The variable is not set by user, try to locate tool using the code snippet
35204    for ac_prog in as
35205do
35206  # Extract the first word of "$ac_prog", so it can be a program name with args.
35207set dummy $ac_prog; ac_word=$2
35208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35209$as_echo_n "checking for $ac_word... " >&6; }
35210if ${ac_cv_path_AS+:} false; then :
35211  $as_echo_n "(cached) " >&6
35212else
35213  case $AS in
35214  [\\/]* | ?:[\\/]*)
35215  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35216  ;;
35217  *)
35218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35219for as_dir in $PATH
35220do
35221  IFS=$as_save_IFS
35222  test -z "$as_dir" && as_dir=.
35223    for ac_exec_ext in '' $ac_executable_extensions; do
35224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35225    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35227    break 2
35228  fi
35229done
35230  done
35231IFS=$as_save_IFS
35232
35233  ;;
35234esac
35235fi
35236AS=$ac_cv_path_AS
35237if test -n "$AS"; then
35238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35239$as_echo "$AS" >&6; }
35240else
35241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35242$as_echo "no" >&6; }
35243fi
35244
35245
35246  test -n "$AS" && break
35247done
35248
35249  else
35250    # The variable is set, but is it from the command line or the environment?
35251
35252    # Try to remove the string !AS! from our list.
35253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35255      # If it failed, the variable was not from the command line. Ignore it,
35256      # but warn the user (except for BASH, which is always set by the calling BASH).
35257      if test "xAS" != xBASH; then
35258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35259$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35260      fi
35261      # Try to locate tool using the code snippet
35262      for ac_prog in as
35263do
35264  # Extract the first word of "$ac_prog", so it can be a program name with args.
35265set dummy $ac_prog; ac_word=$2
35266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35267$as_echo_n "checking for $ac_word... " >&6; }
35268if ${ac_cv_path_AS+:} false; then :
35269  $as_echo_n "(cached) " >&6
35270else
35271  case $AS in
35272  [\\/]* | ?:[\\/]*)
35273  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35274  ;;
35275  *)
35276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35277for as_dir in $PATH
35278do
35279  IFS=$as_save_IFS
35280  test -z "$as_dir" && as_dir=.
35281    for ac_exec_ext in '' $ac_executable_extensions; do
35282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35283    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35285    break 2
35286  fi
35287done
35288  done
35289IFS=$as_save_IFS
35290
35291  ;;
35292esac
35293fi
35294AS=$ac_cv_path_AS
35295if test -n "$AS"; then
35296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35297$as_echo "$AS" >&6; }
35298else
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35300$as_echo "no" >&6; }
35301fi
35302
35303
35304  test -n "$AS" && break
35305done
35306
35307    else
35308      # If it succeeded, then it was overridden by the user. We will use it
35309      # for the tool.
35310
35311      # First remove it from the list of overridden variables, so we can test
35312      # for unknown variables in the end.
35313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35314
35315      # Check if we try to supply an empty value
35316      if test "x$AS" = x; then
35317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35318$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35320$as_echo_n "checking for AS... " >&6; }
35321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35322$as_echo "disabled" >&6; }
35323      else
35324        # Check if the provided tool contains a complete path.
35325        tool_specified="$AS"
35326        tool_basename="${tool_specified##*/}"
35327        if test "x$tool_basename" = "x$tool_specified"; then
35328          # A command without a complete path is provided, search $PATH.
35329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35330$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35331          # Extract the first word of "$tool_basename", so it can be a program name with args.
35332set dummy $tool_basename; ac_word=$2
35333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35334$as_echo_n "checking for $ac_word... " >&6; }
35335if ${ac_cv_path_AS+:} false; then :
35336  $as_echo_n "(cached) " >&6
35337else
35338  case $AS in
35339  [\\/]* | ?:[\\/]*)
35340  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35341  ;;
35342  *)
35343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35344for as_dir in $PATH
35345do
35346  IFS=$as_save_IFS
35347  test -z "$as_dir" && as_dir=.
35348    for ac_exec_ext in '' $ac_executable_extensions; do
35349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35350    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35352    break 2
35353  fi
35354done
35355  done
35356IFS=$as_save_IFS
35357
35358  ;;
35359esac
35360fi
35361AS=$ac_cv_path_AS
35362if test -n "$AS"; then
35363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35364$as_echo "$AS" >&6; }
35365else
35366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35367$as_echo "no" >&6; }
35368fi
35369
35370
35371          if test "x$AS" = x; then
35372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35373          fi
35374        else
35375          # Otherwise we believe it is a complete path. Use it as it is.
35376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
35377$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
35378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35379$as_echo_n "checking for AS... " >&6; }
35380          if test ! -x "$tool_specified"; then
35381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35382$as_echo "not found" >&6; }
35383            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
35384          fi
35385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35386$as_echo "$tool_specified" >&6; }
35387        fi
35388      fi
35389    fi
35390
35391  fi
35392
35393
35394
35395  # Only process if variable expands to non-empty
35396
35397  if test "x$AS" != x; then
35398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35399
35400  # First separate the path from the arguments. This will split at the first
35401  # space.
35402  complete="$AS"
35403  path="${complete%% *}"
35404  tmp="$complete EOL"
35405  arguments="${tmp#* }"
35406
35407  # Input might be given as Windows format, start by converting to
35408  # unix format.
35409  new_path=`$CYGPATH -u "$path"`
35410
35411  # Now try to locate executable using which
35412  new_path=`$WHICH "$new_path" 2> /dev/null`
35413  # bat and cmd files are not always considered executable in cygwin causing which
35414  # to not find them
35415  if test "x$new_path" = x \
35416      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35417      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35418    new_path=`$CYGPATH -u "$path"`
35419  fi
35420  if test "x$new_path" = x; then
35421    # Oops. Which didn't find the executable.
35422    # The splitting of arguments from the executable at a space might have been incorrect,
35423    # since paths with space are more likely in Windows. Give it another try with the whole
35424    # argument.
35425    path="$complete"
35426    arguments="EOL"
35427    new_path=`$CYGPATH -u "$path"`
35428    new_path=`$WHICH "$new_path" 2> /dev/null`
35429    # bat and cmd files are not always considered executable in cygwin causing which
35430    # to not find them
35431    if test "x$new_path" = x \
35432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35434      new_path=`$CYGPATH -u "$path"`
35435    fi
35436    if test "x$new_path" = x; then
35437      # It's still not found. Now this is an unrecoverable error.
35438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35439$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35440      has_space=`$ECHO "$complete" | $GREP " "`
35441      if test "x$has_space" != x; then
35442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35444      fi
35445      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35446    fi
35447  fi
35448
35449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35452  # "foo.exe" is OK but "foo" is an error.
35453  #
35454  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35455  # It is also a way to make sure we got the proper file name for the real test later on.
35456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35457  if test "x$test_shortpath" = x; then
35458    # Short path failed, file does not exist as specified.
35459    # Try adding .exe or .cmd
35460    if test -f "${new_path}.exe"; then
35461      input_to_shortpath="${new_path}.exe"
35462    elif test -f "${new_path}.cmd"; then
35463      input_to_shortpath="${new_path}.cmd"
35464    else
35465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
35466$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
35467      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35468$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35469      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35470    fi
35471  else
35472    input_to_shortpath="$new_path"
35473  fi
35474
35475  # Call helper function which possibly converts this using DOS-style short mode.
35476  # If so, the updated path is stored in $new_path.
35477  new_path="$input_to_shortpath"
35478
35479  input_path="$input_to_shortpath"
35480  # Check if we need to convert this using DOS-style short mode. If the path
35481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35482  # take no chances and rewrite it.
35483  # Note: m4 eats our [], so we need to use [ and ] instead.
35484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35485  if test "x$has_forbidden_chars" != x; then
35486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35490      # Going to short mode and back again did indeed matter. Since short mode is
35491      # case insensitive, let's make it lowercase to improve readability.
35492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35493      # Now convert it back to Unix-style (cygpath)
35494      input_path=`$CYGPATH -u "$shortmode_path"`
35495      new_path="$input_path"
35496    fi
35497  fi
35498
35499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35500  if test "x$test_cygdrive_prefix" = x; then
35501    # As a simple fix, exclude /usr/bin since it's not a real path.
35502    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35504      # a path prefixed by /cygdrive for fixpath to work.
35505      new_path="$CYGWIN_ROOT_PATH$input_path"
35506    fi
35507  fi
35508
35509  # remove trailing .exe if any
35510  new_path="${new_path/%.exe/}"
35511
35512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35513
35514  # First separate the path from the arguments. This will split at the first
35515  # space.
35516  complete="$AS"
35517  path="${complete%% *}"
35518  tmp="$complete EOL"
35519  arguments="${tmp#* }"
35520
35521  # Input might be given as Windows format, start by converting to
35522  # unix format.
35523  new_path="$path"
35524
35525  windows_path="$new_path"
35526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35527    unix_path=`$CYGPATH -u "$windows_path"`
35528    new_path="$unix_path"
35529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35531    new_path="$unix_path"
35532  fi
35533
35534
35535  # Now try to locate executable using which
35536  new_path=`$WHICH "$new_path" 2> /dev/null`
35537
35538  if test "x$new_path" = x; then
35539    # Oops. Which didn't find the executable.
35540    # The splitting of arguments from the executable at a space might have been incorrect,
35541    # since paths with space are more likely in Windows. Give it another try with the whole
35542    # argument.
35543    path="$complete"
35544    arguments="EOL"
35545    new_path="$path"
35546
35547  windows_path="$new_path"
35548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35549    unix_path=`$CYGPATH -u "$windows_path"`
35550    new_path="$unix_path"
35551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35553    new_path="$unix_path"
35554  fi
35555
35556
35557    new_path=`$WHICH "$new_path" 2> /dev/null`
35558    # bat and cmd files are not always considered executable in MSYS causing which
35559    # to not find them
35560    if test "x$new_path" = x \
35561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35563      new_path="$path"
35564
35565  windows_path="$new_path"
35566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35567    unix_path=`$CYGPATH -u "$windows_path"`
35568    new_path="$unix_path"
35569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35571    new_path="$unix_path"
35572  fi
35573
35574    fi
35575
35576    if test "x$new_path" = x; then
35577      # It's still not found. Now this is an unrecoverable error.
35578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35579$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35580      has_space=`$ECHO "$complete" | $GREP " "`
35581      if test "x$has_space" != x; then
35582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35584      fi
35585      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35586    fi
35587  fi
35588
35589  # Now new_path has a complete unix path to the binary
35590  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35591    # Keep paths in /bin as-is, but remove trailing .exe if any
35592    new_path="${new_path/%.exe/}"
35593    # Do not save /bin paths to all_fixpath_prefixes!
35594  else
35595    # Not in mixed or Windows style, start by that.
35596    new_path=`cmd //c echo $new_path`
35597
35598  input_path="$new_path"
35599  # Check if we need to convert this using DOS-style short mode. If the path
35600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35601  # take no chances and rewrite it.
35602  # Note: m4 eats our [], so we need to use [ and ] instead.
35603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35604  if test "x$has_forbidden_chars" != x; then
35605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35607  fi
35608
35609    # Output is in $new_path
35610
35611  windows_path="$new_path"
35612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35613    unix_path=`$CYGPATH -u "$windows_path"`
35614    new_path="$unix_path"
35615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35617    new_path="$unix_path"
35618  fi
35619
35620    # remove trailing .exe if any
35621    new_path="${new_path/%.exe/}"
35622
35623    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35624    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35625  fi
35626
35627    else
35628      # We're on a unix platform. Hooray! :)
35629      # First separate the path from the arguments. This will split at the first
35630      # space.
35631      complete="$AS"
35632      path="${complete%% *}"
35633      tmp="$complete EOL"
35634      arguments="${tmp#* }"
35635
35636      # Cannot rely on the command "which" here since it doesn't always work.
35637      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35638      if test -z "$is_absolute_path"; then
35639        # Path to executable is not absolute. Find it.
35640        IFS_save="$IFS"
35641        IFS=:
35642        for p in $PATH; do
35643          if test -f "$p/$path" && test -x "$p/$path"; then
35644            new_path="$p/$path"
35645            break
35646          fi
35647        done
35648        IFS="$IFS_save"
35649      else
35650        # This is an absolute path, we can use it without further modifications.
35651        new_path="$path"
35652      fi
35653
35654      if test "x$new_path" = x; then
35655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
35656$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
35657        has_space=`$ECHO "$complete" | $GREP " "`
35658        if test "x$has_space" != x; then
35659          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35660$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35661        fi
35662        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
35663      fi
35664    fi
35665
35666    # Now join together the path and the arguments once again
35667    if test "x$arguments" != xEOL; then
35668      new_complete="$new_path ${arguments% *}"
35669    else
35670      new_complete="$new_path"
35671    fi
35672
35673    if test "x$complete" != "x$new_complete"; then
35674      AS="$new_complete"
35675      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
35676$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
35677    fi
35678  fi
35679
35680  else
35681    # FIXME: is this correct for microsoft?
35682    AS="$CC -c"
35683  fi
35684
35685
35686  #
35687  # Setup the archiver (AR)
35688  #
35689  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35690    # The corresponding ar tool is lib.exe (used to create static libraries)
35691    # Extract the first word of "lib", so it can be a program name with args.
35692set dummy lib; ac_word=$2
35693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35694$as_echo_n "checking for $ac_word... " >&6; }
35695if ${ac_cv_prog_AR+:} false; then :
35696  $as_echo_n "(cached) " >&6
35697else
35698  if test -n "$AR"; then
35699  ac_cv_prog_AR="$AR" # Let the user override the test.
35700else
35701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35702for as_dir in $PATH
35703do
35704  IFS=$as_save_IFS
35705  test -z "$as_dir" && as_dir=.
35706    for ac_exec_ext in '' $ac_executable_extensions; do
35707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35708    ac_cv_prog_AR="lib"
35709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35710    break 2
35711  fi
35712done
35713  done
35714IFS=$as_save_IFS
35715
35716fi
35717fi
35718AR=$ac_cv_prog_AR
35719if test -n "$AR"; then
35720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35721$as_echo "$AR" >&6; }
35722else
35723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35724$as_echo "no" >&6; }
35725fi
35726
35727
35728  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
35729
35730
35731  # Publish this variable in the help.
35732
35733
35734  if [ -z "${AR+x}" ]; then
35735    # The variable is not set by user, try to locate tool using the code snippet
35736    if test -n "$ac_tool_prefix"; then
35737  for ac_prog in ar gcc-ar
35738  do
35739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35742$as_echo_n "checking for $ac_word... " >&6; }
35743if ${ac_cv_prog_AR+:} false; then :
35744  $as_echo_n "(cached) " >&6
35745else
35746  if test -n "$AR"; then
35747  ac_cv_prog_AR="$AR" # Let the user override the test.
35748else
35749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35750for as_dir in $PATH
35751do
35752  IFS=$as_save_IFS
35753  test -z "$as_dir" && as_dir=.
35754    for ac_exec_ext in '' $ac_executable_extensions; do
35755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35756    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35758    break 2
35759  fi
35760done
35761  done
35762IFS=$as_save_IFS
35763
35764fi
35765fi
35766AR=$ac_cv_prog_AR
35767if test -n "$AR"; then
35768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35769$as_echo "$AR" >&6; }
35770else
35771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35772$as_echo "no" >&6; }
35773fi
35774
35775
35776    test -n "$AR" && break
35777  done
35778fi
35779if test -z "$AR"; then
35780  ac_ct_AR=$AR
35781  for ac_prog in ar gcc-ar
35782do
35783  # Extract the first word of "$ac_prog", so it can be a program name with args.
35784set dummy $ac_prog; ac_word=$2
35785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35786$as_echo_n "checking for $ac_word... " >&6; }
35787if ${ac_cv_prog_ac_ct_AR+:} false; then :
35788  $as_echo_n "(cached) " >&6
35789else
35790  if test -n "$ac_ct_AR"; then
35791  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35792else
35793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35794for as_dir in $PATH
35795do
35796  IFS=$as_save_IFS
35797  test -z "$as_dir" && as_dir=.
35798    for ac_exec_ext in '' $ac_executable_extensions; do
35799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35800    ac_cv_prog_ac_ct_AR="$ac_prog"
35801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35802    break 2
35803  fi
35804done
35805  done
35806IFS=$as_save_IFS
35807
35808fi
35809fi
35810ac_ct_AR=$ac_cv_prog_ac_ct_AR
35811if test -n "$ac_ct_AR"; then
35812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35813$as_echo "$ac_ct_AR" >&6; }
35814else
35815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35816$as_echo "no" >&6; }
35817fi
35818
35819
35820  test -n "$ac_ct_AR" && break
35821done
35822
35823  if test "x$ac_ct_AR" = x; then
35824    AR=""
35825  else
35826    case $cross_compiling:$ac_tool_warned in
35827yes:)
35828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35830ac_tool_warned=yes ;;
35831esac
35832    AR=$ac_ct_AR
35833  fi
35834fi
35835
35836  else
35837    # The variable is set, but is it from the command line or the environment?
35838
35839    # Try to remove the string !AR! from our list.
35840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
35841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35842      # If it failed, the variable was not from the command line. Ignore it,
35843      # but warn the user (except for BASH, which is always set by the calling BASH).
35844      if test "xAR" != xBASH; then
35845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
35846$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
35847      fi
35848      # Try to locate tool using the code snippet
35849      if test -n "$ac_tool_prefix"; then
35850  for ac_prog in ar gcc-ar
35851  do
35852    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35855$as_echo_n "checking for $ac_word... " >&6; }
35856if ${ac_cv_prog_AR+:} false; then :
35857  $as_echo_n "(cached) " >&6
35858else
35859  if test -n "$AR"; then
35860  ac_cv_prog_AR="$AR" # Let the user override the test.
35861else
35862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35863for as_dir in $PATH
35864do
35865  IFS=$as_save_IFS
35866  test -z "$as_dir" && as_dir=.
35867    for ac_exec_ext in '' $ac_executable_extensions; do
35868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35869    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
35870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35871    break 2
35872  fi
35873done
35874  done
35875IFS=$as_save_IFS
35876
35877fi
35878fi
35879AR=$ac_cv_prog_AR
35880if test -n "$AR"; then
35881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
35882$as_echo "$AR" >&6; }
35883else
35884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35885$as_echo "no" >&6; }
35886fi
35887
35888
35889    test -n "$AR" && break
35890  done
35891fi
35892if test -z "$AR"; then
35893  ac_ct_AR=$AR
35894  for ac_prog in ar gcc-ar
35895do
35896  # Extract the first word of "$ac_prog", so it can be a program name with args.
35897set dummy $ac_prog; ac_word=$2
35898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35899$as_echo_n "checking for $ac_word... " >&6; }
35900if ${ac_cv_prog_ac_ct_AR+:} false; then :
35901  $as_echo_n "(cached) " >&6
35902else
35903  if test -n "$ac_ct_AR"; then
35904  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
35905else
35906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35907for as_dir in $PATH
35908do
35909  IFS=$as_save_IFS
35910  test -z "$as_dir" && as_dir=.
35911    for ac_exec_ext in '' $ac_executable_extensions; do
35912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35913    ac_cv_prog_ac_ct_AR="$ac_prog"
35914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35915    break 2
35916  fi
35917done
35918  done
35919IFS=$as_save_IFS
35920
35921fi
35922fi
35923ac_ct_AR=$ac_cv_prog_ac_ct_AR
35924if test -n "$ac_ct_AR"; then
35925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
35926$as_echo "$ac_ct_AR" >&6; }
35927else
35928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35929$as_echo "no" >&6; }
35930fi
35931
35932
35933  test -n "$ac_ct_AR" && break
35934done
35935
35936  if test "x$ac_ct_AR" = x; then
35937    AR=""
35938  else
35939    case $cross_compiling:$ac_tool_warned in
35940yes:)
35941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35943ac_tool_warned=yes ;;
35944esac
35945    AR=$ac_ct_AR
35946  fi
35947fi
35948
35949    else
35950      # If it succeeded, then it was overridden by the user. We will use it
35951      # for the tool.
35952
35953      # First remove it from the list of overridden variables, so we can test
35954      # for unknown variables in the end.
35955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35956
35957      # Check if we try to supply an empty value
35958      if test "x$AR" = x; then
35959        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
35960$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
35961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
35962$as_echo_n "checking for AR... " >&6; }
35963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35964$as_echo "disabled" >&6; }
35965      else
35966        # Check if the provided tool contains a complete path.
35967        tool_specified="$AR"
35968        tool_basename="${tool_specified##*/}"
35969        if test "x$tool_basename" = "x$tool_specified"; then
35970          # A command without a complete path is provided, search $PATH.
35971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
35972$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
35973          # Extract the first word of "$tool_basename", so it can be a program name with args.
35974set dummy $tool_basename; ac_word=$2
35975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35976$as_echo_n "checking for $ac_word... " >&6; }
35977if ${ac_cv_path_AR+:} false; then :
35978  $as_echo_n "(cached) " >&6
35979else
35980  case $AR in
35981  [\\/]* | ?:[\\/]*)
35982  ac_cv_path_AR="$AR" # Let the user override the test with a path.
35983  ;;
35984  *)
35985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35986for as_dir in $PATH
35987do
35988  IFS=$as_save_IFS
35989  test -z "$as_dir" && as_dir=.
35990    for ac_exec_ext in '' $ac_executable_extensions; do
35991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35992    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
35993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35994    break 2
35995  fi
35996done
35997  done
35998IFS=$as_save_IFS
35999
36000  ;;
36001esac
36002fi
36003AR=$ac_cv_path_AR
36004if test -n "$AR"; then
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36006$as_echo "$AR" >&6; }
36007else
36008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36009$as_echo "no" >&6; }
36010fi
36011
36012
36013          if test "x$AR" = x; then
36014            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36015          fi
36016        else
36017          # Otherwise we believe it is a complete path. Use it as it is.
36018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36019$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36020          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36021$as_echo_n "checking for AR... " >&6; }
36022          if test ! -x "$tool_specified"; then
36023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36024$as_echo "not found" >&6; }
36025            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36026          fi
36027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36028$as_echo "$tool_specified" >&6; }
36029        fi
36030      fi
36031    fi
36032
36033  fi
36034
36035
36036  else
36037
36038
36039  # Publish this variable in the help.
36040
36041
36042  if [ -z "${AR+x}" ]; then
36043    # The variable is not set by user, try to locate tool using the code snippet
36044    if test -n "$ac_tool_prefix"; then
36045  for ac_prog in ar
36046  do
36047    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36050$as_echo_n "checking for $ac_word... " >&6; }
36051if ${ac_cv_prog_AR+:} false; then :
36052  $as_echo_n "(cached) " >&6
36053else
36054  if test -n "$AR"; then
36055  ac_cv_prog_AR="$AR" # Let the user override the test.
36056else
36057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36058for as_dir in $PATH
36059do
36060  IFS=$as_save_IFS
36061  test -z "$as_dir" && as_dir=.
36062    for ac_exec_ext in '' $ac_executable_extensions; do
36063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36064    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36066    break 2
36067  fi
36068done
36069  done
36070IFS=$as_save_IFS
36071
36072fi
36073fi
36074AR=$ac_cv_prog_AR
36075if test -n "$AR"; then
36076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36077$as_echo "$AR" >&6; }
36078else
36079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36080$as_echo "no" >&6; }
36081fi
36082
36083
36084    test -n "$AR" && break
36085  done
36086fi
36087if test -z "$AR"; then
36088  ac_ct_AR=$AR
36089  for ac_prog in ar
36090do
36091  # Extract the first word of "$ac_prog", so it can be a program name with args.
36092set dummy $ac_prog; ac_word=$2
36093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36094$as_echo_n "checking for $ac_word... " >&6; }
36095if ${ac_cv_prog_ac_ct_AR+:} false; then :
36096  $as_echo_n "(cached) " >&6
36097else
36098  if test -n "$ac_ct_AR"; then
36099  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36100else
36101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36102for as_dir in $PATH
36103do
36104  IFS=$as_save_IFS
36105  test -z "$as_dir" && as_dir=.
36106    for ac_exec_ext in '' $ac_executable_extensions; do
36107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36108    ac_cv_prog_ac_ct_AR="$ac_prog"
36109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36110    break 2
36111  fi
36112done
36113  done
36114IFS=$as_save_IFS
36115
36116fi
36117fi
36118ac_ct_AR=$ac_cv_prog_ac_ct_AR
36119if test -n "$ac_ct_AR"; then
36120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36121$as_echo "$ac_ct_AR" >&6; }
36122else
36123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36124$as_echo "no" >&6; }
36125fi
36126
36127
36128  test -n "$ac_ct_AR" && break
36129done
36130
36131  if test "x$ac_ct_AR" = x; then
36132    AR=""
36133  else
36134    case $cross_compiling:$ac_tool_warned in
36135yes:)
36136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36138ac_tool_warned=yes ;;
36139esac
36140    AR=$ac_ct_AR
36141  fi
36142fi
36143
36144  else
36145    # The variable is set, but is it from the command line or the environment?
36146
36147    # Try to remove the string !AR! from our list.
36148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36150      # If it failed, the variable was not from the command line. Ignore it,
36151      # but warn the user (except for BASH, which is always set by the calling BASH).
36152      if test "xAR" != xBASH; then
36153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36154$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36155      fi
36156      # Try to locate tool using the code snippet
36157      if test -n "$ac_tool_prefix"; then
36158  for ac_prog in ar
36159  do
36160    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36163$as_echo_n "checking for $ac_word... " >&6; }
36164if ${ac_cv_prog_AR+:} false; then :
36165  $as_echo_n "(cached) " >&6
36166else
36167  if test -n "$AR"; then
36168  ac_cv_prog_AR="$AR" # Let the user override the test.
36169else
36170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36171for as_dir in $PATH
36172do
36173  IFS=$as_save_IFS
36174  test -z "$as_dir" && as_dir=.
36175    for ac_exec_ext in '' $ac_executable_extensions; do
36176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36177    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36179    break 2
36180  fi
36181done
36182  done
36183IFS=$as_save_IFS
36184
36185fi
36186fi
36187AR=$ac_cv_prog_AR
36188if test -n "$AR"; then
36189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36190$as_echo "$AR" >&6; }
36191else
36192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36193$as_echo "no" >&6; }
36194fi
36195
36196
36197    test -n "$AR" && break
36198  done
36199fi
36200if test -z "$AR"; then
36201  ac_ct_AR=$AR
36202  for ac_prog in ar
36203do
36204  # Extract the first word of "$ac_prog", so it can be a program name with args.
36205set dummy $ac_prog; ac_word=$2
36206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36207$as_echo_n "checking for $ac_word... " >&6; }
36208if ${ac_cv_prog_ac_ct_AR+:} false; then :
36209  $as_echo_n "(cached) " >&6
36210else
36211  if test -n "$ac_ct_AR"; then
36212  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36213else
36214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36215for as_dir in $PATH
36216do
36217  IFS=$as_save_IFS
36218  test -z "$as_dir" && as_dir=.
36219    for ac_exec_ext in '' $ac_executable_extensions; do
36220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36221    ac_cv_prog_ac_ct_AR="$ac_prog"
36222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36223    break 2
36224  fi
36225done
36226  done
36227IFS=$as_save_IFS
36228
36229fi
36230fi
36231ac_ct_AR=$ac_cv_prog_ac_ct_AR
36232if test -n "$ac_ct_AR"; then
36233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36234$as_echo "$ac_ct_AR" >&6; }
36235else
36236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36237$as_echo "no" >&6; }
36238fi
36239
36240
36241  test -n "$ac_ct_AR" && break
36242done
36243
36244  if test "x$ac_ct_AR" = x; then
36245    AR=""
36246  else
36247    case $cross_compiling:$ac_tool_warned in
36248yes:)
36249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36251ac_tool_warned=yes ;;
36252esac
36253    AR=$ac_ct_AR
36254  fi
36255fi
36256
36257    else
36258      # If it succeeded, then it was overridden by the user. We will use it
36259      # for the tool.
36260
36261      # First remove it from the list of overridden variables, so we can test
36262      # for unknown variables in the end.
36263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36264
36265      # Check if we try to supply an empty value
36266      if test "x$AR" = x; then
36267        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36268$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36270$as_echo_n "checking for AR... " >&6; }
36271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36272$as_echo "disabled" >&6; }
36273      else
36274        # Check if the provided tool contains a complete path.
36275        tool_specified="$AR"
36276        tool_basename="${tool_specified##*/}"
36277        if test "x$tool_basename" = "x$tool_specified"; then
36278          # A command without a complete path is provided, search $PATH.
36279          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36280$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36281          # Extract the first word of "$tool_basename", so it can be a program name with args.
36282set dummy $tool_basename; ac_word=$2
36283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36284$as_echo_n "checking for $ac_word... " >&6; }
36285if ${ac_cv_path_AR+:} false; then :
36286  $as_echo_n "(cached) " >&6
36287else
36288  case $AR in
36289  [\\/]* | ?:[\\/]*)
36290  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36291  ;;
36292  *)
36293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36294for as_dir in $PATH
36295do
36296  IFS=$as_save_IFS
36297  test -z "$as_dir" && as_dir=.
36298    for ac_exec_ext in '' $ac_executable_extensions; do
36299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36300    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36302    break 2
36303  fi
36304done
36305  done
36306IFS=$as_save_IFS
36307
36308  ;;
36309esac
36310fi
36311AR=$ac_cv_path_AR
36312if test -n "$AR"; then
36313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36314$as_echo "$AR" >&6; }
36315else
36316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36317$as_echo "no" >&6; }
36318fi
36319
36320
36321          if test "x$AR" = x; then
36322            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36323          fi
36324        else
36325          # Otherwise we believe it is a complete path. Use it as it is.
36326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36327$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36328          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36329$as_echo_n "checking for AR... " >&6; }
36330          if test ! -x "$tool_specified"; then
36331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36332$as_echo "not found" >&6; }
36333            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36334          fi
36335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36336$as_echo "$tool_specified" >&6; }
36337        fi
36338      fi
36339    fi
36340
36341  fi
36342
36343
36344  fi
36345
36346  # Only process if variable expands to non-empty
36347
36348  if test "x$AR" != x; then
36349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36350
36351  # First separate the path from the arguments. This will split at the first
36352  # space.
36353  complete="$AR"
36354  path="${complete%% *}"
36355  tmp="$complete EOL"
36356  arguments="${tmp#* }"
36357
36358  # Input might be given as Windows format, start by converting to
36359  # unix format.
36360  new_path=`$CYGPATH -u "$path"`
36361
36362  # Now try to locate executable using which
36363  new_path=`$WHICH "$new_path" 2> /dev/null`
36364  # bat and cmd files are not always considered executable in cygwin causing which
36365  # to not find them
36366  if test "x$new_path" = x \
36367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36369    new_path=`$CYGPATH -u "$path"`
36370  fi
36371  if test "x$new_path" = x; then
36372    # Oops. Which didn't find the executable.
36373    # The splitting of arguments from the executable at a space might have been incorrect,
36374    # since paths with space are more likely in Windows. Give it another try with the whole
36375    # argument.
36376    path="$complete"
36377    arguments="EOL"
36378    new_path=`$CYGPATH -u "$path"`
36379    new_path=`$WHICH "$new_path" 2> /dev/null`
36380    # bat and cmd files are not always considered executable in cygwin causing which
36381    # to not find them
36382    if test "x$new_path" = x \
36383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36385      new_path=`$CYGPATH -u "$path"`
36386    fi
36387    if test "x$new_path" = x; then
36388      # It's still not found. Now this is an unrecoverable error.
36389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36390$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36391      has_space=`$ECHO "$complete" | $GREP " "`
36392      if test "x$has_space" != x; then
36393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36395      fi
36396      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36397    fi
36398  fi
36399
36400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36403  # "foo.exe" is OK but "foo" is an error.
36404  #
36405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36406  # It is also a way to make sure we got the proper file name for the real test later on.
36407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36408  if test "x$test_shortpath" = x; then
36409    # Short path failed, file does not exist as specified.
36410    # Try adding .exe or .cmd
36411    if test -f "${new_path}.exe"; then
36412      input_to_shortpath="${new_path}.exe"
36413    elif test -f "${new_path}.cmd"; then
36414      input_to_shortpath="${new_path}.cmd"
36415    else
36416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
36417$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
36418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36420      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36421    fi
36422  else
36423    input_to_shortpath="$new_path"
36424  fi
36425
36426  # Call helper function which possibly converts this using DOS-style short mode.
36427  # If so, the updated path is stored in $new_path.
36428  new_path="$input_to_shortpath"
36429
36430  input_path="$input_to_shortpath"
36431  # Check if we need to convert this using DOS-style short mode. If the path
36432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36433  # take no chances and rewrite it.
36434  # Note: m4 eats our [], so we need to use [ and ] instead.
36435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36436  if test "x$has_forbidden_chars" != x; then
36437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36441      # Going to short mode and back again did indeed matter. Since short mode is
36442      # case insensitive, let's make it lowercase to improve readability.
36443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36444      # Now convert it back to Unix-style (cygpath)
36445      input_path=`$CYGPATH -u "$shortmode_path"`
36446      new_path="$input_path"
36447    fi
36448  fi
36449
36450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36451  if test "x$test_cygdrive_prefix" = x; then
36452    # As a simple fix, exclude /usr/bin since it's not a real path.
36453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36455      # a path prefixed by /cygdrive for fixpath to work.
36456      new_path="$CYGWIN_ROOT_PATH$input_path"
36457    fi
36458  fi
36459
36460  # remove trailing .exe if any
36461  new_path="${new_path/%.exe/}"
36462
36463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464
36465  # First separate the path from the arguments. This will split at the first
36466  # space.
36467  complete="$AR"
36468  path="${complete%% *}"
36469  tmp="$complete EOL"
36470  arguments="${tmp#* }"
36471
36472  # Input might be given as Windows format, start by converting to
36473  # unix format.
36474  new_path="$path"
36475
36476  windows_path="$new_path"
36477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36478    unix_path=`$CYGPATH -u "$windows_path"`
36479    new_path="$unix_path"
36480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36482    new_path="$unix_path"
36483  fi
36484
36485
36486  # Now try to locate executable using which
36487  new_path=`$WHICH "$new_path" 2> /dev/null`
36488
36489  if test "x$new_path" = x; then
36490    # Oops. Which didn't find the executable.
36491    # The splitting of arguments from the executable at a space might have been incorrect,
36492    # since paths with space are more likely in Windows. Give it another try with the whole
36493    # argument.
36494    path="$complete"
36495    arguments="EOL"
36496    new_path="$path"
36497
36498  windows_path="$new_path"
36499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36500    unix_path=`$CYGPATH -u "$windows_path"`
36501    new_path="$unix_path"
36502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36504    new_path="$unix_path"
36505  fi
36506
36507
36508    new_path=`$WHICH "$new_path" 2> /dev/null`
36509    # bat and cmd files are not always considered executable in MSYS causing which
36510    # to not find them
36511    if test "x$new_path" = x \
36512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36514      new_path="$path"
36515
36516  windows_path="$new_path"
36517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36518    unix_path=`$CYGPATH -u "$windows_path"`
36519    new_path="$unix_path"
36520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36522    new_path="$unix_path"
36523  fi
36524
36525    fi
36526
36527    if test "x$new_path" = x; then
36528      # It's still not found. Now this is an unrecoverable error.
36529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36530$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36531      has_space=`$ECHO "$complete" | $GREP " "`
36532      if test "x$has_space" != x; then
36533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36535      fi
36536      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36537    fi
36538  fi
36539
36540  # Now new_path has a complete unix path to the binary
36541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36542    # Keep paths in /bin as-is, but remove trailing .exe if any
36543    new_path="${new_path/%.exe/}"
36544    # Do not save /bin paths to all_fixpath_prefixes!
36545  else
36546    # Not in mixed or Windows style, start by that.
36547    new_path=`cmd //c echo $new_path`
36548
36549  input_path="$new_path"
36550  # Check if we need to convert this using DOS-style short mode. If the path
36551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36552  # take no chances and rewrite it.
36553  # Note: m4 eats our [], so we need to use [ and ] instead.
36554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36555  if test "x$has_forbidden_chars" != x; then
36556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36558  fi
36559
36560    # Output is in $new_path
36561
36562  windows_path="$new_path"
36563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36564    unix_path=`$CYGPATH -u "$windows_path"`
36565    new_path="$unix_path"
36566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36568    new_path="$unix_path"
36569  fi
36570
36571    # remove trailing .exe if any
36572    new_path="${new_path/%.exe/}"
36573
36574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36576  fi
36577
36578    else
36579      # We're on a unix platform. Hooray! :)
36580      # First separate the path from the arguments. This will split at the first
36581      # space.
36582      complete="$AR"
36583      path="${complete%% *}"
36584      tmp="$complete EOL"
36585      arguments="${tmp#* }"
36586
36587      # Cannot rely on the command "which" here since it doesn't always work.
36588      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36589      if test -z "$is_absolute_path"; then
36590        # Path to executable is not absolute. Find it.
36591        IFS_save="$IFS"
36592        IFS=:
36593        for p in $PATH; do
36594          if test -f "$p/$path" && test -x "$p/$path"; then
36595            new_path="$p/$path"
36596            break
36597          fi
36598        done
36599        IFS="$IFS_save"
36600      else
36601        # This is an absolute path, we can use it without further modifications.
36602        new_path="$path"
36603      fi
36604
36605      if test "x$new_path" = x; then
36606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
36607$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
36608        has_space=`$ECHO "$complete" | $GREP " "`
36609        if test "x$has_space" != x; then
36610          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36612        fi
36613        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
36614      fi
36615    fi
36616
36617    # Now join together the path and the arguments once again
36618    if test "x$arguments" != xEOL; then
36619      new_complete="$new_path ${arguments% *}"
36620    else
36621      new_complete="$new_path"
36622    fi
36623
36624    if test "x$complete" != "x$new_complete"; then
36625      AR="$new_complete"
36626      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
36627$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
36628    fi
36629  fi
36630
36631
36632
36633  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
36634
36635
36636  # Publish this variable in the help.
36637
36638
36639  if [ -z "${LIPO+x}" ]; then
36640    # The variable is not set by user, try to locate tool using the code snippet
36641    for ac_prog in lipo
36642do
36643  # Extract the first word of "$ac_prog", so it can be a program name with args.
36644set dummy $ac_prog; ac_word=$2
36645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36646$as_echo_n "checking for $ac_word... " >&6; }
36647if ${ac_cv_path_LIPO+:} false; then :
36648  $as_echo_n "(cached) " >&6
36649else
36650  case $LIPO in
36651  [\\/]* | ?:[\\/]*)
36652  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36653  ;;
36654  *)
36655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36656for as_dir in $PATH
36657do
36658  IFS=$as_save_IFS
36659  test -z "$as_dir" && as_dir=.
36660    for ac_exec_ext in '' $ac_executable_extensions; do
36661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36662    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36664    break 2
36665  fi
36666done
36667  done
36668IFS=$as_save_IFS
36669
36670  ;;
36671esac
36672fi
36673LIPO=$ac_cv_path_LIPO
36674if test -n "$LIPO"; then
36675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36676$as_echo "$LIPO" >&6; }
36677else
36678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36679$as_echo "no" >&6; }
36680fi
36681
36682
36683  test -n "$LIPO" && break
36684done
36685
36686  else
36687    # The variable is set, but is it from the command line or the environment?
36688
36689    # Try to remove the string !LIPO! from our list.
36690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
36691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36692      # If it failed, the variable was not from the command line. Ignore it,
36693      # but warn the user (except for BASH, which is always set by the calling BASH).
36694      if test "xLIPO" != xBASH; then
36695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
36696$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
36697      fi
36698      # Try to locate tool using the code snippet
36699      for ac_prog in lipo
36700do
36701  # Extract the first word of "$ac_prog", so it can be a program name with args.
36702set dummy $ac_prog; ac_word=$2
36703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36704$as_echo_n "checking for $ac_word... " >&6; }
36705if ${ac_cv_path_LIPO+:} false; then :
36706  $as_echo_n "(cached) " >&6
36707else
36708  case $LIPO in
36709  [\\/]* | ?:[\\/]*)
36710  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36711  ;;
36712  *)
36713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36714for as_dir in $PATH
36715do
36716  IFS=$as_save_IFS
36717  test -z "$as_dir" && as_dir=.
36718    for ac_exec_ext in '' $ac_executable_extensions; do
36719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36720    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36722    break 2
36723  fi
36724done
36725  done
36726IFS=$as_save_IFS
36727
36728  ;;
36729esac
36730fi
36731LIPO=$ac_cv_path_LIPO
36732if test -n "$LIPO"; then
36733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36734$as_echo "$LIPO" >&6; }
36735else
36736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36737$as_echo "no" >&6; }
36738fi
36739
36740
36741  test -n "$LIPO" && break
36742done
36743
36744    else
36745      # If it succeeded, then it was overridden by the user. We will use it
36746      # for the tool.
36747
36748      # First remove it from the list of overridden variables, so we can test
36749      # for unknown variables in the end.
36750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36751
36752      # Check if we try to supply an empty value
36753      if test "x$LIPO" = x; then
36754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
36755$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
36756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36757$as_echo_n "checking for LIPO... " >&6; }
36758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36759$as_echo "disabled" >&6; }
36760      else
36761        # Check if the provided tool contains a complete path.
36762        tool_specified="$LIPO"
36763        tool_basename="${tool_specified##*/}"
36764        if test "x$tool_basename" = "x$tool_specified"; then
36765          # A command without a complete path is provided, search $PATH.
36766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
36767$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
36768          # Extract the first word of "$tool_basename", so it can be a program name with args.
36769set dummy $tool_basename; ac_word=$2
36770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36771$as_echo_n "checking for $ac_word... " >&6; }
36772if ${ac_cv_path_LIPO+:} false; then :
36773  $as_echo_n "(cached) " >&6
36774else
36775  case $LIPO in
36776  [\\/]* | ?:[\\/]*)
36777  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
36778  ;;
36779  *)
36780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36781for as_dir in $PATH
36782do
36783  IFS=$as_save_IFS
36784  test -z "$as_dir" && as_dir=.
36785    for ac_exec_ext in '' $ac_executable_extensions; do
36786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36787    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
36788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36789    break 2
36790  fi
36791done
36792  done
36793IFS=$as_save_IFS
36794
36795  ;;
36796esac
36797fi
36798LIPO=$ac_cv_path_LIPO
36799if test -n "$LIPO"; then
36800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
36801$as_echo "$LIPO" >&6; }
36802else
36803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36804$as_echo "no" >&6; }
36805fi
36806
36807
36808          if test "x$LIPO" = x; then
36809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36810          fi
36811        else
36812          # Otherwise we believe it is a complete path. Use it as it is.
36813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
36814$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
36815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
36816$as_echo_n "checking for LIPO... " >&6; }
36817          if test ! -x "$tool_specified"; then
36818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36819$as_echo "not found" >&6; }
36820            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
36821          fi
36822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36823$as_echo "$tool_specified" >&6; }
36824        fi
36825      fi
36826    fi
36827
36828  fi
36829
36830
36831
36832  # Only process if variable expands to non-empty
36833
36834  if test "x$LIPO" != x; then
36835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36836
36837  # First separate the path from the arguments. This will split at the first
36838  # space.
36839  complete="$LIPO"
36840  path="${complete%% *}"
36841  tmp="$complete EOL"
36842  arguments="${tmp#* }"
36843
36844  # Input might be given as Windows format, start by converting to
36845  # unix format.
36846  new_path=`$CYGPATH -u "$path"`
36847
36848  # Now try to locate executable using which
36849  new_path=`$WHICH "$new_path" 2> /dev/null`
36850  # bat and cmd files are not always considered executable in cygwin causing which
36851  # to not find them
36852  if test "x$new_path" = x \
36853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36855    new_path=`$CYGPATH -u "$path"`
36856  fi
36857  if test "x$new_path" = x; then
36858    # Oops. Which didn't find the executable.
36859    # The splitting of arguments from the executable at a space might have been incorrect,
36860    # since paths with space are more likely in Windows. Give it another try with the whole
36861    # argument.
36862    path="$complete"
36863    arguments="EOL"
36864    new_path=`$CYGPATH -u "$path"`
36865    new_path=`$WHICH "$new_path" 2> /dev/null`
36866    # bat and cmd files are not always considered executable in cygwin causing which
36867    # to not find them
36868    if test "x$new_path" = x \
36869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36871      new_path=`$CYGPATH -u "$path"`
36872    fi
36873    if test "x$new_path" = x; then
36874      # It's still not found. Now this is an unrecoverable error.
36875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
36876$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
36877      has_space=`$ECHO "$complete" | $GREP " "`
36878      if test "x$has_space" != x; then
36879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36881      fi
36882      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36883    fi
36884  fi
36885
36886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36889  # "foo.exe" is OK but "foo" is an error.
36890  #
36891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36892  # It is also a way to make sure we got the proper file name for the real test later on.
36893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36894  if test "x$test_shortpath" = x; then
36895    # Short path failed, file does not exist as specified.
36896    # Try adding .exe or .cmd
36897    if test -f "${new_path}.exe"; then
36898      input_to_shortpath="${new_path}.exe"
36899    elif test -f "${new_path}.cmd"; then
36900      input_to_shortpath="${new_path}.cmd"
36901    else
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
36903$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
36904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36906      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
36907    fi
36908  else
36909    input_to_shortpath="$new_path"
36910  fi
36911
36912  # Call helper function which possibly converts this using DOS-style short mode.
36913  # If so, the updated path is stored in $new_path.
36914  new_path="$input_to_shortpath"
36915
36916  input_path="$input_to_shortpath"
36917  # Check if we need to convert this using DOS-style short mode. If the path
36918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36919  # take no chances and rewrite it.
36920  # Note: m4 eats our [], so we need to use [ and ] instead.
36921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36922  if test "x$has_forbidden_chars" != x; then
36923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36927      # Going to short mode and back again did indeed matter. Since short mode is
36928      # case insensitive, let's make it lowercase to improve readability.
36929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36930      # Now convert it back to Unix-style (cygpath)
36931      input_path=`$CYGPATH -u "$shortmode_path"`
36932      new_path="$input_path"
36933    fi
36934  fi
36935
36936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36937  if test "x$test_cygdrive_prefix" = x; then
36938    # As a simple fix, exclude /usr/bin since it's not a real path.
36939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36941      # a path prefixed by /cygdrive for fixpath to work.
36942      new_path="$CYGWIN_ROOT_PATH$input_path"
36943    fi
36944  fi
36945
36946  # remove trailing .exe if any
36947  new_path="${new_path/%.exe/}"
36948
36949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36950
36951  # First separate the path from the arguments. This will split at the first
36952  # space.
36953  complete="$LIPO"
36954  path="${complete%% *}"
36955  tmp="$complete EOL"
36956  arguments="${tmp#* }"
36957
36958  # Input might be given as Windows format, start by converting to
36959  # unix format.
36960  new_path="$path"
36961
36962  windows_path="$new_path"
36963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36964    unix_path=`$CYGPATH -u "$windows_path"`
36965    new_path="$unix_path"
36966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36968    new_path="$unix_path"
36969  fi
36970
36971
36972  # Now try to locate executable using which
36973  new_path=`$WHICH "$new_path" 2> /dev/null`
36974
36975  if test "x$new_path" = x; then
36976    # Oops. Which didn't find the executable.
36977    # The splitting of arguments from the executable at a space might have been incorrect,
36978    # since paths with space are more likely in Windows. Give it another try with the whole
36979    # argument.
36980    path="$complete"
36981    arguments="EOL"
36982    new_path="$path"
36983
36984  windows_path="$new_path"
36985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36986    unix_path=`$CYGPATH -u "$windows_path"`
36987    new_path="$unix_path"
36988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36990    new_path="$unix_path"
36991  fi
36992
36993
36994    new_path=`$WHICH "$new_path" 2> /dev/null`
36995    # bat and cmd files are not always considered executable in MSYS causing which
36996    # to not find them
36997    if test "x$new_path" = x \
36998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37000      new_path="$path"
37001
37002  windows_path="$new_path"
37003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37004    unix_path=`$CYGPATH -u "$windows_path"`
37005    new_path="$unix_path"
37006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37008    new_path="$unix_path"
37009  fi
37010
37011    fi
37012
37013    if test "x$new_path" = x; then
37014      # It's still not found. Now this is an unrecoverable error.
37015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37016$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37017      has_space=`$ECHO "$complete" | $GREP " "`
37018      if test "x$has_space" != x; then
37019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37021      fi
37022      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37023    fi
37024  fi
37025
37026  # Now new_path has a complete unix path to the binary
37027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37028    # Keep paths in /bin as-is, but remove trailing .exe if any
37029    new_path="${new_path/%.exe/}"
37030    # Do not save /bin paths to all_fixpath_prefixes!
37031  else
37032    # Not in mixed or Windows style, start by that.
37033    new_path=`cmd //c echo $new_path`
37034
37035  input_path="$new_path"
37036  # Check if we need to convert this using DOS-style short mode. If the path
37037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37038  # take no chances and rewrite it.
37039  # Note: m4 eats our [], so we need to use [ and ] instead.
37040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37041  if test "x$has_forbidden_chars" != x; then
37042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37044  fi
37045
37046    # Output is in $new_path
37047
37048  windows_path="$new_path"
37049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37050    unix_path=`$CYGPATH -u "$windows_path"`
37051    new_path="$unix_path"
37052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37054    new_path="$unix_path"
37055  fi
37056
37057    # remove trailing .exe if any
37058    new_path="${new_path/%.exe/}"
37059
37060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37062  fi
37063
37064    else
37065      # We're on a unix platform. Hooray! :)
37066      # First separate the path from the arguments. This will split at the first
37067      # space.
37068      complete="$LIPO"
37069      path="${complete%% *}"
37070      tmp="$complete EOL"
37071      arguments="${tmp#* }"
37072
37073      # Cannot rely on the command "which" here since it doesn't always work.
37074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37075      if test -z "$is_absolute_path"; then
37076        # Path to executable is not absolute. Find it.
37077        IFS_save="$IFS"
37078        IFS=:
37079        for p in $PATH; do
37080          if test -f "$p/$path" && test -x "$p/$path"; then
37081            new_path="$p/$path"
37082            break
37083          fi
37084        done
37085        IFS="$IFS_save"
37086      else
37087        # This is an absolute path, we can use it without further modifications.
37088        new_path="$path"
37089      fi
37090
37091      if test "x$new_path" = x; then
37092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37093$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37094        has_space=`$ECHO "$complete" | $GREP " "`
37095        if test "x$has_space" != x; then
37096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37098        fi
37099        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37100      fi
37101    fi
37102
37103    # Now join together the path and the arguments once again
37104    if test "x$arguments" != xEOL; then
37105      new_complete="$new_path ${arguments% *}"
37106    else
37107      new_complete="$new_path"
37108    fi
37109
37110    if test "x$complete" != "x$new_complete"; then
37111      LIPO="$new_complete"
37112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37113$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37114    fi
37115  fi
37116
37117  fi
37118
37119  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37120    # Extract the first word of "mt", so it can be a program name with args.
37121set dummy mt; ac_word=$2
37122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37123$as_echo_n "checking for $ac_word... " >&6; }
37124if ${ac_cv_prog_MT+:} false; then :
37125  $as_echo_n "(cached) " >&6
37126else
37127  if test -n "$MT"; then
37128  ac_cv_prog_MT="$MT" # Let the user override the test.
37129else
37130  ac_prog_rejected=no
37131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37132for as_dir in $PATH
37133do
37134  IFS=$as_save_IFS
37135  test -z "$as_dir" && as_dir=.
37136    for ac_exec_ext in '' $ac_executable_extensions; do
37137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37138    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37139       ac_prog_rejected=yes
37140       continue
37141     fi
37142    ac_cv_prog_MT="mt"
37143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37144    break 2
37145  fi
37146done
37147  done
37148IFS=$as_save_IFS
37149
37150if test $ac_prog_rejected = yes; then
37151  # We found a bogon in the path, so make sure we never use it.
37152  set dummy $ac_cv_prog_MT
37153  shift
37154  if test $# != 0; then
37155    # We chose a different compiler from the bogus one.
37156    # However, it has the same basename, so the bogon will be chosen
37157    # first if we set MT to just the basename; use the full file name.
37158    shift
37159    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37160  fi
37161fi
37162fi
37163fi
37164MT=$ac_cv_prog_MT
37165if test -n "$MT"; then
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37167$as_echo "$MT" >&6; }
37168else
37169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37170$as_echo "no" >&6; }
37171fi
37172
37173
37174
37175  # Only process if variable expands to non-empty
37176
37177  if test "x$MT" != x; then
37178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37179
37180  # First separate the path from the arguments. This will split at the first
37181  # space.
37182  complete="$MT"
37183  path="${complete%% *}"
37184  tmp="$complete EOL"
37185  arguments="${tmp#* }"
37186
37187  # Input might be given as Windows format, start by converting to
37188  # unix format.
37189  new_path=`$CYGPATH -u "$path"`
37190
37191  # Now try to locate executable using which
37192  new_path=`$WHICH "$new_path" 2> /dev/null`
37193  # bat and cmd files are not always considered executable in cygwin causing which
37194  # to not find them
37195  if test "x$new_path" = x \
37196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37198    new_path=`$CYGPATH -u "$path"`
37199  fi
37200  if test "x$new_path" = x; then
37201    # Oops. Which didn't find the executable.
37202    # The splitting of arguments from the executable at a space might have been incorrect,
37203    # since paths with space are more likely in Windows. Give it another try with the whole
37204    # argument.
37205    path="$complete"
37206    arguments="EOL"
37207    new_path=`$CYGPATH -u "$path"`
37208    new_path=`$WHICH "$new_path" 2> /dev/null`
37209    # bat and cmd files are not always considered executable in cygwin causing which
37210    # to not find them
37211    if test "x$new_path" = x \
37212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37214      new_path=`$CYGPATH -u "$path"`
37215    fi
37216    if test "x$new_path" = x; then
37217      # It's still not found. Now this is an unrecoverable error.
37218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37219$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37220      has_space=`$ECHO "$complete" | $GREP " "`
37221      if test "x$has_space" != x; then
37222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37224      fi
37225      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37226    fi
37227  fi
37228
37229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37232  # "foo.exe" is OK but "foo" is an error.
37233  #
37234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37235  # It is also a way to make sure we got the proper file name for the real test later on.
37236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37237  if test "x$test_shortpath" = x; then
37238    # Short path failed, file does not exist as specified.
37239    # Try adding .exe or .cmd
37240    if test -f "${new_path}.exe"; then
37241      input_to_shortpath="${new_path}.exe"
37242    elif test -f "${new_path}.cmd"; then
37243      input_to_shortpath="${new_path}.cmd"
37244    else
37245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37246$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37249      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37250    fi
37251  else
37252    input_to_shortpath="$new_path"
37253  fi
37254
37255  # Call helper function which possibly converts this using DOS-style short mode.
37256  # If so, the updated path is stored in $new_path.
37257  new_path="$input_to_shortpath"
37258
37259  input_path="$input_to_shortpath"
37260  # Check if we need to convert this using DOS-style short mode. If the path
37261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37262  # take no chances and rewrite it.
37263  # Note: m4 eats our [], so we need to use [ and ] instead.
37264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37265  if test "x$has_forbidden_chars" != x; then
37266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37270      # Going to short mode and back again did indeed matter. Since short mode is
37271      # case insensitive, let's make it lowercase to improve readability.
37272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37273      # Now convert it back to Unix-style (cygpath)
37274      input_path=`$CYGPATH -u "$shortmode_path"`
37275      new_path="$input_path"
37276    fi
37277  fi
37278
37279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37280  if test "x$test_cygdrive_prefix" = x; then
37281    # As a simple fix, exclude /usr/bin since it's not a real path.
37282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37284      # a path prefixed by /cygdrive for fixpath to work.
37285      new_path="$CYGWIN_ROOT_PATH$input_path"
37286    fi
37287  fi
37288
37289  # remove trailing .exe if any
37290  new_path="${new_path/%.exe/}"
37291
37292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37293
37294  # First separate the path from the arguments. This will split at the first
37295  # space.
37296  complete="$MT"
37297  path="${complete%% *}"
37298  tmp="$complete EOL"
37299  arguments="${tmp#* }"
37300
37301  # Input might be given as Windows format, start by converting to
37302  # unix format.
37303  new_path="$path"
37304
37305  windows_path="$new_path"
37306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37307    unix_path=`$CYGPATH -u "$windows_path"`
37308    new_path="$unix_path"
37309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37311    new_path="$unix_path"
37312  fi
37313
37314
37315  # Now try to locate executable using which
37316  new_path=`$WHICH "$new_path" 2> /dev/null`
37317
37318  if test "x$new_path" = x; then
37319    # Oops. Which didn't find the executable.
37320    # The splitting of arguments from the executable at a space might have been incorrect,
37321    # since paths with space are more likely in Windows. Give it another try with the whole
37322    # argument.
37323    path="$complete"
37324    arguments="EOL"
37325    new_path="$path"
37326
37327  windows_path="$new_path"
37328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37329    unix_path=`$CYGPATH -u "$windows_path"`
37330    new_path="$unix_path"
37331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37333    new_path="$unix_path"
37334  fi
37335
37336
37337    new_path=`$WHICH "$new_path" 2> /dev/null`
37338    # bat and cmd files are not always considered executable in MSYS causing which
37339    # to not find them
37340    if test "x$new_path" = x \
37341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37343      new_path="$path"
37344
37345  windows_path="$new_path"
37346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37347    unix_path=`$CYGPATH -u "$windows_path"`
37348    new_path="$unix_path"
37349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37351    new_path="$unix_path"
37352  fi
37353
37354    fi
37355
37356    if test "x$new_path" = x; then
37357      # It's still not found. Now this is an unrecoverable error.
37358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37359$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37360      has_space=`$ECHO "$complete" | $GREP " "`
37361      if test "x$has_space" != x; then
37362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37364      fi
37365      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37366    fi
37367  fi
37368
37369  # Now new_path has a complete unix path to the binary
37370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37371    # Keep paths in /bin as-is, but remove trailing .exe if any
37372    new_path="${new_path/%.exe/}"
37373    # Do not save /bin paths to all_fixpath_prefixes!
37374  else
37375    # Not in mixed or Windows style, start by that.
37376    new_path=`cmd //c echo $new_path`
37377
37378  input_path="$new_path"
37379  # Check if we need to convert this using DOS-style short mode. If the path
37380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37381  # take no chances and rewrite it.
37382  # Note: m4 eats our [], so we need to use [ and ] instead.
37383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37384  if test "x$has_forbidden_chars" != x; then
37385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37387  fi
37388
37389    # Output is in $new_path
37390
37391  windows_path="$new_path"
37392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37393    unix_path=`$CYGPATH -u "$windows_path"`
37394    new_path="$unix_path"
37395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37397    new_path="$unix_path"
37398  fi
37399
37400    # remove trailing .exe if any
37401    new_path="${new_path/%.exe/}"
37402
37403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37405  fi
37406
37407    else
37408      # We're on a unix platform. Hooray! :)
37409      # First separate the path from the arguments. This will split at the first
37410      # space.
37411      complete="$MT"
37412      path="${complete%% *}"
37413      tmp="$complete EOL"
37414      arguments="${tmp#* }"
37415
37416      # Cannot rely on the command "which" here since it doesn't always work.
37417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37418      if test -z "$is_absolute_path"; then
37419        # Path to executable is not absolute. Find it.
37420        IFS_save="$IFS"
37421        IFS=:
37422        for p in $PATH; do
37423          if test -f "$p/$path" && test -x "$p/$path"; then
37424            new_path="$p/$path"
37425            break
37426          fi
37427        done
37428        IFS="$IFS_save"
37429      else
37430        # This is an absolute path, we can use it without further modifications.
37431        new_path="$path"
37432      fi
37433
37434      if test "x$new_path" = x; then
37435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37436$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37437        has_space=`$ECHO "$complete" | $GREP " "`
37438        if test "x$has_space" != x; then
37439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37441        fi
37442        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37443      fi
37444    fi
37445
37446    # Now join together the path and the arguments once again
37447    if test "x$arguments" != xEOL; then
37448      new_complete="$new_path ${arguments% *}"
37449    else
37450      new_complete="$new_path"
37451    fi
37452
37453    if test "x$complete" != "x$new_complete"; then
37454      MT="$new_complete"
37455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
37456$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
37457    fi
37458  fi
37459
37460    # Setup the resource compiler (RC)
37461    # Extract the first word of "rc", so it can be a program name with args.
37462set dummy rc; ac_word=$2
37463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37464$as_echo_n "checking for $ac_word... " >&6; }
37465if ${ac_cv_prog_RC+:} false; then :
37466  $as_echo_n "(cached) " >&6
37467else
37468  if test -n "$RC"; then
37469  ac_cv_prog_RC="$RC" # Let the user override the test.
37470else
37471  ac_prog_rejected=no
37472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37473for as_dir in $PATH
37474do
37475  IFS=$as_save_IFS
37476  test -z "$as_dir" && as_dir=.
37477    for ac_exec_ext in '' $ac_executable_extensions; do
37478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37479    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
37480       ac_prog_rejected=yes
37481       continue
37482     fi
37483    ac_cv_prog_RC="rc"
37484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37485    break 2
37486  fi
37487done
37488  done
37489IFS=$as_save_IFS
37490
37491if test $ac_prog_rejected = yes; then
37492  # We found a bogon in the path, so make sure we never use it.
37493  set dummy $ac_cv_prog_RC
37494  shift
37495  if test $# != 0; then
37496    # We chose a different compiler from the bogus one.
37497    # However, it has the same basename, so the bogon will be chosen
37498    # first if we set RC to just the basename; use the full file name.
37499    shift
37500    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
37501  fi
37502fi
37503fi
37504fi
37505RC=$ac_cv_prog_RC
37506if test -n "$RC"; then
37507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
37508$as_echo "$RC" >&6; }
37509else
37510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37511$as_echo "no" >&6; }
37512fi
37513
37514
37515
37516  # Only process if variable expands to non-empty
37517
37518  if test "x$RC" != x; then
37519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37520
37521  # First separate the path from the arguments. This will split at the first
37522  # space.
37523  complete="$RC"
37524  path="${complete%% *}"
37525  tmp="$complete EOL"
37526  arguments="${tmp#* }"
37527
37528  # Input might be given as Windows format, start by converting to
37529  # unix format.
37530  new_path=`$CYGPATH -u "$path"`
37531
37532  # Now try to locate executable using which
37533  new_path=`$WHICH "$new_path" 2> /dev/null`
37534  # bat and cmd files are not always considered executable in cygwin causing which
37535  # to not find them
37536  if test "x$new_path" = x \
37537      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37538      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37539    new_path=`$CYGPATH -u "$path"`
37540  fi
37541  if test "x$new_path" = x; then
37542    # Oops. Which didn't find the executable.
37543    # The splitting of arguments from the executable at a space might have been incorrect,
37544    # since paths with space are more likely in Windows. Give it another try with the whole
37545    # argument.
37546    path="$complete"
37547    arguments="EOL"
37548    new_path=`$CYGPATH -u "$path"`
37549    new_path=`$WHICH "$new_path" 2> /dev/null`
37550    # bat and cmd files are not always considered executable in cygwin causing which
37551    # to not find them
37552    if test "x$new_path" = x \
37553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37555      new_path=`$CYGPATH -u "$path"`
37556    fi
37557    if test "x$new_path" = x; then
37558      # It's still not found. Now this is an unrecoverable error.
37559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37560$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37561      has_space=`$ECHO "$complete" | $GREP " "`
37562      if test "x$has_space" != x; then
37563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37565      fi
37566      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37567    fi
37568  fi
37569
37570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37573  # "foo.exe" is OK but "foo" is an error.
37574  #
37575  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37576  # It is also a way to make sure we got the proper file name for the real test later on.
37577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37578  if test "x$test_shortpath" = x; then
37579    # Short path failed, file does not exist as specified.
37580    # Try adding .exe or .cmd
37581    if test -f "${new_path}.exe"; then
37582      input_to_shortpath="${new_path}.exe"
37583    elif test -f "${new_path}.cmd"; then
37584      input_to_shortpath="${new_path}.cmd"
37585    else
37586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
37587$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
37588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37590      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37591    fi
37592  else
37593    input_to_shortpath="$new_path"
37594  fi
37595
37596  # Call helper function which possibly converts this using DOS-style short mode.
37597  # If so, the updated path is stored in $new_path.
37598  new_path="$input_to_shortpath"
37599
37600  input_path="$input_to_shortpath"
37601  # Check if we need to convert this using DOS-style short mode. If the path
37602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37603  # take no chances and rewrite it.
37604  # Note: m4 eats our [], so we need to use [ and ] instead.
37605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37606  if test "x$has_forbidden_chars" != x; then
37607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37611      # Going to short mode and back again did indeed matter. Since short mode is
37612      # case insensitive, let's make it lowercase to improve readability.
37613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37614      # Now convert it back to Unix-style (cygpath)
37615      input_path=`$CYGPATH -u "$shortmode_path"`
37616      new_path="$input_path"
37617    fi
37618  fi
37619
37620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37621  if test "x$test_cygdrive_prefix" = x; then
37622    # As a simple fix, exclude /usr/bin since it's not a real path.
37623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37625      # a path prefixed by /cygdrive for fixpath to work.
37626      new_path="$CYGWIN_ROOT_PATH$input_path"
37627    fi
37628  fi
37629
37630  # remove trailing .exe if any
37631  new_path="${new_path/%.exe/}"
37632
37633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37634
37635  # First separate the path from the arguments. This will split at the first
37636  # space.
37637  complete="$RC"
37638  path="${complete%% *}"
37639  tmp="$complete EOL"
37640  arguments="${tmp#* }"
37641
37642  # Input might be given as Windows format, start by converting to
37643  # unix format.
37644  new_path="$path"
37645
37646  windows_path="$new_path"
37647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37648    unix_path=`$CYGPATH -u "$windows_path"`
37649    new_path="$unix_path"
37650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37652    new_path="$unix_path"
37653  fi
37654
37655
37656  # Now try to locate executable using which
37657  new_path=`$WHICH "$new_path" 2> /dev/null`
37658
37659  if test "x$new_path" = x; then
37660    # Oops. Which didn't find the executable.
37661    # The splitting of arguments from the executable at a space might have been incorrect,
37662    # since paths with space are more likely in Windows. Give it another try with the whole
37663    # argument.
37664    path="$complete"
37665    arguments="EOL"
37666    new_path="$path"
37667
37668  windows_path="$new_path"
37669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37670    unix_path=`$CYGPATH -u "$windows_path"`
37671    new_path="$unix_path"
37672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37674    new_path="$unix_path"
37675  fi
37676
37677
37678    new_path=`$WHICH "$new_path" 2> /dev/null`
37679    # bat and cmd files are not always considered executable in MSYS causing which
37680    # to not find them
37681    if test "x$new_path" = x \
37682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37684      new_path="$path"
37685
37686  windows_path="$new_path"
37687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37688    unix_path=`$CYGPATH -u "$windows_path"`
37689    new_path="$unix_path"
37690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37692    new_path="$unix_path"
37693  fi
37694
37695    fi
37696
37697    if test "x$new_path" = x; then
37698      # It's still not found. Now this is an unrecoverable error.
37699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37700$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37701      has_space=`$ECHO "$complete" | $GREP " "`
37702      if test "x$has_space" != x; then
37703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37705      fi
37706      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37707    fi
37708  fi
37709
37710  # Now new_path has a complete unix path to the binary
37711  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37712    # Keep paths in /bin as-is, but remove trailing .exe if any
37713    new_path="${new_path/%.exe/}"
37714    # Do not save /bin paths to all_fixpath_prefixes!
37715  else
37716    # Not in mixed or Windows style, start by that.
37717    new_path=`cmd //c echo $new_path`
37718
37719  input_path="$new_path"
37720  # Check if we need to convert this using DOS-style short mode. If the path
37721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37722  # take no chances and rewrite it.
37723  # Note: m4 eats our [], so we need to use [ and ] instead.
37724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37725  if test "x$has_forbidden_chars" != x; then
37726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37728  fi
37729
37730    # Output is in $new_path
37731
37732  windows_path="$new_path"
37733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37734    unix_path=`$CYGPATH -u "$windows_path"`
37735    new_path="$unix_path"
37736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37738    new_path="$unix_path"
37739  fi
37740
37741    # remove trailing .exe if any
37742    new_path="${new_path/%.exe/}"
37743
37744    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37745    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37746  fi
37747
37748    else
37749      # We're on a unix platform. Hooray! :)
37750      # First separate the path from the arguments. This will split at the first
37751      # space.
37752      complete="$RC"
37753      path="${complete%% *}"
37754      tmp="$complete EOL"
37755      arguments="${tmp#* }"
37756
37757      # Cannot rely on the command "which" here since it doesn't always work.
37758      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37759      if test -z "$is_absolute_path"; then
37760        # Path to executable is not absolute. Find it.
37761        IFS_save="$IFS"
37762        IFS=:
37763        for p in $PATH; do
37764          if test -f "$p/$path" && test -x "$p/$path"; then
37765            new_path="$p/$path"
37766            break
37767          fi
37768        done
37769        IFS="$IFS_save"
37770      else
37771        # This is an absolute path, we can use it without further modifications.
37772        new_path="$path"
37773      fi
37774
37775      if test "x$new_path" = x; then
37776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
37777$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
37778        has_space=`$ECHO "$complete" | $GREP " "`
37779        if test "x$has_space" != x; then
37780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37782        fi
37783        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
37784      fi
37785    fi
37786
37787    # Now join together the path and the arguments once again
37788    if test "x$arguments" != xEOL; then
37789      new_complete="$new_path ${arguments% *}"
37790    else
37791      new_complete="$new_path"
37792    fi
37793
37794    if test "x$complete" != "x$new_complete"; then
37795      RC="$new_complete"
37796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
37797$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
37798    fi
37799  fi
37800
37801    # Extract the first word of "dumpbin", so it can be a program name with args.
37802set dummy dumpbin; ac_word=$2
37803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37804$as_echo_n "checking for $ac_word... " >&6; }
37805if ${ac_cv_prog_DUMPBIN+:} false; then :
37806  $as_echo_n "(cached) " >&6
37807else
37808  if test -n "$DUMPBIN"; then
37809  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
37810else
37811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37812for as_dir in $PATH
37813do
37814  IFS=$as_save_IFS
37815  test -z "$as_dir" && as_dir=.
37816    for ac_exec_ext in '' $ac_executable_extensions; do
37817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37818    ac_cv_prog_DUMPBIN="dumpbin"
37819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37820    break 2
37821  fi
37822done
37823  done
37824IFS=$as_save_IFS
37825
37826fi
37827fi
37828DUMPBIN=$ac_cv_prog_DUMPBIN
37829if test -n "$DUMPBIN"; then
37830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
37831$as_echo "$DUMPBIN" >&6; }
37832else
37833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37834$as_echo "no" >&6; }
37835fi
37836
37837
37838
37839  # Only process if variable expands to non-empty
37840
37841  if test "x$DUMPBIN" != x; then
37842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37843
37844  # First separate the path from the arguments. This will split at the first
37845  # space.
37846  complete="$DUMPBIN"
37847  path="${complete%% *}"
37848  tmp="$complete EOL"
37849  arguments="${tmp#* }"
37850
37851  # Input might be given as Windows format, start by converting to
37852  # unix format.
37853  new_path=`$CYGPATH -u "$path"`
37854
37855  # Now try to locate executable using which
37856  new_path=`$WHICH "$new_path" 2> /dev/null`
37857  # bat and cmd files are not always considered executable in cygwin causing which
37858  # to not find them
37859  if test "x$new_path" = x \
37860      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37861      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37862    new_path=`$CYGPATH -u "$path"`
37863  fi
37864  if test "x$new_path" = x; then
37865    # Oops. Which didn't find the executable.
37866    # The splitting of arguments from the executable at a space might have been incorrect,
37867    # since paths with space are more likely in Windows. Give it another try with the whole
37868    # argument.
37869    path="$complete"
37870    arguments="EOL"
37871    new_path=`$CYGPATH -u "$path"`
37872    new_path=`$WHICH "$new_path" 2> /dev/null`
37873    # bat and cmd files are not always considered executable in cygwin causing which
37874    # to not find them
37875    if test "x$new_path" = x \
37876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37878      new_path=`$CYGPATH -u "$path"`
37879    fi
37880    if test "x$new_path" = x; then
37881      # It's still not found. Now this is an unrecoverable error.
37882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
37883$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
37884      has_space=`$ECHO "$complete" | $GREP " "`
37885      if test "x$has_space" != x; then
37886        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37887$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37888      fi
37889      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37890    fi
37891  fi
37892
37893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37896  # "foo.exe" is OK but "foo" is an error.
37897  #
37898  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37899  # It is also a way to make sure we got the proper file name for the real test later on.
37900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37901  if test "x$test_shortpath" = x; then
37902    # Short path failed, file does not exist as specified.
37903    # Try adding .exe or .cmd
37904    if test -f "${new_path}.exe"; then
37905      input_to_shortpath="${new_path}.exe"
37906    elif test -f "${new_path}.cmd"; then
37907      input_to_shortpath="${new_path}.cmd"
37908    else
37909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
37910$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
37911      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37912$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37913      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
37914    fi
37915  else
37916    input_to_shortpath="$new_path"
37917  fi
37918
37919  # Call helper function which possibly converts this using DOS-style short mode.
37920  # If so, the updated path is stored in $new_path.
37921  new_path="$input_to_shortpath"
37922
37923  input_path="$input_to_shortpath"
37924  # Check if we need to convert this using DOS-style short mode. If the path
37925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37926  # take no chances and rewrite it.
37927  # Note: m4 eats our [], so we need to use [ and ] instead.
37928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37929  if test "x$has_forbidden_chars" != x; then
37930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37934      # Going to short mode and back again did indeed matter. Since short mode is
37935      # case insensitive, let's make it lowercase to improve readability.
37936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37937      # Now convert it back to Unix-style (cygpath)
37938      input_path=`$CYGPATH -u "$shortmode_path"`
37939      new_path="$input_path"
37940    fi
37941  fi
37942
37943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37944  if test "x$test_cygdrive_prefix" = x; then
37945    # As a simple fix, exclude /usr/bin since it's not a real path.
37946    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37948      # a path prefixed by /cygdrive for fixpath to work.
37949      new_path="$CYGWIN_ROOT_PATH$input_path"
37950    fi
37951  fi
37952
37953  # remove trailing .exe if any
37954  new_path="${new_path/%.exe/}"
37955
37956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37957
37958  # First separate the path from the arguments. This will split at the first
37959  # space.
37960  complete="$DUMPBIN"
37961  path="${complete%% *}"
37962  tmp="$complete EOL"
37963  arguments="${tmp#* }"
37964
37965  # Input might be given as Windows format, start by converting to
37966  # unix format.
37967  new_path="$path"
37968
37969  windows_path="$new_path"
37970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37971    unix_path=`$CYGPATH -u "$windows_path"`
37972    new_path="$unix_path"
37973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37975    new_path="$unix_path"
37976  fi
37977
37978
37979  # Now try to locate executable using which
37980  new_path=`$WHICH "$new_path" 2> /dev/null`
37981
37982  if test "x$new_path" = x; then
37983    # Oops. Which didn't find the executable.
37984    # The splitting of arguments from the executable at a space might have been incorrect,
37985    # since paths with space are more likely in Windows. Give it another try with the whole
37986    # argument.
37987    path="$complete"
37988    arguments="EOL"
37989    new_path="$path"
37990
37991  windows_path="$new_path"
37992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37993    unix_path=`$CYGPATH -u "$windows_path"`
37994    new_path="$unix_path"
37995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37997    new_path="$unix_path"
37998  fi
37999
38000
38001    new_path=`$WHICH "$new_path" 2> /dev/null`
38002    # bat and cmd files are not always considered executable in MSYS causing which
38003    # to not find them
38004    if test "x$new_path" = x \
38005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38007      new_path="$path"
38008
38009  windows_path="$new_path"
38010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38011    unix_path=`$CYGPATH -u "$windows_path"`
38012    new_path="$unix_path"
38013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38015    new_path="$unix_path"
38016  fi
38017
38018    fi
38019
38020    if test "x$new_path" = x; then
38021      # It's still not found. Now this is an unrecoverable error.
38022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38023$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38024      has_space=`$ECHO "$complete" | $GREP " "`
38025      if test "x$has_space" != x; then
38026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38028      fi
38029      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38030    fi
38031  fi
38032
38033  # Now new_path has a complete unix path to the binary
38034  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38035    # Keep paths in /bin as-is, but remove trailing .exe if any
38036    new_path="${new_path/%.exe/}"
38037    # Do not save /bin paths to all_fixpath_prefixes!
38038  else
38039    # Not in mixed or Windows style, start by that.
38040    new_path=`cmd //c echo $new_path`
38041
38042  input_path="$new_path"
38043  # Check if we need to convert this using DOS-style short mode. If the path
38044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38045  # take no chances and rewrite it.
38046  # Note: m4 eats our [], so we need to use [ and ] instead.
38047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38048  if test "x$has_forbidden_chars" != x; then
38049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38051  fi
38052
38053    # Output is in $new_path
38054
38055  windows_path="$new_path"
38056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38057    unix_path=`$CYGPATH -u "$windows_path"`
38058    new_path="$unix_path"
38059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38061    new_path="$unix_path"
38062  fi
38063
38064    # remove trailing .exe if any
38065    new_path="${new_path/%.exe/}"
38066
38067    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38068    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38069  fi
38070
38071    else
38072      # We're on a unix platform. Hooray! :)
38073      # First separate the path from the arguments. This will split at the first
38074      # space.
38075      complete="$DUMPBIN"
38076      path="${complete%% *}"
38077      tmp="$complete EOL"
38078      arguments="${tmp#* }"
38079
38080      # Cannot rely on the command "which" here since it doesn't always work.
38081      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38082      if test -z "$is_absolute_path"; then
38083        # Path to executable is not absolute. Find it.
38084        IFS_save="$IFS"
38085        IFS=:
38086        for p in $PATH; do
38087          if test -f "$p/$path" && test -x "$p/$path"; then
38088            new_path="$p/$path"
38089            break
38090          fi
38091        done
38092        IFS="$IFS_save"
38093      else
38094        # This is an absolute path, we can use it without further modifications.
38095        new_path="$path"
38096      fi
38097
38098      if test "x$new_path" = x; then
38099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38100$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38101        has_space=`$ECHO "$complete" | $GREP " "`
38102        if test "x$has_space" != x; then
38103          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38104$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38105        fi
38106        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38107      fi
38108    fi
38109
38110    # Now join together the path and the arguments once again
38111    if test "x$arguments" != xEOL; then
38112      new_complete="$new_path ${arguments% *}"
38113    else
38114      new_complete="$new_path"
38115    fi
38116
38117    if test "x$complete" != "x$new_complete"; then
38118      DUMPBIN="$new_complete"
38119      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38120$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38121    fi
38122  fi
38123
38124    # We need to check for 'msbuild.exe' because at the place where we expect to
38125    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38126    # won't find the 'msbuild.exe' executable in that case (and the
38127    # 'ac_executable_extensions' is unusable due to performance reasons).
38128    # Notice that we intentionally don't fix up the path to MSBUILD because we
38129    # will call it in a DOS shell during freetype detection on Windows (see
38130    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38131    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38132set dummy msbuild.exe; ac_word=$2
38133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38134$as_echo_n "checking for $ac_word... " >&6; }
38135if ${ac_cv_prog_MSBUILD+:} false; then :
38136  $as_echo_n "(cached) " >&6
38137else
38138  if test -n "$MSBUILD"; then
38139  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38140else
38141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38142for as_dir in $PATH
38143do
38144  IFS=$as_save_IFS
38145  test -z "$as_dir" && as_dir=.
38146    for ac_exec_ext in '' $ac_executable_extensions; do
38147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38148    ac_cv_prog_MSBUILD="msbuild.exe"
38149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38150    break 2
38151  fi
38152done
38153  done
38154IFS=$as_save_IFS
38155
38156fi
38157fi
38158MSBUILD=$ac_cv_prog_MSBUILD
38159if test -n "$MSBUILD"; then
38160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38161$as_echo "$MSBUILD" >&6; }
38162else
38163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38164$as_echo "no" >&6; }
38165fi
38166
38167
38168  fi
38169
38170  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38171
38172
38173  # Publish this variable in the help.
38174
38175
38176  if [ -z "${STRIP+x}" ]; then
38177    # The variable is not set by user, try to locate tool using the code snippet
38178    for ac_prog in strip
38179do
38180  # Extract the first word of "$ac_prog", so it can be a program name with args.
38181set dummy $ac_prog; ac_word=$2
38182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38183$as_echo_n "checking for $ac_word... " >&6; }
38184if ${ac_cv_path_STRIP+:} false; then :
38185  $as_echo_n "(cached) " >&6
38186else
38187  case $STRIP in
38188  [\\/]* | ?:[\\/]*)
38189  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38190  ;;
38191  *)
38192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38193for as_dir in $PATH
38194do
38195  IFS=$as_save_IFS
38196  test -z "$as_dir" && as_dir=.
38197    for ac_exec_ext in '' $ac_executable_extensions; do
38198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38199    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38201    break 2
38202  fi
38203done
38204  done
38205IFS=$as_save_IFS
38206
38207  ;;
38208esac
38209fi
38210STRIP=$ac_cv_path_STRIP
38211if test -n "$STRIP"; then
38212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38213$as_echo "$STRIP" >&6; }
38214else
38215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38216$as_echo "no" >&6; }
38217fi
38218
38219
38220  test -n "$STRIP" && break
38221done
38222
38223  else
38224    # The variable is set, but is it from the command line or the environment?
38225
38226    # Try to remove the string !STRIP! from our list.
38227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38229      # If it failed, the variable was not from the command line. Ignore it,
38230      # but warn the user (except for BASH, which is always set by the calling BASH).
38231      if test "xSTRIP" != xBASH; then
38232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38233$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38234      fi
38235      # Try to locate tool using the code snippet
38236      for ac_prog in strip
38237do
38238  # Extract the first word of "$ac_prog", so it can be a program name with args.
38239set dummy $ac_prog; ac_word=$2
38240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38241$as_echo_n "checking for $ac_word... " >&6; }
38242if ${ac_cv_path_STRIP+:} false; then :
38243  $as_echo_n "(cached) " >&6
38244else
38245  case $STRIP in
38246  [\\/]* | ?:[\\/]*)
38247  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38248  ;;
38249  *)
38250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38251for as_dir in $PATH
38252do
38253  IFS=$as_save_IFS
38254  test -z "$as_dir" && as_dir=.
38255    for ac_exec_ext in '' $ac_executable_extensions; do
38256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38257    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38259    break 2
38260  fi
38261done
38262  done
38263IFS=$as_save_IFS
38264
38265  ;;
38266esac
38267fi
38268STRIP=$ac_cv_path_STRIP
38269if test -n "$STRIP"; then
38270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38271$as_echo "$STRIP" >&6; }
38272else
38273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38274$as_echo "no" >&6; }
38275fi
38276
38277
38278  test -n "$STRIP" && break
38279done
38280
38281    else
38282      # If it succeeded, then it was overridden by the user. We will use it
38283      # for the tool.
38284
38285      # First remove it from the list of overridden variables, so we can test
38286      # for unknown variables in the end.
38287      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38288
38289      # Check if we try to supply an empty value
38290      if test "x$STRIP" = x; then
38291        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38292$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38293        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38294$as_echo_n "checking for STRIP... " >&6; }
38295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38296$as_echo "disabled" >&6; }
38297      else
38298        # Check if the provided tool contains a complete path.
38299        tool_specified="$STRIP"
38300        tool_basename="${tool_specified##*/}"
38301        if test "x$tool_basename" = "x$tool_specified"; then
38302          # A command without a complete path is provided, search $PATH.
38303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38304$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38305          # Extract the first word of "$tool_basename", so it can be a program name with args.
38306set dummy $tool_basename; ac_word=$2
38307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38308$as_echo_n "checking for $ac_word... " >&6; }
38309if ${ac_cv_path_STRIP+:} false; then :
38310  $as_echo_n "(cached) " >&6
38311else
38312  case $STRIP in
38313  [\\/]* | ?:[\\/]*)
38314  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38315  ;;
38316  *)
38317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38318for as_dir in $PATH
38319do
38320  IFS=$as_save_IFS
38321  test -z "$as_dir" && as_dir=.
38322    for ac_exec_ext in '' $ac_executable_extensions; do
38323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38324    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38326    break 2
38327  fi
38328done
38329  done
38330IFS=$as_save_IFS
38331
38332  ;;
38333esac
38334fi
38335STRIP=$ac_cv_path_STRIP
38336if test -n "$STRIP"; then
38337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38338$as_echo "$STRIP" >&6; }
38339else
38340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38341$as_echo "no" >&6; }
38342fi
38343
38344
38345          if test "x$STRIP" = x; then
38346            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38347          fi
38348        else
38349          # Otherwise we believe it is a complete path. Use it as it is.
38350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38351$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38352          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38353$as_echo_n "checking for STRIP... " >&6; }
38354          if test ! -x "$tool_specified"; then
38355            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38356$as_echo "not found" >&6; }
38357            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38358          fi
38359          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38360$as_echo "$tool_specified" >&6; }
38361        fi
38362      fi
38363    fi
38364
38365  fi
38366
38367
38368
38369  # Only process if variable expands to non-empty
38370
38371  if test "x$STRIP" != x; then
38372    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38373
38374  # First separate the path from the arguments. This will split at the first
38375  # space.
38376  complete="$STRIP"
38377  path="${complete%% *}"
38378  tmp="$complete EOL"
38379  arguments="${tmp#* }"
38380
38381  # Input might be given as Windows format, start by converting to
38382  # unix format.
38383  new_path=`$CYGPATH -u "$path"`
38384
38385  # Now try to locate executable using which
38386  new_path=`$WHICH "$new_path" 2> /dev/null`
38387  # bat and cmd files are not always considered executable in cygwin causing which
38388  # to not find them
38389  if test "x$new_path" = x \
38390      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38391      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38392    new_path=`$CYGPATH -u "$path"`
38393  fi
38394  if test "x$new_path" = x; then
38395    # Oops. Which didn't find the executable.
38396    # The splitting of arguments from the executable at a space might have been incorrect,
38397    # since paths with space are more likely in Windows. Give it another try with the whole
38398    # argument.
38399    path="$complete"
38400    arguments="EOL"
38401    new_path=`$CYGPATH -u "$path"`
38402    new_path=`$WHICH "$new_path" 2> /dev/null`
38403    # bat and cmd files are not always considered executable in cygwin causing which
38404    # to not find them
38405    if test "x$new_path" = x \
38406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38408      new_path=`$CYGPATH -u "$path"`
38409    fi
38410    if test "x$new_path" = x; then
38411      # It's still not found. Now this is an unrecoverable error.
38412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38413$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38414      has_space=`$ECHO "$complete" | $GREP " "`
38415      if test "x$has_space" != x; then
38416        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38417$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38418      fi
38419      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38420    fi
38421  fi
38422
38423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38426  # "foo.exe" is OK but "foo" is an error.
38427  #
38428  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38429  # It is also a way to make sure we got the proper file name for the real test later on.
38430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38431  if test "x$test_shortpath" = x; then
38432    # Short path failed, file does not exist as specified.
38433    # Try adding .exe or .cmd
38434    if test -f "${new_path}.exe"; then
38435      input_to_shortpath="${new_path}.exe"
38436    elif test -f "${new_path}.cmd"; then
38437      input_to_shortpath="${new_path}.cmd"
38438    else
38439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
38440$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
38441      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38442$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38443      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38444    fi
38445  else
38446    input_to_shortpath="$new_path"
38447  fi
38448
38449  # Call helper function which possibly converts this using DOS-style short mode.
38450  # If so, the updated path is stored in $new_path.
38451  new_path="$input_to_shortpath"
38452
38453  input_path="$input_to_shortpath"
38454  # Check if we need to convert this using DOS-style short mode. If the path
38455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38456  # take no chances and rewrite it.
38457  # Note: m4 eats our [], so we need to use [ and ] instead.
38458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38459  if test "x$has_forbidden_chars" != x; then
38460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38464      # Going to short mode and back again did indeed matter. Since short mode is
38465      # case insensitive, let's make it lowercase to improve readability.
38466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38467      # Now convert it back to Unix-style (cygpath)
38468      input_path=`$CYGPATH -u "$shortmode_path"`
38469      new_path="$input_path"
38470    fi
38471  fi
38472
38473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38474  if test "x$test_cygdrive_prefix" = x; then
38475    # As a simple fix, exclude /usr/bin since it's not a real path.
38476    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38478      # a path prefixed by /cygdrive for fixpath to work.
38479      new_path="$CYGWIN_ROOT_PATH$input_path"
38480    fi
38481  fi
38482
38483  # remove trailing .exe if any
38484  new_path="${new_path/%.exe/}"
38485
38486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38487
38488  # First separate the path from the arguments. This will split at the first
38489  # space.
38490  complete="$STRIP"
38491  path="${complete%% *}"
38492  tmp="$complete EOL"
38493  arguments="${tmp#* }"
38494
38495  # Input might be given as Windows format, start by converting to
38496  # unix format.
38497  new_path="$path"
38498
38499  windows_path="$new_path"
38500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38501    unix_path=`$CYGPATH -u "$windows_path"`
38502    new_path="$unix_path"
38503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38505    new_path="$unix_path"
38506  fi
38507
38508
38509  # Now try to locate executable using which
38510  new_path=`$WHICH "$new_path" 2> /dev/null`
38511
38512  if test "x$new_path" = x; then
38513    # Oops. Which didn't find the executable.
38514    # The splitting of arguments from the executable at a space might have been incorrect,
38515    # since paths with space are more likely in Windows. Give it another try with the whole
38516    # argument.
38517    path="$complete"
38518    arguments="EOL"
38519    new_path="$path"
38520
38521  windows_path="$new_path"
38522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38523    unix_path=`$CYGPATH -u "$windows_path"`
38524    new_path="$unix_path"
38525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38527    new_path="$unix_path"
38528  fi
38529
38530
38531    new_path=`$WHICH "$new_path" 2> /dev/null`
38532    # bat and cmd files are not always considered executable in MSYS causing which
38533    # to not find them
38534    if test "x$new_path" = x \
38535        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38536        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38537      new_path="$path"
38538
38539  windows_path="$new_path"
38540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38541    unix_path=`$CYGPATH -u "$windows_path"`
38542    new_path="$unix_path"
38543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38545    new_path="$unix_path"
38546  fi
38547
38548    fi
38549
38550    if test "x$new_path" = x; then
38551      # It's still not found. Now this is an unrecoverable error.
38552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38553$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38554      has_space=`$ECHO "$complete" | $GREP " "`
38555      if test "x$has_space" != x; then
38556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38558      fi
38559      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38560    fi
38561  fi
38562
38563  # Now new_path has a complete unix path to the binary
38564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38565    # Keep paths in /bin as-is, but remove trailing .exe if any
38566    new_path="${new_path/%.exe/}"
38567    # Do not save /bin paths to all_fixpath_prefixes!
38568  else
38569    # Not in mixed or Windows style, start by that.
38570    new_path=`cmd //c echo $new_path`
38571
38572  input_path="$new_path"
38573  # Check if we need to convert this using DOS-style short mode. If the path
38574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38575  # take no chances and rewrite it.
38576  # Note: m4 eats our [], so we need to use [ and ] instead.
38577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38578  if test "x$has_forbidden_chars" != x; then
38579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38581  fi
38582
38583    # Output is in $new_path
38584
38585  windows_path="$new_path"
38586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38587    unix_path=`$CYGPATH -u "$windows_path"`
38588    new_path="$unix_path"
38589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38591    new_path="$unix_path"
38592  fi
38593
38594    # remove trailing .exe if any
38595    new_path="${new_path/%.exe/}"
38596
38597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38599  fi
38600
38601    else
38602      # We're on a unix platform. Hooray! :)
38603      # First separate the path from the arguments. This will split at the first
38604      # space.
38605      complete="$STRIP"
38606      path="${complete%% *}"
38607      tmp="$complete EOL"
38608      arguments="${tmp#* }"
38609
38610      # Cannot rely on the command "which" here since it doesn't always work.
38611      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38612      if test -z "$is_absolute_path"; then
38613        # Path to executable is not absolute. Find it.
38614        IFS_save="$IFS"
38615        IFS=:
38616        for p in $PATH; do
38617          if test -f "$p/$path" && test -x "$p/$path"; then
38618            new_path="$p/$path"
38619            break
38620          fi
38621        done
38622        IFS="$IFS_save"
38623      else
38624        # This is an absolute path, we can use it without further modifications.
38625        new_path="$path"
38626      fi
38627
38628      if test "x$new_path" = x; then
38629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
38630$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
38631        has_space=`$ECHO "$complete" | $GREP " "`
38632        if test "x$has_space" != x; then
38633          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38634$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38635        fi
38636        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
38637      fi
38638    fi
38639
38640    # Now join together the path and the arguments once again
38641    if test "x$arguments" != xEOL; then
38642      new_complete="$new_path ${arguments% *}"
38643    else
38644      new_complete="$new_path"
38645    fi
38646
38647    if test "x$complete" != "x$new_complete"; then
38648      STRIP="$new_complete"
38649      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
38650$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
38651    fi
38652  fi
38653
38654
38655
38656  # Publish this variable in the help.
38657
38658
38659  if [ -z "${NM+x}" ]; then
38660    # The variable is not set by user, try to locate tool using the code snippet
38661    for ac_prog in nm
38662do
38663  # Extract the first word of "$ac_prog", so it can be a program name with args.
38664set dummy $ac_prog; ac_word=$2
38665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38666$as_echo_n "checking for $ac_word... " >&6; }
38667if ${ac_cv_path_NM+:} false; then :
38668  $as_echo_n "(cached) " >&6
38669else
38670  case $NM in
38671  [\\/]* | ?:[\\/]*)
38672  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38673  ;;
38674  *)
38675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38676for as_dir in $PATH
38677do
38678  IFS=$as_save_IFS
38679  test -z "$as_dir" && as_dir=.
38680    for ac_exec_ext in '' $ac_executable_extensions; do
38681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38682    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38684    break 2
38685  fi
38686done
38687  done
38688IFS=$as_save_IFS
38689
38690  ;;
38691esac
38692fi
38693NM=$ac_cv_path_NM
38694if test -n "$NM"; then
38695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38696$as_echo "$NM" >&6; }
38697else
38698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38699$as_echo "no" >&6; }
38700fi
38701
38702
38703  test -n "$NM" && break
38704done
38705
38706  else
38707    # The variable is set, but is it from the command line or the environment?
38708
38709    # Try to remove the string !NM! from our list.
38710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38712      # If it failed, the variable was not from the command line. Ignore it,
38713      # but warn the user (except for BASH, which is always set by the calling BASH).
38714      if test "xNM" != xBASH; then
38715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38716$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38717      fi
38718      # Try to locate tool using the code snippet
38719      for ac_prog in nm
38720do
38721  # Extract the first word of "$ac_prog", so it can be a program name with args.
38722set dummy $ac_prog; ac_word=$2
38723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38724$as_echo_n "checking for $ac_word... " >&6; }
38725if ${ac_cv_path_NM+:} false; then :
38726  $as_echo_n "(cached) " >&6
38727else
38728  case $NM in
38729  [\\/]* | ?:[\\/]*)
38730  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38731  ;;
38732  *)
38733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38734for as_dir in $PATH
38735do
38736  IFS=$as_save_IFS
38737  test -z "$as_dir" && as_dir=.
38738    for ac_exec_ext in '' $ac_executable_extensions; do
38739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38740    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38742    break 2
38743  fi
38744done
38745  done
38746IFS=$as_save_IFS
38747
38748  ;;
38749esac
38750fi
38751NM=$ac_cv_path_NM
38752if test -n "$NM"; then
38753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38754$as_echo "$NM" >&6; }
38755else
38756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38757$as_echo "no" >&6; }
38758fi
38759
38760
38761  test -n "$NM" && break
38762done
38763
38764    else
38765      # If it succeeded, then it was overridden by the user. We will use it
38766      # for the tool.
38767
38768      # First remove it from the list of overridden variables, so we can test
38769      # for unknown variables in the end.
38770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38771
38772      # Check if we try to supply an empty value
38773      if test "x$NM" = x; then
38774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
38775$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
38776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38777$as_echo_n "checking for NM... " >&6; }
38778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38779$as_echo "disabled" >&6; }
38780      else
38781        # Check if the provided tool contains a complete path.
38782        tool_specified="$NM"
38783        tool_basename="${tool_specified##*/}"
38784        if test "x$tool_basename" = "x$tool_specified"; then
38785          # A command without a complete path is provided, search $PATH.
38786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38787$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38788          # Extract the first word of "$tool_basename", so it can be a program name with args.
38789set dummy $tool_basename; ac_word=$2
38790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38791$as_echo_n "checking for $ac_word... " >&6; }
38792if ${ac_cv_path_NM+:} false; then :
38793  $as_echo_n "(cached) " >&6
38794else
38795  case $NM in
38796  [\\/]* | ?:[\\/]*)
38797  ac_cv_path_NM="$NM" # Let the user override the test with a path.
38798  ;;
38799  *)
38800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38801for as_dir in $PATH
38802do
38803  IFS=$as_save_IFS
38804  test -z "$as_dir" && as_dir=.
38805    for ac_exec_ext in '' $ac_executable_extensions; do
38806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38807    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38809    break 2
38810  fi
38811done
38812  done
38813IFS=$as_save_IFS
38814
38815  ;;
38816esac
38817fi
38818NM=$ac_cv_path_NM
38819if test -n "$NM"; then
38820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38821$as_echo "$NM" >&6; }
38822else
38823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38824$as_echo "no" >&6; }
38825fi
38826
38827
38828          if test "x$NM" = x; then
38829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38830          fi
38831        else
38832          # Otherwise we believe it is a complete path. Use it as it is.
38833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38834$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38836$as_echo_n "checking for NM... " >&6; }
38837          if test ! -x "$tool_specified"; then
38838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38839$as_echo "not found" >&6; }
38840            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38841          fi
38842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38843$as_echo "$tool_specified" >&6; }
38844        fi
38845      fi
38846    fi
38847
38848  fi
38849
38850
38851
38852  # Only process if variable expands to non-empty
38853
38854  if test "x$NM" != x; then
38855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38856
38857  # First separate the path from the arguments. This will split at the first
38858  # space.
38859  complete="$NM"
38860  path="${complete%% *}"
38861  tmp="$complete EOL"
38862  arguments="${tmp#* }"
38863
38864  # Input might be given as Windows format, start by converting to
38865  # unix format.
38866  new_path=`$CYGPATH -u "$path"`
38867
38868  # Now try to locate executable using which
38869  new_path=`$WHICH "$new_path" 2> /dev/null`
38870  # bat and cmd files are not always considered executable in cygwin causing which
38871  # to not find them
38872  if test "x$new_path" = x \
38873      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38874      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38875    new_path=`$CYGPATH -u "$path"`
38876  fi
38877  if test "x$new_path" = x; then
38878    # Oops. Which didn't find the executable.
38879    # The splitting of arguments from the executable at a space might have been incorrect,
38880    # since paths with space are more likely in Windows. Give it another try with the whole
38881    # argument.
38882    path="$complete"
38883    arguments="EOL"
38884    new_path=`$CYGPATH -u "$path"`
38885    new_path=`$WHICH "$new_path" 2> /dev/null`
38886    # bat and cmd files are not always considered executable in cygwin causing which
38887    # to not find them
38888    if test "x$new_path" = x \
38889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38891      new_path=`$CYGPATH -u "$path"`
38892    fi
38893    if test "x$new_path" = x; then
38894      # It's still not found. Now this is an unrecoverable error.
38895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38896$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38897      has_space=`$ECHO "$complete" | $GREP " "`
38898      if test "x$has_space" != x; then
38899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38901      fi
38902      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38903    fi
38904  fi
38905
38906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38909  # "foo.exe" is OK but "foo" is an error.
38910  #
38911  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38912  # It is also a way to make sure we got the proper file name for the real test later on.
38913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38914  if test "x$test_shortpath" = x; then
38915    # Short path failed, file does not exist as specified.
38916    # Try adding .exe or .cmd
38917    if test -f "${new_path}.exe"; then
38918      input_to_shortpath="${new_path}.exe"
38919    elif test -f "${new_path}.cmd"; then
38920      input_to_shortpath="${new_path}.cmd"
38921    else
38922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38923$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38924      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38925$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38926      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38927    fi
38928  else
38929    input_to_shortpath="$new_path"
38930  fi
38931
38932  # Call helper function which possibly converts this using DOS-style short mode.
38933  # If so, the updated path is stored in $new_path.
38934  new_path="$input_to_shortpath"
38935
38936  input_path="$input_to_shortpath"
38937  # Check if we need to convert this using DOS-style short mode. If the path
38938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38939  # take no chances and rewrite it.
38940  # Note: m4 eats our [], so we need to use [ and ] instead.
38941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38942  if test "x$has_forbidden_chars" != x; then
38943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38947      # Going to short mode and back again did indeed matter. Since short mode is
38948      # case insensitive, let's make it lowercase to improve readability.
38949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38950      # Now convert it back to Unix-style (cygpath)
38951      input_path=`$CYGPATH -u "$shortmode_path"`
38952      new_path="$input_path"
38953    fi
38954  fi
38955
38956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38957  if test "x$test_cygdrive_prefix" = x; then
38958    # As a simple fix, exclude /usr/bin since it's not a real path.
38959    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38961      # a path prefixed by /cygdrive for fixpath to work.
38962      new_path="$CYGWIN_ROOT_PATH$input_path"
38963    fi
38964  fi
38965
38966  # remove trailing .exe if any
38967  new_path="${new_path/%.exe/}"
38968
38969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38970
38971  # First separate the path from the arguments. This will split at the first
38972  # space.
38973  complete="$NM"
38974  path="${complete%% *}"
38975  tmp="$complete EOL"
38976  arguments="${tmp#* }"
38977
38978  # Input might be given as Windows format, start by converting to
38979  # unix format.
38980  new_path="$path"
38981
38982  windows_path="$new_path"
38983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38984    unix_path=`$CYGPATH -u "$windows_path"`
38985    new_path="$unix_path"
38986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38988    new_path="$unix_path"
38989  fi
38990
38991
38992  # Now try to locate executable using which
38993  new_path=`$WHICH "$new_path" 2> /dev/null`
38994
38995  if test "x$new_path" = x; then
38996    # Oops. Which didn't find the executable.
38997    # The splitting of arguments from the executable at a space might have been incorrect,
38998    # since paths with space are more likely in Windows. Give it another try with the whole
38999    # argument.
39000    path="$complete"
39001    arguments="EOL"
39002    new_path="$path"
39003
39004  windows_path="$new_path"
39005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39006    unix_path=`$CYGPATH -u "$windows_path"`
39007    new_path="$unix_path"
39008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39010    new_path="$unix_path"
39011  fi
39012
39013
39014    new_path=`$WHICH "$new_path" 2> /dev/null`
39015    # bat and cmd files are not always considered executable in MSYS causing which
39016    # to not find them
39017    if test "x$new_path" = x \
39018        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39019        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39020      new_path="$path"
39021
39022  windows_path="$new_path"
39023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39024    unix_path=`$CYGPATH -u "$windows_path"`
39025    new_path="$unix_path"
39026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39028    new_path="$unix_path"
39029  fi
39030
39031    fi
39032
39033    if test "x$new_path" = x; then
39034      # It's still not found. Now this is an unrecoverable error.
39035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39036$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39037      has_space=`$ECHO "$complete" | $GREP " "`
39038      if test "x$has_space" != x; then
39039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39041      fi
39042      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39043    fi
39044  fi
39045
39046  # Now new_path has a complete unix path to the binary
39047  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39048    # Keep paths in /bin as-is, but remove trailing .exe if any
39049    new_path="${new_path/%.exe/}"
39050    # Do not save /bin paths to all_fixpath_prefixes!
39051  else
39052    # Not in mixed or Windows style, start by that.
39053    new_path=`cmd //c echo $new_path`
39054
39055  input_path="$new_path"
39056  # Check if we need to convert this using DOS-style short mode. If the path
39057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39058  # take no chances and rewrite it.
39059  # Note: m4 eats our [], so we need to use [ and ] instead.
39060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39061  if test "x$has_forbidden_chars" != x; then
39062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39064  fi
39065
39066    # Output is in $new_path
39067
39068  windows_path="$new_path"
39069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39070    unix_path=`$CYGPATH -u "$windows_path"`
39071    new_path="$unix_path"
39072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39074    new_path="$unix_path"
39075  fi
39076
39077    # remove trailing .exe if any
39078    new_path="${new_path/%.exe/}"
39079
39080    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39081    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39082  fi
39083
39084    else
39085      # We're on a unix platform. Hooray! :)
39086      # First separate the path from the arguments. This will split at the first
39087      # space.
39088      complete="$NM"
39089      path="${complete%% *}"
39090      tmp="$complete EOL"
39091      arguments="${tmp#* }"
39092
39093      # Cannot rely on the command "which" here since it doesn't always work.
39094      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39095      if test -z "$is_absolute_path"; then
39096        # Path to executable is not absolute. Find it.
39097        IFS_save="$IFS"
39098        IFS=:
39099        for p in $PATH; do
39100          if test -f "$p/$path" && test -x "$p/$path"; then
39101            new_path="$p/$path"
39102            break
39103          fi
39104        done
39105        IFS="$IFS_save"
39106      else
39107        # This is an absolute path, we can use it without further modifications.
39108        new_path="$path"
39109      fi
39110
39111      if test "x$new_path" = x; then
39112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39113$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39114        has_space=`$ECHO "$complete" | $GREP " "`
39115        if test "x$has_space" != x; then
39116          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39118        fi
39119        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39120      fi
39121    fi
39122
39123    # Now join together the path and the arguments once again
39124    if test "x$arguments" != xEOL; then
39125      new_complete="$new_path ${arguments% *}"
39126    else
39127      new_complete="$new_path"
39128    fi
39129
39130    if test "x$complete" != "x$new_complete"; then
39131      NM="$new_complete"
39132      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39133$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39134    fi
39135  fi
39136
39137
39138
39139  # Publish this variable in the help.
39140
39141
39142  if [ -z "${GNM+x}" ]; then
39143    # The variable is not set by user, try to locate tool using the code snippet
39144    for ac_prog in gnm
39145do
39146  # Extract the first word of "$ac_prog", so it can be a program name with args.
39147set dummy $ac_prog; ac_word=$2
39148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39149$as_echo_n "checking for $ac_word... " >&6; }
39150if ${ac_cv_path_GNM+:} false; then :
39151  $as_echo_n "(cached) " >&6
39152else
39153  case $GNM in
39154  [\\/]* | ?:[\\/]*)
39155  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39156  ;;
39157  *)
39158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39159for as_dir in $PATH
39160do
39161  IFS=$as_save_IFS
39162  test -z "$as_dir" && as_dir=.
39163    for ac_exec_ext in '' $ac_executable_extensions; do
39164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39165    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39167    break 2
39168  fi
39169done
39170  done
39171IFS=$as_save_IFS
39172
39173  ;;
39174esac
39175fi
39176GNM=$ac_cv_path_GNM
39177if test -n "$GNM"; then
39178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39179$as_echo "$GNM" >&6; }
39180else
39181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39182$as_echo "no" >&6; }
39183fi
39184
39185
39186  test -n "$GNM" && break
39187done
39188
39189  else
39190    # The variable is set, but is it from the command line or the environment?
39191
39192    # Try to remove the string !GNM! from our list.
39193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39195      # If it failed, the variable was not from the command line. Ignore it,
39196      # but warn the user (except for BASH, which is always set by the calling BASH).
39197      if test "xGNM" != xBASH; then
39198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39199$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39200      fi
39201      # Try to locate tool using the code snippet
39202      for ac_prog in gnm
39203do
39204  # Extract the first word of "$ac_prog", so it can be a program name with args.
39205set dummy $ac_prog; ac_word=$2
39206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39207$as_echo_n "checking for $ac_word... " >&6; }
39208if ${ac_cv_path_GNM+:} false; then :
39209  $as_echo_n "(cached) " >&6
39210else
39211  case $GNM in
39212  [\\/]* | ?:[\\/]*)
39213  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39214  ;;
39215  *)
39216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39217for as_dir in $PATH
39218do
39219  IFS=$as_save_IFS
39220  test -z "$as_dir" && as_dir=.
39221    for ac_exec_ext in '' $ac_executable_extensions; do
39222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39223    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39225    break 2
39226  fi
39227done
39228  done
39229IFS=$as_save_IFS
39230
39231  ;;
39232esac
39233fi
39234GNM=$ac_cv_path_GNM
39235if test -n "$GNM"; then
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39237$as_echo "$GNM" >&6; }
39238else
39239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39240$as_echo "no" >&6; }
39241fi
39242
39243
39244  test -n "$GNM" && break
39245done
39246
39247    else
39248      # If it succeeded, then it was overridden by the user. We will use it
39249      # for the tool.
39250
39251      # First remove it from the list of overridden variables, so we can test
39252      # for unknown variables in the end.
39253      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39254
39255      # Check if we try to supply an empty value
39256      if test "x$GNM" = x; then
39257        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39258$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39259        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39260$as_echo_n "checking for GNM... " >&6; }
39261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39262$as_echo "disabled" >&6; }
39263      else
39264        # Check if the provided tool contains a complete path.
39265        tool_specified="$GNM"
39266        tool_basename="${tool_specified##*/}"
39267        if test "x$tool_basename" = "x$tool_specified"; then
39268          # A command without a complete path is provided, search $PATH.
39269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39270$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39271          # Extract the first word of "$tool_basename", so it can be a program name with args.
39272set dummy $tool_basename; ac_word=$2
39273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39274$as_echo_n "checking for $ac_word... " >&6; }
39275if ${ac_cv_path_GNM+:} false; then :
39276  $as_echo_n "(cached) " >&6
39277else
39278  case $GNM in
39279  [\\/]* | ?:[\\/]*)
39280  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39281  ;;
39282  *)
39283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39284for as_dir in $PATH
39285do
39286  IFS=$as_save_IFS
39287  test -z "$as_dir" && as_dir=.
39288    for ac_exec_ext in '' $ac_executable_extensions; do
39289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39290    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39292    break 2
39293  fi
39294done
39295  done
39296IFS=$as_save_IFS
39297
39298  ;;
39299esac
39300fi
39301GNM=$ac_cv_path_GNM
39302if test -n "$GNM"; then
39303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39304$as_echo "$GNM" >&6; }
39305else
39306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39307$as_echo "no" >&6; }
39308fi
39309
39310
39311          if test "x$GNM" = x; then
39312            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39313          fi
39314        else
39315          # Otherwise we believe it is a complete path. Use it as it is.
39316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39317$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39318          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39319$as_echo_n "checking for GNM... " >&6; }
39320          if test ! -x "$tool_specified"; then
39321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39322$as_echo "not found" >&6; }
39323            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39324          fi
39325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39326$as_echo "$tool_specified" >&6; }
39327        fi
39328      fi
39329    fi
39330
39331  fi
39332
39333
39334
39335  # Only process if variable expands to non-empty
39336
39337  if test "x$GNM" != x; then
39338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39339
39340  # First separate the path from the arguments. This will split at the first
39341  # space.
39342  complete="$GNM"
39343  path="${complete%% *}"
39344  tmp="$complete EOL"
39345  arguments="${tmp#* }"
39346
39347  # Input might be given as Windows format, start by converting to
39348  # unix format.
39349  new_path=`$CYGPATH -u "$path"`
39350
39351  # Now try to locate executable using which
39352  new_path=`$WHICH "$new_path" 2> /dev/null`
39353  # bat and cmd files are not always considered executable in cygwin causing which
39354  # to not find them
39355  if test "x$new_path" = x \
39356      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39357      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39358    new_path=`$CYGPATH -u "$path"`
39359  fi
39360  if test "x$new_path" = x; then
39361    # Oops. Which didn't find the executable.
39362    # The splitting of arguments from the executable at a space might have been incorrect,
39363    # since paths with space are more likely in Windows. Give it another try with the whole
39364    # argument.
39365    path="$complete"
39366    arguments="EOL"
39367    new_path=`$CYGPATH -u "$path"`
39368    new_path=`$WHICH "$new_path" 2> /dev/null`
39369    # bat and cmd files are not always considered executable in cygwin causing which
39370    # to not find them
39371    if test "x$new_path" = x \
39372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39374      new_path=`$CYGPATH -u "$path"`
39375    fi
39376    if test "x$new_path" = x; then
39377      # It's still not found. Now this is an unrecoverable error.
39378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39379$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39380      has_space=`$ECHO "$complete" | $GREP " "`
39381      if test "x$has_space" != x; then
39382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39384      fi
39385      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39386    fi
39387  fi
39388
39389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39392  # "foo.exe" is OK but "foo" is an error.
39393  #
39394  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39395  # It is also a way to make sure we got the proper file name for the real test later on.
39396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39397  if test "x$test_shortpath" = x; then
39398    # Short path failed, file does not exist as specified.
39399    # Try adding .exe or .cmd
39400    if test -f "${new_path}.exe"; then
39401      input_to_shortpath="${new_path}.exe"
39402    elif test -f "${new_path}.cmd"; then
39403      input_to_shortpath="${new_path}.cmd"
39404    else
39405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
39406$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
39407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39409      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39410    fi
39411  else
39412    input_to_shortpath="$new_path"
39413  fi
39414
39415  # Call helper function which possibly converts this using DOS-style short mode.
39416  # If so, the updated path is stored in $new_path.
39417  new_path="$input_to_shortpath"
39418
39419  input_path="$input_to_shortpath"
39420  # Check if we need to convert this using DOS-style short mode. If the path
39421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39422  # take no chances and rewrite it.
39423  # Note: m4 eats our [], so we need to use [ and ] instead.
39424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39425  if test "x$has_forbidden_chars" != x; then
39426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39430      # Going to short mode and back again did indeed matter. Since short mode is
39431      # case insensitive, let's make it lowercase to improve readability.
39432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39433      # Now convert it back to Unix-style (cygpath)
39434      input_path=`$CYGPATH -u "$shortmode_path"`
39435      new_path="$input_path"
39436    fi
39437  fi
39438
39439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39440  if test "x$test_cygdrive_prefix" = x; then
39441    # As a simple fix, exclude /usr/bin since it's not a real path.
39442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39444      # a path prefixed by /cygdrive for fixpath to work.
39445      new_path="$CYGWIN_ROOT_PATH$input_path"
39446    fi
39447  fi
39448
39449  # remove trailing .exe if any
39450  new_path="${new_path/%.exe/}"
39451
39452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39453
39454  # First separate the path from the arguments. This will split at the first
39455  # space.
39456  complete="$GNM"
39457  path="${complete%% *}"
39458  tmp="$complete EOL"
39459  arguments="${tmp#* }"
39460
39461  # Input might be given as Windows format, start by converting to
39462  # unix format.
39463  new_path="$path"
39464
39465  windows_path="$new_path"
39466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39467    unix_path=`$CYGPATH -u "$windows_path"`
39468    new_path="$unix_path"
39469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39471    new_path="$unix_path"
39472  fi
39473
39474
39475  # Now try to locate executable using which
39476  new_path=`$WHICH "$new_path" 2> /dev/null`
39477
39478  if test "x$new_path" = x; then
39479    # Oops. Which didn't find the executable.
39480    # The splitting of arguments from the executable at a space might have been incorrect,
39481    # since paths with space are more likely in Windows. Give it another try with the whole
39482    # argument.
39483    path="$complete"
39484    arguments="EOL"
39485    new_path="$path"
39486
39487  windows_path="$new_path"
39488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39489    unix_path=`$CYGPATH -u "$windows_path"`
39490    new_path="$unix_path"
39491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39493    new_path="$unix_path"
39494  fi
39495
39496
39497    new_path=`$WHICH "$new_path" 2> /dev/null`
39498    # bat and cmd files are not always considered executable in MSYS causing which
39499    # to not find them
39500    if test "x$new_path" = x \
39501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39503      new_path="$path"
39504
39505  windows_path="$new_path"
39506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39507    unix_path=`$CYGPATH -u "$windows_path"`
39508    new_path="$unix_path"
39509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39511    new_path="$unix_path"
39512  fi
39513
39514    fi
39515
39516    if test "x$new_path" = x; then
39517      # It's still not found. Now this is an unrecoverable error.
39518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39519$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39520      has_space=`$ECHO "$complete" | $GREP " "`
39521      if test "x$has_space" != x; then
39522        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39523$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39524      fi
39525      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39526    fi
39527  fi
39528
39529  # Now new_path has a complete unix path to the binary
39530  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39531    # Keep paths in /bin as-is, but remove trailing .exe if any
39532    new_path="${new_path/%.exe/}"
39533    # Do not save /bin paths to all_fixpath_prefixes!
39534  else
39535    # Not in mixed or Windows style, start by that.
39536    new_path=`cmd //c echo $new_path`
39537
39538  input_path="$new_path"
39539  # Check if we need to convert this using DOS-style short mode. If the path
39540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39541  # take no chances and rewrite it.
39542  # Note: m4 eats our [], so we need to use [ and ] instead.
39543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39544  if test "x$has_forbidden_chars" != x; then
39545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39547  fi
39548
39549    # Output is in $new_path
39550
39551  windows_path="$new_path"
39552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39553    unix_path=`$CYGPATH -u "$windows_path"`
39554    new_path="$unix_path"
39555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39557    new_path="$unix_path"
39558  fi
39559
39560    # remove trailing .exe if any
39561    new_path="${new_path/%.exe/}"
39562
39563    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39564    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39565  fi
39566
39567    else
39568      # We're on a unix platform. Hooray! :)
39569      # First separate the path from the arguments. This will split at the first
39570      # space.
39571      complete="$GNM"
39572      path="${complete%% *}"
39573      tmp="$complete EOL"
39574      arguments="${tmp#* }"
39575
39576      # Cannot rely on the command "which" here since it doesn't always work.
39577      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39578      if test -z "$is_absolute_path"; then
39579        # Path to executable is not absolute. Find it.
39580        IFS_save="$IFS"
39581        IFS=:
39582        for p in $PATH; do
39583          if test -f "$p/$path" && test -x "$p/$path"; then
39584            new_path="$p/$path"
39585            break
39586          fi
39587        done
39588        IFS="$IFS_save"
39589      else
39590        # This is an absolute path, we can use it without further modifications.
39591        new_path="$path"
39592      fi
39593
39594      if test "x$new_path" = x; then
39595        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
39596$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
39597        has_space=`$ECHO "$complete" | $GREP " "`
39598        if test "x$has_space" != x; then
39599          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39600$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39601        fi
39602        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
39603      fi
39604    fi
39605
39606    # Now join together the path and the arguments once again
39607    if test "x$arguments" != xEOL; then
39608      new_complete="$new_path ${arguments% *}"
39609    else
39610      new_complete="$new_path"
39611    fi
39612
39613    if test "x$complete" != "x$new_complete"; then
39614      GNM="$new_complete"
39615      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
39616$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
39617    fi
39618  fi
39619
39620  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
39621    # FIXME: we should unify this with the solaris case above.
39622
39623
39624  # Publish this variable in the help.
39625
39626
39627  if [ -z "${STRIP+x}" ]; then
39628    # The variable is not set by user, try to locate tool using the code snippet
39629    if test -n "$ac_tool_prefix"; then
39630  for ac_prog in strip
39631  do
39632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39635$as_echo_n "checking for $ac_word... " >&6; }
39636if ${ac_cv_prog_STRIP+:} false; then :
39637  $as_echo_n "(cached) " >&6
39638else
39639  if test -n "$STRIP"; then
39640  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39641else
39642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39643for as_dir in $PATH
39644do
39645  IFS=$as_save_IFS
39646  test -z "$as_dir" && as_dir=.
39647    for ac_exec_ext in '' $ac_executable_extensions; do
39648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39649    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39651    break 2
39652  fi
39653done
39654  done
39655IFS=$as_save_IFS
39656
39657fi
39658fi
39659STRIP=$ac_cv_prog_STRIP
39660if test -n "$STRIP"; then
39661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39662$as_echo "$STRIP" >&6; }
39663else
39664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39665$as_echo "no" >&6; }
39666fi
39667
39668
39669    test -n "$STRIP" && break
39670  done
39671fi
39672if test -z "$STRIP"; then
39673  ac_ct_STRIP=$STRIP
39674  for ac_prog in strip
39675do
39676  # Extract the first word of "$ac_prog", so it can be a program name with args.
39677set dummy $ac_prog; ac_word=$2
39678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39679$as_echo_n "checking for $ac_word... " >&6; }
39680if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39681  $as_echo_n "(cached) " >&6
39682else
39683  if test -n "$ac_ct_STRIP"; then
39684  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39685else
39686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39687for as_dir in $PATH
39688do
39689  IFS=$as_save_IFS
39690  test -z "$as_dir" && as_dir=.
39691    for ac_exec_ext in '' $ac_executable_extensions; do
39692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39693    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39695    break 2
39696  fi
39697done
39698  done
39699IFS=$as_save_IFS
39700
39701fi
39702fi
39703ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39704if test -n "$ac_ct_STRIP"; then
39705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39706$as_echo "$ac_ct_STRIP" >&6; }
39707else
39708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39709$as_echo "no" >&6; }
39710fi
39711
39712
39713  test -n "$ac_ct_STRIP" && break
39714done
39715
39716  if test "x$ac_ct_STRIP" = x; then
39717    STRIP=""
39718  else
39719    case $cross_compiling:$ac_tool_warned in
39720yes:)
39721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39723ac_tool_warned=yes ;;
39724esac
39725    STRIP=$ac_ct_STRIP
39726  fi
39727fi
39728
39729  else
39730    # The variable is set, but is it from the command line or the environment?
39731
39732    # Try to remove the string !STRIP! from our list.
39733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39735      # If it failed, the variable was not from the command line. Ignore it,
39736      # but warn the user (except for BASH, which is always set by the calling BASH).
39737      if test "xSTRIP" != xBASH; then
39738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39739$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39740      fi
39741      # Try to locate tool using the code snippet
39742      if test -n "$ac_tool_prefix"; then
39743  for ac_prog in strip
39744  do
39745    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39746set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39748$as_echo_n "checking for $ac_word... " >&6; }
39749if ${ac_cv_prog_STRIP+:} false; then :
39750  $as_echo_n "(cached) " >&6
39751else
39752  if test -n "$STRIP"; then
39753  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
39754else
39755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39756for as_dir in $PATH
39757do
39758  IFS=$as_save_IFS
39759  test -z "$as_dir" && as_dir=.
39760    for ac_exec_ext in '' $ac_executable_extensions; do
39761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39762    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
39763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39764    break 2
39765  fi
39766done
39767  done
39768IFS=$as_save_IFS
39769
39770fi
39771fi
39772STRIP=$ac_cv_prog_STRIP
39773if test -n "$STRIP"; then
39774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39775$as_echo "$STRIP" >&6; }
39776else
39777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39778$as_echo "no" >&6; }
39779fi
39780
39781
39782    test -n "$STRIP" && break
39783  done
39784fi
39785if test -z "$STRIP"; then
39786  ac_ct_STRIP=$STRIP
39787  for ac_prog in strip
39788do
39789  # Extract the first word of "$ac_prog", so it can be a program name with args.
39790set dummy $ac_prog; ac_word=$2
39791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39792$as_echo_n "checking for $ac_word... " >&6; }
39793if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
39794  $as_echo_n "(cached) " >&6
39795else
39796  if test -n "$ac_ct_STRIP"; then
39797  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
39798else
39799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39800for as_dir in $PATH
39801do
39802  IFS=$as_save_IFS
39803  test -z "$as_dir" && as_dir=.
39804    for ac_exec_ext in '' $ac_executable_extensions; do
39805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39806    ac_cv_prog_ac_ct_STRIP="$ac_prog"
39807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39808    break 2
39809  fi
39810done
39811  done
39812IFS=$as_save_IFS
39813
39814fi
39815fi
39816ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
39817if test -n "$ac_ct_STRIP"; then
39818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
39819$as_echo "$ac_ct_STRIP" >&6; }
39820else
39821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39822$as_echo "no" >&6; }
39823fi
39824
39825
39826  test -n "$ac_ct_STRIP" && break
39827done
39828
39829  if test "x$ac_ct_STRIP" = x; then
39830    STRIP=""
39831  else
39832    case $cross_compiling:$ac_tool_warned in
39833yes:)
39834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39836ac_tool_warned=yes ;;
39837esac
39838    STRIP=$ac_ct_STRIP
39839  fi
39840fi
39841
39842    else
39843      # If it succeeded, then it was overridden by the user. We will use it
39844      # for the tool.
39845
39846      # First remove it from the list of overridden variables, so we can test
39847      # for unknown variables in the end.
39848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39849
39850      # Check if we try to supply an empty value
39851      if test "x$STRIP" = x; then
39852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39853$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39855$as_echo_n "checking for STRIP... " >&6; }
39856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39857$as_echo "disabled" >&6; }
39858      else
39859        # Check if the provided tool contains a complete path.
39860        tool_specified="$STRIP"
39861        tool_basename="${tool_specified##*/}"
39862        if test "x$tool_basename" = "x$tool_specified"; then
39863          # A command without a complete path is provided, search $PATH.
39864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39865$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39866          # Extract the first word of "$tool_basename", so it can be a program name with args.
39867set dummy $tool_basename; ac_word=$2
39868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39869$as_echo_n "checking for $ac_word... " >&6; }
39870if ${ac_cv_path_STRIP+:} false; then :
39871  $as_echo_n "(cached) " >&6
39872else
39873  case $STRIP in
39874  [\\/]* | ?:[\\/]*)
39875  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39876  ;;
39877  *)
39878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39879for as_dir in $PATH
39880do
39881  IFS=$as_save_IFS
39882  test -z "$as_dir" && as_dir=.
39883    for ac_exec_ext in '' $ac_executable_extensions; do
39884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39885    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39887    break 2
39888  fi
39889done
39890  done
39891IFS=$as_save_IFS
39892
39893  ;;
39894esac
39895fi
39896STRIP=$ac_cv_path_STRIP
39897if test -n "$STRIP"; then
39898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39899$as_echo "$STRIP" >&6; }
39900else
39901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39902$as_echo "no" >&6; }
39903fi
39904
39905
39906          if test "x$STRIP" = x; then
39907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39908          fi
39909        else
39910          # Otherwise we believe it is a complete path. Use it as it is.
39911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39912$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39914$as_echo_n "checking for STRIP... " >&6; }
39915          if test ! -x "$tool_specified"; then
39916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39917$as_echo "not found" >&6; }
39918            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39919          fi
39920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39921$as_echo "$tool_specified" >&6; }
39922        fi
39923      fi
39924    fi
39925
39926  fi
39927
39928
39929
39930  # Only process if variable expands to non-empty
39931
39932  if test "x$STRIP" != x; then
39933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934
39935  # First separate the path from the arguments. This will split at the first
39936  # space.
39937  complete="$STRIP"
39938  path="${complete%% *}"
39939  tmp="$complete EOL"
39940  arguments="${tmp#* }"
39941
39942  # Input might be given as Windows format, start by converting to
39943  # unix format.
39944  new_path=`$CYGPATH -u "$path"`
39945
39946  # Now try to locate executable using which
39947  new_path=`$WHICH "$new_path" 2> /dev/null`
39948  # bat and cmd files are not always considered executable in cygwin causing which
39949  # to not find them
39950  if test "x$new_path" = x \
39951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39953    new_path=`$CYGPATH -u "$path"`
39954  fi
39955  if test "x$new_path" = x; then
39956    # Oops. Which didn't find the executable.
39957    # The splitting of arguments from the executable at a space might have been incorrect,
39958    # since paths with space are more likely in Windows. Give it another try with the whole
39959    # argument.
39960    path="$complete"
39961    arguments="EOL"
39962    new_path=`$CYGPATH -u "$path"`
39963    new_path=`$WHICH "$new_path" 2> /dev/null`
39964    # bat and cmd files are not always considered executable in cygwin causing which
39965    # to not find them
39966    if test "x$new_path" = x \
39967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39969      new_path=`$CYGPATH -u "$path"`
39970    fi
39971    if test "x$new_path" = x; then
39972      # It's still not found. Now this is an unrecoverable error.
39973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39974$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39975      has_space=`$ECHO "$complete" | $GREP " "`
39976      if test "x$has_space" != x; then
39977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39979      fi
39980      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39981    fi
39982  fi
39983
39984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39987  # "foo.exe" is OK but "foo" is an error.
39988  #
39989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39990  # It is also a way to make sure we got the proper file name for the real test later on.
39991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39992  if test "x$test_shortpath" = x; then
39993    # Short path failed, file does not exist as specified.
39994    # Try adding .exe or .cmd
39995    if test -f "${new_path}.exe"; then
39996      input_to_shortpath="${new_path}.exe"
39997    elif test -f "${new_path}.cmd"; then
39998      input_to_shortpath="${new_path}.cmd"
39999    else
40000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40001$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40004      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40005    fi
40006  else
40007    input_to_shortpath="$new_path"
40008  fi
40009
40010  # Call helper function which possibly converts this using DOS-style short mode.
40011  # If so, the updated path is stored in $new_path.
40012  new_path="$input_to_shortpath"
40013
40014  input_path="$input_to_shortpath"
40015  # Check if we need to convert this using DOS-style short mode. If the path
40016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40017  # take no chances and rewrite it.
40018  # Note: m4 eats our [], so we need to use [ and ] instead.
40019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40020  if test "x$has_forbidden_chars" != x; then
40021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40025      # Going to short mode and back again did indeed matter. Since short mode is
40026      # case insensitive, let's make it lowercase to improve readability.
40027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40028      # Now convert it back to Unix-style (cygpath)
40029      input_path=`$CYGPATH -u "$shortmode_path"`
40030      new_path="$input_path"
40031    fi
40032  fi
40033
40034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40035  if test "x$test_cygdrive_prefix" = x; then
40036    # As a simple fix, exclude /usr/bin since it's not a real path.
40037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40039      # a path prefixed by /cygdrive for fixpath to work.
40040      new_path="$CYGWIN_ROOT_PATH$input_path"
40041    fi
40042  fi
40043
40044  # remove trailing .exe if any
40045  new_path="${new_path/%.exe/}"
40046
40047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40048
40049  # First separate the path from the arguments. This will split at the first
40050  # space.
40051  complete="$STRIP"
40052  path="${complete%% *}"
40053  tmp="$complete EOL"
40054  arguments="${tmp#* }"
40055
40056  # Input might be given as Windows format, start by converting to
40057  # unix format.
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  # Now try to locate executable using which
40071  new_path=`$WHICH "$new_path" 2> /dev/null`
40072
40073  if test "x$new_path" = x; then
40074    # Oops. Which didn't find the executable.
40075    # The splitting of arguments from the executable at a space might have been incorrect,
40076    # since paths with space are more likely in Windows. Give it another try with the whole
40077    # argument.
40078    path="$complete"
40079    arguments="EOL"
40080    new_path="$path"
40081
40082  windows_path="$new_path"
40083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40084    unix_path=`$CYGPATH -u "$windows_path"`
40085    new_path="$unix_path"
40086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40088    new_path="$unix_path"
40089  fi
40090
40091
40092    new_path=`$WHICH "$new_path" 2> /dev/null`
40093    # bat and cmd files are not always considered executable in MSYS causing which
40094    # to not find them
40095    if test "x$new_path" = x \
40096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40098      new_path="$path"
40099
40100  windows_path="$new_path"
40101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40102    unix_path=`$CYGPATH -u "$windows_path"`
40103    new_path="$unix_path"
40104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40106    new_path="$unix_path"
40107  fi
40108
40109    fi
40110
40111    if test "x$new_path" = x; then
40112      # It's still not found. Now this is an unrecoverable error.
40113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40114$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40115      has_space=`$ECHO "$complete" | $GREP " "`
40116      if test "x$has_space" != x; then
40117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40119      fi
40120      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40121    fi
40122  fi
40123
40124  # Now new_path has a complete unix path to the binary
40125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40126    # Keep paths in /bin as-is, but remove trailing .exe if any
40127    new_path="${new_path/%.exe/}"
40128    # Do not save /bin paths to all_fixpath_prefixes!
40129  else
40130    # Not in mixed or Windows style, start by that.
40131    new_path=`cmd //c echo $new_path`
40132
40133  input_path="$new_path"
40134  # Check if we need to convert this using DOS-style short mode. If the path
40135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40136  # take no chances and rewrite it.
40137  # Note: m4 eats our [], so we need to use [ and ] instead.
40138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40139  if test "x$has_forbidden_chars" != x; then
40140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40142  fi
40143
40144    # Output is in $new_path
40145
40146  windows_path="$new_path"
40147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40148    unix_path=`$CYGPATH -u "$windows_path"`
40149    new_path="$unix_path"
40150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40152    new_path="$unix_path"
40153  fi
40154
40155    # remove trailing .exe if any
40156    new_path="${new_path/%.exe/}"
40157
40158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40160  fi
40161
40162    else
40163      # We're on a unix platform. Hooray! :)
40164      # First separate the path from the arguments. This will split at the first
40165      # space.
40166      complete="$STRIP"
40167      path="${complete%% *}"
40168      tmp="$complete EOL"
40169      arguments="${tmp#* }"
40170
40171      # Cannot rely on the command "which" here since it doesn't always work.
40172      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40173      if test -z "$is_absolute_path"; then
40174        # Path to executable is not absolute. Find it.
40175        IFS_save="$IFS"
40176        IFS=:
40177        for p in $PATH; do
40178          if test -f "$p/$path" && test -x "$p/$path"; then
40179            new_path="$p/$path"
40180            break
40181          fi
40182        done
40183        IFS="$IFS_save"
40184      else
40185        # This is an absolute path, we can use it without further modifications.
40186        new_path="$path"
40187      fi
40188
40189      if test "x$new_path" = x; then
40190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40191$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40192        has_space=`$ECHO "$complete" | $GREP " "`
40193        if test "x$has_space" != x; then
40194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40196        fi
40197        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40198      fi
40199    fi
40200
40201    # Now join together the path and the arguments once again
40202    if test "x$arguments" != xEOL; then
40203      new_complete="$new_path ${arguments% *}"
40204    else
40205      new_complete="$new_path"
40206    fi
40207
40208    if test "x$complete" != "x$new_complete"; then
40209      STRIP="$new_complete"
40210      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40211$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40212    fi
40213  fi
40214
40215    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40216
40217
40218  # Publish this variable in the help.
40219
40220
40221  if [ -z "${NM+x}" ]; then
40222    # The variable is not set by user, try to locate tool using the code snippet
40223    if test -n "$ac_tool_prefix"; then
40224  for ac_prog in nm gcc-nm
40225  do
40226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40229$as_echo_n "checking for $ac_word... " >&6; }
40230if ${ac_cv_prog_NM+:} false; then :
40231  $as_echo_n "(cached) " >&6
40232else
40233  if test -n "$NM"; then
40234  ac_cv_prog_NM="$NM" # Let the user override the test.
40235else
40236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40237for as_dir in $PATH
40238do
40239  IFS=$as_save_IFS
40240  test -z "$as_dir" && as_dir=.
40241    for ac_exec_ext in '' $ac_executable_extensions; do
40242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40243    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40245    break 2
40246  fi
40247done
40248  done
40249IFS=$as_save_IFS
40250
40251fi
40252fi
40253NM=$ac_cv_prog_NM
40254if test -n "$NM"; then
40255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40256$as_echo "$NM" >&6; }
40257else
40258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40259$as_echo "no" >&6; }
40260fi
40261
40262
40263    test -n "$NM" && break
40264  done
40265fi
40266if test -z "$NM"; then
40267  ac_ct_NM=$NM
40268  for ac_prog in nm gcc-nm
40269do
40270  # Extract the first word of "$ac_prog", so it can be a program name with args.
40271set dummy $ac_prog; ac_word=$2
40272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40273$as_echo_n "checking for $ac_word... " >&6; }
40274if ${ac_cv_prog_ac_ct_NM+:} false; then :
40275  $as_echo_n "(cached) " >&6
40276else
40277  if test -n "$ac_ct_NM"; then
40278  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40279else
40280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40281for as_dir in $PATH
40282do
40283  IFS=$as_save_IFS
40284  test -z "$as_dir" && as_dir=.
40285    for ac_exec_ext in '' $ac_executable_extensions; do
40286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40287    ac_cv_prog_ac_ct_NM="$ac_prog"
40288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40289    break 2
40290  fi
40291done
40292  done
40293IFS=$as_save_IFS
40294
40295fi
40296fi
40297ac_ct_NM=$ac_cv_prog_ac_ct_NM
40298if test -n "$ac_ct_NM"; then
40299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40300$as_echo "$ac_ct_NM" >&6; }
40301else
40302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40303$as_echo "no" >&6; }
40304fi
40305
40306
40307  test -n "$ac_ct_NM" && break
40308done
40309
40310  if test "x$ac_ct_NM" = x; then
40311    NM=""
40312  else
40313    case $cross_compiling:$ac_tool_warned in
40314yes:)
40315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40317ac_tool_warned=yes ;;
40318esac
40319    NM=$ac_ct_NM
40320  fi
40321fi
40322
40323  else
40324    # The variable is set, but is it from the command line or the environment?
40325
40326    # Try to remove the string !NM! from our list.
40327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40329      # If it failed, the variable was not from the command line. Ignore it,
40330      # but warn the user (except for BASH, which is always set by the calling BASH).
40331      if test "xNM" != xBASH; then
40332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40333$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40334      fi
40335      # Try to locate tool using the code snippet
40336      if test -n "$ac_tool_prefix"; then
40337  for ac_prog in nm gcc-nm
40338  do
40339    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40340set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40342$as_echo_n "checking for $ac_word... " >&6; }
40343if ${ac_cv_prog_NM+:} false; then :
40344  $as_echo_n "(cached) " >&6
40345else
40346  if test -n "$NM"; then
40347  ac_cv_prog_NM="$NM" # Let the user override the test.
40348else
40349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40350for as_dir in $PATH
40351do
40352  IFS=$as_save_IFS
40353  test -z "$as_dir" && as_dir=.
40354    for ac_exec_ext in '' $ac_executable_extensions; do
40355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40356    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40358    break 2
40359  fi
40360done
40361  done
40362IFS=$as_save_IFS
40363
40364fi
40365fi
40366NM=$ac_cv_prog_NM
40367if test -n "$NM"; then
40368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40369$as_echo "$NM" >&6; }
40370else
40371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40372$as_echo "no" >&6; }
40373fi
40374
40375
40376    test -n "$NM" && break
40377  done
40378fi
40379if test -z "$NM"; then
40380  ac_ct_NM=$NM
40381  for ac_prog in nm gcc-nm
40382do
40383  # Extract the first word of "$ac_prog", so it can be a program name with args.
40384set dummy $ac_prog; ac_word=$2
40385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40386$as_echo_n "checking for $ac_word... " >&6; }
40387if ${ac_cv_prog_ac_ct_NM+:} false; then :
40388  $as_echo_n "(cached) " >&6
40389else
40390  if test -n "$ac_ct_NM"; then
40391  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40392else
40393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40394for as_dir in $PATH
40395do
40396  IFS=$as_save_IFS
40397  test -z "$as_dir" && as_dir=.
40398    for ac_exec_ext in '' $ac_executable_extensions; do
40399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40400    ac_cv_prog_ac_ct_NM="$ac_prog"
40401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40402    break 2
40403  fi
40404done
40405  done
40406IFS=$as_save_IFS
40407
40408fi
40409fi
40410ac_ct_NM=$ac_cv_prog_ac_ct_NM
40411if test -n "$ac_ct_NM"; then
40412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40413$as_echo "$ac_ct_NM" >&6; }
40414else
40415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40416$as_echo "no" >&6; }
40417fi
40418
40419
40420  test -n "$ac_ct_NM" && break
40421done
40422
40423  if test "x$ac_ct_NM" = x; then
40424    NM=""
40425  else
40426    case $cross_compiling:$ac_tool_warned in
40427yes:)
40428{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40429$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40430ac_tool_warned=yes ;;
40431esac
40432    NM=$ac_ct_NM
40433  fi
40434fi
40435
40436    else
40437      # If it succeeded, then it was overridden by the user. We will use it
40438      # for the tool.
40439
40440      # First remove it from the list of overridden variables, so we can test
40441      # for unknown variables in the end.
40442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40443
40444      # Check if we try to supply an empty value
40445      if test "x$NM" = x; then
40446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40447$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40449$as_echo_n "checking for NM... " >&6; }
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40451$as_echo "disabled" >&6; }
40452      else
40453        # Check if the provided tool contains a complete path.
40454        tool_specified="$NM"
40455        tool_basename="${tool_specified##*/}"
40456        if test "x$tool_basename" = "x$tool_specified"; then
40457          # A command without a complete path is provided, search $PATH.
40458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40459$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40460          # Extract the first word of "$tool_basename", so it can be a program name with args.
40461set dummy $tool_basename; ac_word=$2
40462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40463$as_echo_n "checking for $ac_word... " >&6; }
40464if ${ac_cv_path_NM+:} false; then :
40465  $as_echo_n "(cached) " >&6
40466else
40467  case $NM in
40468  [\\/]* | ?:[\\/]*)
40469  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40470  ;;
40471  *)
40472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40473for as_dir in $PATH
40474do
40475  IFS=$as_save_IFS
40476  test -z "$as_dir" && as_dir=.
40477    for ac_exec_ext in '' $ac_executable_extensions; do
40478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40479    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40481    break 2
40482  fi
40483done
40484  done
40485IFS=$as_save_IFS
40486
40487  ;;
40488esac
40489fi
40490NM=$ac_cv_path_NM
40491if test -n "$NM"; then
40492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40493$as_echo "$NM" >&6; }
40494else
40495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40496$as_echo "no" >&6; }
40497fi
40498
40499
40500          if test "x$NM" = x; then
40501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40502          fi
40503        else
40504          # Otherwise we believe it is a complete path. Use it as it is.
40505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40506$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40508$as_echo_n "checking for NM... " >&6; }
40509          if test ! -x "$tool_specified"; then
40510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40511$as_echo "not found" >&6; }
40512            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40513          fi
40514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40515$as_echo "$tool_specified" >&6; }
40516        fi
40517      fi
40518    fi
40519
40520  fi
40521
40522
40523    else
40524
40525
40526  # Publish this variable in the help.
40527
40528
40529  if [ -z "${NM+x}" ]; then
40530    # The variable is not set by user, try to locate tool using the code snippet
40531    if test -n "$ac_tool_prefix"; then
40532  for ac_prog in nm
40533  do
40534    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40535set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40537$as_echo_n "checking for $ac_word... " >&6; }
40538if ${ac_cv_prog_NM+:} false; then :
40539  $as_echo_n "(cached) " >&6
40540else
40541  if test -n "$NM"; then
40542  ac_cv_prog_NM="$NM" # Let the user override the test.
40543else
40544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40545for as_dir in $PATH
40546do
40547  IFS=$as_save_IFS
40548  test -z "$as_dir" && as_dir=.
40549    for ac_exec_ext in '' $ac_executable_extensions; do
40550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40551    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40553    break 2
40554  fi
40555done
40556  done
40557IFS=$as_save_IFS
40558
40559fi
40560fi
40561NM=$ac_cv_prog_NM
40562if test -n "$NM"; then
40563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40564$as_echo "$NM" >&6; }
40565else
40566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40567$as_echo "no" >&6; }
40568fi
40569
40570
40571    test -n "$NM" && break
40572  done
40573fi
40574if test -z "$NM"; then
40575  ac_ct_NM=$NM
40576  for ac_prog in nm
40577do
40578  # Extract the first word of "$ac_prog", so it can be a program name with args.
40579set dummy $ac_prog; ac_word=$2
40580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40581$as_echo_n "checking for $ac_word... " >&6; }
40582if ${ac_cv_prog_ac_ct_NM+:} false; then :
40583  $as_echo_n "(cached) " >&6
40584else
40585  if test -n "$ac_ct_NM"; then
40586  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40587else
40588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40589for as_dir in $PATH
40590do
40591  IFS=$as_save_IFS
40592  test -z "$as_dir" && as_dir=.
40593    for ac_exec_ext in '' $ac_executable_extensions; do
40594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40595    ac_cv_prog_ac_ct_NM="$ac_prog"
40596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40597    break 2
40598  fi
40599done
40600  done
40601IFS=$as_save_IFS
40602
40603fi
40604fi
40605ac_ct_NM=$ac_cv_prog_ac_ct_NM
40606if test -n "$ac_ct_NM"; then
40607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40608$as_echo "$ac_ct_NM" >&6; }
40609else
40610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40611$as_echo "no" >&6; }
40612fi
40613
40614
40615  test -n "$ac_ct_NM" && break
40616done
40617
40618  if test "x$ac_ct_NM" = x; then
40619    NM=""
40620  else
40621    case $cross_compiling:$ac_tool_warned in
40622yes:)
40623{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40624$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40625ac_tool_warned=yes ;;
40626esac
40627    NM=$ac_ct_NM
40628  fi
40629fi
40630
40631  else
40632    # The variable is set, but is it from the command line or the environment?
40633
40634    # Try to remove the string !NM! from our list.
40635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40637      # If it failed, the variable was not from the command line. Ignore it,
40638      # but warn the user (except for BASH, which is always set by the calling BASH).
40639      if test "xNM" != xBASH; then
40640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40641$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40642      fi
40643      # Try to locate tool using the code snippet
40644      if test -n "$ac_tool_prefix"; then
40645  for ac_prog in nm
40646  do
40647    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40648set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40650$as_echo_n "checking for $ac_word... " >&6; }
40651if ${ac_cv_prog_NM+:} false; then :
40652  $as_echo_n "(cached) " >&6
40653else
40654  if test -n "$NM"; then
40655  ac_cv_prog_NM="$NM" # Let the user override the test.
40656else
40657as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40658for as_dir in $PATH
40659do
40660  IFS=$as_save_IFS
40661  test -z "$as_dir" && as_dir=.
40662    for ac_exec_ext in '' $ac_executable_extensions; do
40663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40664    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40666    break 2
40667  fi
40668done
40669  done
40670IFS=$as_save_IFS
40671
40672fi
40673fi
40674NM=$ac_cv_prog_NM
40675if test -n "$NM"; then
40676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40677$as_echo "$NM" >&6; }
40678else
40679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40680$as_echo "no" >&6; }
40681fi
40682
40683
40684    test -n "$NM" && break
40685  done
40686fi
40687if test -z "$NM"; then
40688  ac_ct_NM=$NM
40689  for ac_prog in nm
40690do
40691  # Extract the first word of "$ac_prog", so it can be a program name with args.
40692set dummy $ac_prog; ac_word=$2
40693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40694$as_echo_n "checking for $ac_word... " >&6; }
40695if ${ac_cv_prog_ac_ct_NM+:} false; then :
40696  $as_echo_n "(cached) " >&6
40697else
40698  if test -n "$ac_ct_NM"; then
40699  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40700else
40701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40702for as_dir in $PATH
40703do
40704  IFS=$as_save_IFS
40705  test -z "$as_dir" && as_dir=.
40706    for ac_exec_ext in '' $ac_executable_extensions; do
40707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40708    ac_cv_prog_ac_ct_NM="$ac_prog"
40709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40710    break 2
40711  fi
40712done
40713  done
40714IFS=$as_save_IFS
40715
40716fi
40717fi
40718ac_ct_NM=$ac_cv_prog_ac_ct_NM
40719if test -n "$ac_ct_NM"; then
40720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40721$as_echo "$ac_ct_NM" >&6; }
40722else
40723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40724$as_echo "no" >&6; }
40725fi
40726
40727
40728  test -n "$ac_ct_NM" && break
40729done
40730
40731  if test "x$ac_ct_NM" = x; then
40732    NM=""
40733  else
40734    case $cross_compiling:$ac_tool_warned in
40735yes:)
40736{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40737$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40738ac_tool_warned=yes ;;
40739esac
40740    NM=$ac_ct_NM
40741  fi
40742fi
40743
40744    else
40745      # If it succeeded, then it was overridden by the user. We will use it
40746      # for the tool.
40747
40748      # First remove it from the list of overridden variables, so we can test
40749      # for unknown variables in the end.
40750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40751
40752      # Check if we try to supply an empty value
40753      if test "x$NM" = x; then
40754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40755$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40757$as_echo_n "checking for NM... " >&6; }
40758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40759$as_echo "disabled" >&6; }
40760      else
40761        # Check if the provided tool contains a complete path.
40762        tool_specified="$NM"
40763        tool_basename="${tool_specified##*/}"
40764        if test "x$tool_basename" = "x$tool_specified"; then
40765          # A command without a complete path is provided, search $PATH.
40766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40767$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40768          # Extract the first word of "$tool_basename", so it can be a program name with args.
40769set dummy $tool_basename; ac_word=$2
40770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40771$as_echo_n "checking for $ac_word... " >&6; }
40772if ${ac_cv_path_NM+:} false; then :
40773  $as_echo_n "(cached) " >&6
40774else
40775  case $NM in
40776  [\\/]* | ?:[\\/]*)
40777  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40778  ;;
40779  *)
40780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40781for as_dir in $PATH
40782do
40783  IFS=$as_save_IFS
40784  test -z "$as_dir" && as_dir=.
40785    for ac_exec_ext in '' $ac_executable_extensions; do
40786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40787    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40789    break 2
40790  fi
40791done
40792  done
40793IFS=$as_save_IFS
40794
40795  ;;
40796esac
40797fi
40798NM=$ac_cv_path_NM
40799if test -n "$NM"; then
40800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40801$as_echo "$NM" >&6; }
40802else
40803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40804$as_echo "no" >&6; }
40805fi
40806
40807
40808          if test "x$NM" = x; then
40809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40810          fi
40811        else
40812          # Otherwise we believe it is a complete path. Use it as it is.
40813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40814$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40816$as_echo_n "checking for NM... " >&6; }
40817          if test ! -x "$tool_specified"; then
40818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40819$as_echo "not found" >&6; }
40820            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40821          fi
40822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40823$as_echo "$tool_specified" >&6; }
40824        fi
40825      fi
40826    fi
40827
40828  fi
40829
40830
40831    fi
40832
40833  # Only process if variable expands to non-empty
40834
40835  if test "x$NM" != x; then
40836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40837
40838  # First separate the path from the arguments. This will split at the first
40839  # space.
40840  complete="$NM"
40841  path="${complete%% *}"
40842  tmp="$complete EOL"
40843  arguments="${tmp#* }"
40844
40845  # Input might be given as Windows format, start by converting to
40846  # unix format.
40847  new_path=`$CYGPATH -u "$path"`
40848
40849  # Now try to locate executable using which
40850  new_path=`$WHICH "$new_path" 2> /dev/null`
40851  # bat and cmd files are not always considered executable in cygwin causing which
40852  # to not find them
40853  if test "x$new_path" = x \
40854      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40855      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40856    new_path=`$CYGPATH -u "$path"`
40857  fi
40858  if test "x$new_path" = x; then
40859    # Oops. Which didn't find the executable.
40860    # The splitting of arguments from the executable at a space might have been incorrect,
40861    # since paths with space are more likely in Windows. Give it another try with the whole
40862    # argument.
40863    path="$complete"
40864    arguments="EOL"
40865    new_path=`$CYGPATH -u "$path"`
40866    new_path=`$WHICH "$new_path" 2> /dev/null`
40867    # bat and cmd files are not always considered executable in cygwin causing which
40868    # to not find them
40869    if test "x$new_path" = x \
40870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40872      new_path=`$CYGPATH -u "$path"`
40873    fi
40874    if test "x$new_path" = x; then
40875      # It's still not found. Now this is an unrecoverable error.
40876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40877$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40878      has_space=`$ECHO "$complete" | $GREP " "`
40879      if test "x$has_space" != x; then
40880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40882      fi
40883      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40884    fi
40885  fi
40886
40887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40890  # "foo.exe" is OK but "foo" is an error.
40891  #
40892  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40893  # It is also a way to make sure we got the proper file name for the real test later on.
40894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40895  if test "x$test_shortpath" = x; then
40896    # Short path failed, file does not exist as specified.
40897    # Try adding .exe or .cmd
40898    if test -f "${new_path}.exe"; then
40899      input_to_shortpath="${new_path}.exe"
40900    elif test -f "${new_path}.cmd"; then
40901      input_to_shortpath="${new_path}.cmd"
40902    else
40903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40904$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40905      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40906$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40907      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40908    fi
40909  else
40910    input_to_shortpath="$new_path"
40911  fi
40912
40913  # Call helper function which possibly converts this using DOS-style short mode.
40914  # If so, the updated path is stored in $new_path.
40915  new_path="$input_to_shortpath"
40916
40917  input_path="$input_to_shortpath"
40918  # Check if we need to convert this using DOS-style short mode. If the path
40919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40920  # take no chances and rewrite it.
40921  # Note: m4 eats our [], so we need to use [ and ] instead.
40922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40923  if test "x$has_forbidden_chars" != x; then
40924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40928      # Going to short mode and back again did indeed matter. Since short mode is
40929      # case insensitive, let's make it lowercase to improve readability.
40930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40931      # Now convert it back to Unix-style (cygpath)
40932      input_path=`$CYGPATH -u "$shortmode_path"`
40933      new_path="$input_path"
40934    fi
40935  fi
40936
40937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40938  if test "x$test_cygdrive_prefix" = x; then
40939    # As a simple fix, exclude /usr/bin since it's not a real path.
40940    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40942      # a path prefixed by /cygdrive for fixpath to work.
40943      new_path="$CYGWIN_ROOT_PATH$input_path"
40944    fi
40945  fi
40946
40947  # remove trailing .exe if any
40948  new_path="${new_path/%.exe/}"
40949
40950    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951
40952  # First separate the path from the arguments. This will split at the first
40953  # space.
40954  complete="$NM"
40955  path="${complete%% *}"
40956  tmp="$complete EOL"
40957  arguments="${tmp#* }"
40958
40959  # Input might be given as Windows format, start by converting to
40960  # unix format.
40961  new_path="$path"
40962
40963  windows_path="$new_path"
40964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40965    unix_path=`$CYGPATH -u "$windows_path"`
40966    new_path="$unix_path"
40967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40969    new_path="$unix_path"
40970  fi
40971
40972
40973  # Now try to locate executable using which
40974  new_path=`$WHICH "$new_path" 2> /dev/null`
40975
40976  if test "x$new_path" = x; then
40977    # Oops. Which didn't find the executable.
40978    # The splitting of arguments from the executable at a space might have been incorrect,
40979    # since paths with space are more likely in Windows. Give it another try with the whole
40980    # argument.
40981    path="$complete"
40982    arguments="EOL"
40983    new_path="$path"
40984
40985  windows_path="$new_path"
40986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40987    unix_path=`$CYGPATH -u "$windows_path"`
40988    new_path="$unix_path"
40989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40991    new_path="$unix_path"
40992  fi
40993
40994
40995    new_path=`$WHICH "$new_path" 2> /dev/null`
40996    # bat and cmd files are not always considered executable in MSYS causing which
40997    # to not find them
40998    if test "x$new_path" = x \
40999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41001      new_path="$path"
41002
41003  windows_path="$new_path"
41004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41005    unix_path=`$CYGPATH -u "$windows_path"`
41006    new_path="$unix_path"
41007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41009    new_path="$unix_path"
41010  fi
41011
41012    fi
41013
41014    if test "x$new_path" = x; then
41015      # It's still not found. Now this is an unrecoverable error.
41016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41017$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41018      has_space=`$ECHO "$complete" | $GREP " "`
41019      if test "x$has_space" != x; then
41020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41022      fi
41023      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41024    fi
41025  fi
41026
41027  # Now new_path has a complete unix path to the binary
41028  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41029    # Keep paths in /bin as-is, but remove trailing .exe if any
41030    new_path="${new_path/%.exe/}"
41031    # Do not save /bin paths to all_fixpath_prefixes!
41032  else
41033    # Not in mixed or Windows style, start by that.
41034    new_path=`cmd //c echo $new_path`
41035
41036  input_path="$new_path"
41037  # Check if we need to convert this using DOS-style short mode. If the path
41038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41039  # take no chances and rewrite it.
41040  # Note: m4 eats our [], so we need to use [ and ] instead.
41041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41042  if test "x$has_forbidden_chars" != x; then
41043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41045  fi
41046
41047    # Output is in $new_path
41048
41049  windows_path="$new_path"
41050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41051    unix_path=`$CYGPATH -u "$windows_path"`
41052    new_path="$unix_path"
41053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41055    new_path="$unix_path"
41056  fi
41057
41058    # remove trailing .exe if any
41059    new_path="${new_path/%.exe/}"
41060
41061    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41062    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41063  fi
41064
41065    else
41066      # We're on a unix platform. Hooray! :)
41067      # First separate the path from the arguments. This will split at the first
41068      # space.
41069      complete="$NM"
41070      path="${complete%% *}"
41071      tmp="$complete EOL"
41072      arguments="${tmp#* }"
41073
41074      # Cannot rely on the command "which" here since it doesn't always work.
41075      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41076      if test -z "$is_absolute_path"; then
41077        # Path to executable is not absolute. Find it.
41078        IFS_save="$IFS"
41079        IFS=:
41080        for p in $PATH; do
41081          if test -f "$p/$path" && test -x "$p/$path"; then
41082            new_path="$p/$path"
41083            break
41084          fi
41085        done
41086        IFS="$IFS_save"
41087      else
41088        # This is an absolute path, we can use it without further modifications.
41089        new_path="$path"
41090      fi
41091
41092      if test "x$new_path" = x; then
41093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41094$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41095        has_space=`$ECHO "$complete" | $GREP " "`
41096        if test "x$has_space" != x; then
41097          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41098$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41099        fi
41100        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41101      fi
41102    fi
41103
41104    # Now join together the path and the arguments once again
41105    if test "x$arguments" != xEOL; then
41106      new_complete="$new_path ${arguments% *}"
41107    else
41108      new_complete="$new_path"
41109    fi
41110
41111    if test "x$complete" != "x$new_complete"; then
41112      NM="$new_complete"
41113      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41114$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41115    fi
41116  fi
41117
41118    GNM="$NM"
41119
41120  fi
41121
41122  # objcopy is used for moving debug symbols to separate files when
41123  # full debug symbols are enabled.
41124  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41125
41126
41127  # Publish this variable in the help.
41128
41129
41130  if [ -z "${OBJCOPY+x}" ]; then
41131    # The variable is not set by user, try to locate tool using the code snippet
41132    if test -n "$ac_tool_prefix"; then
41133  for ac_prog in gobjcopy objcopy
41134  do
41135    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41138$as_echo_n "checking for $ac_word... " >&6; }
41139if ${ac_cv_prog_OBJCOPY+:} false; then :
41140  $as_echo_n "(cached) " >&6
41141else
41142  if test -n "$OBJCOPY"; then
41143  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41144else
41145as_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_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
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
41160fi
41161fi
41162OBJCOPY=$ac_cv_prog_OBJCOPY
41163if test -n "$OBJCOPY"; then
41164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41165$as_echo "$OBJCOPY" >&6; }
41166else
41167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41168$as_echo "no" >&6; }
41169fi
41170
41171
41172    test -n "$OBJCOPY" && break
41173  done
41174fi
41175if test -z "$OBJCOPY"; then
41176  ac_ct_OBJCOPY=$OBJCOPY
41177  for ac_prog in gobjcopy objcopy
41178do
41179  # Extract the first word of "$ac_prog", so it can be a program name with args.
41180set dummy $ac_prog; ac_word=$2
41181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41182$as_echo_n "checking for $ac_word... " >&6; }
41183if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41184  $as_echo_n "(cached) " >&6
41185else
41186  if test -n "$ac_ct_OBJCOPY"; then
41187  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41188else
41189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41190for as_dir in $PATH
41191do
41192  IFS=$as_save_IFS
41193  test -z "$as_dir" && as_dir=.
41194    for ac_exec_ext in '' $ac_executable_extensions; do
41195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41196    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41198    break 2
41199  fi
41200done
41201  done
41202IFS=$as_save_IFS
41203
41204fi
41205fi
41206ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41207if test -n "$ac_ct_OBJCOPY"; then
41208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41209$as_echo "$ac_ct_OBJCOPY" >&6; }
41210else
41211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41212$as_echo "no" >&6; }
41213fi
41214
41215
41216  test -n "$ac_ct_OBJCOPY" && break
41217done
41218
41219  if test "x$ac_ct_OBJCOPY" = x; then
41220    OBJCOPY=""
41221  else
41222    case $cross_compiling:$ac_tool_warned in
41223yes:)
41224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41226ac_tool_warned=yes ;;
41227esac
41228    OBJCOPY=$ac_ct_OBJCOPY
41229  fi
41230fi
41231
41232  else
41233    # The variable is set, but is it from the command line or the environment?
41234
41235    # Try to remove the string !OBJCOPY! from our list.
41236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41238      # If it failed, the variable was not from the command line. Ignore it,
41239      # but warn the user (except for BASH, which is always set by the calling BASH).
41240      if test "xOBJCOPY" != xBASH; then
41241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41242$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41243      fi
41244      # Try to locate tool using the code snippet
41245      if test -n "$ac_tool_prefix"; then
41246  for ac_prog in gobjcopy objcopy
41247  do
41248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41251$as_echo_n "checking for $ac_word... " >&6; }
41252if ${ac_cv_prog_OBJCOPY+:} false; then :
41253  $as_echo_n "(cached) " >&6
41254else
41255  if test -n "$OBJCOPY"; then
41256  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41257else
41258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41259for as_dir in $PATH
41260do
41261  IFS=$as_save_IFS
41262  test -z "$as_dir" && as_dir=.
41263    for ac_exec_ext in '' $ac_executable_extensions; do
41264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41265    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41267    break 2
41268  fi
41269done
41270  done
41271IFS=$as_save_IFS
41272
41273fi
41274fi
41275OBJCOPY=$ac_cv_prog_OBJCOPY
41276if test -n "$OBJCOPY"; then
41277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41278$as_echo "$OBJCOPY" >&6; }
41279else
41280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41281$as_echo "no" >&6; }
41282fi
41283
41284
41285    test -n "$OBJCOPY" && break
41286  done
41287fi
41288if test -z "$OBJCOPY"; then
41289  ac_ct_OBJCOPY=$OBJCOPY
41290  for ac_prog in gobjcopy objcopy
41291do
41292  # Extract the first word of "$ac_prog", so it can be a program name with args.
41293set dummy $ac_prog; ac_word=$2
41294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41295$as_echo_n "checking for $ac_word... " >&6; }
41296if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41297  $as_echo_n "(cached) " >&6
41298else
41299  if test -n "$ac_ct_OBJCOPY"; then
41300  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41301else
41302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41303for as_dir in $PATH
41304do
41305  IFS=$as_save_IFS
41306  test -z "$as_dir" && as_dir=.
41307    for ac_exec_ext in '' $ac_executable_extensions; do
41308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41309    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41311    break 2
41312  fi
41313done
41314  done
41315IFS=$as_save_IFS
41316
41317fi
41318fi
41319ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41320if test -n "$ac_ct_OBJCOPY"; then
41321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41322$as_echo "$ac_ct_OBJCOPY" >&6; }
41323else
41324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41325$as_echo "no" >&6; }
41326fi
41327
41328
41329  test -n "$ac_ct_OBJCOPY" && break
41330done
41331
41332  if test "x$ac_ct_OBJCOPY" = x; then
41333    OBJCOPY=""
41334  else
41335    case $cross_compiling:$ac_tool_warned in
41336yes:)
41337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41339ac_tool_warned=yes ;;
41340esac
41341    OBJCOPY=$ac_ct_OBJCOPY
41342  fi
41343fi
41344
41345    else
41346      # If it succeeded, then it was overridden by the user. We will use it
41347      # for the tool.
41348
41349      # First remove it from the list of overridden variables, so we can test
41350      # for unknown variables in the end.
41351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41352
41353      # Check if we try to supply an empty value
41354      if test "x$OBJCOPY" = x; then
41355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41356$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41358$as_echo_n "checking for OBJCOPY... " >&6; }
41359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41360$as_echo "disabled" >&6; }
41361      else
41362        # Check if the provided tool contains a complete path.
41363        tool_specified="$OBJCOPY"
41364        tool_basename="${tool_specified##*/}"
41365        if test "x$tool_basename" = "x$tool_specified"; then
41366          # A command without a complete path is provided, search $PATH.
41367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41368$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41369          # Extract the first word of "$tool_basename", so it can be a program name with args.
41370set dummy $tool_basename; ac_word=$2
41371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41372$as_echo_n "checking for $ac_word... " >&6; }
41373if ${ac_cv_path_OBJCOPY+:} false; then :
41374  $as_echo_n "(cached) " >&6
41375else
41376  case $OBJCOPY in
41377  [\\/]* | ?:[\\/]*)
41378  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
41379  ;;
41380  *)
41381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41382for as_dir in $PATH
41383do
41384  IFS=$as_save_IFS
41385  test -z "$as_dir" && as_dir=.
41386    for ac_exec_ext in '' $ac_executable_extensions; do
41387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41388    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
41389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41390    break 2
41391  fi
41392done
41393  done
41394IFS=$as_save_IFS
41395
41396  ;;
41397esac
41398fi
41399OBJCOPY=$ac_cv_path_OBJCOPY
41400if test -n "$OBJCOPY"; then
41401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41402$as_echo "$OBJCOPY" >&6; }
41403else
41404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41405$as_echo "no" >&6; }
41406fi
41407
41408
41409          if test "x$OBJCOPY" = x; then
41410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41411          fi
41412        else
41413          # Otherwise we believe it is a complete path. Use it as it is.
41414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
41415$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
41416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41417$as_echo_n "checking for OBJCOPY... " >&6; }
41418          if test ! -x "$tool_specified"; then
41419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41420$as_echo "not found" >&6; }
41421            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
41422          fi
41423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41424$as_echo "$tool_specified" >&6; }
41425        fi
41426      fi
41427    fi
41428
41429  fi
41430
41431
41432    # Only call fixup if objcopy was found.
41433    if test -n "$OBJCOPY"; then
41434
41435  # Only process if variable expands to non-empty
41436
41437  if test "x$OBJCOPY" != x; then
41438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41439
41440  # First separate the path from the arguments. This will split at the first
41441  # space.
41442  complete="$OBJCOPY"
41443  path="${complete%% *}"
41444  tmp="$complete EOL"
41445  arguments="${tmp#* }"
41446
41447  # Input might be given as Windows format, start by converting to
41448  # unix format.
41449  new_path=`$CYGPATH -u "$path"`
41450
41451  # Now try to locate executable using which
41452  new_path=`$WHICH "$new_path" 2> /dev/null`
41453  # bat and cmd files are not always considered executable in cygwin causing which
41454  # to not find them
41455  if test "x$new_path" = x \
41456      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41457      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41458    new_path=`$CYGPATH -u "$path"`
41459  fi
41460  if test "x$new_path" = x; then
41461    # Oops. Which didn't find the executable.
41462    # The splitting of arguments from the executable at a space might have been incorrect,
41463    # since paths with space are more likely in Windows. Give it another try with the whole
41464    # argument.
41465    path="$complete"
41466    arguments="EOL"
41467    new_path=`$CYGPATH -u "$path"`
41468    new_path=`$WHICH "$new_path" 2> /dev/null`
41469    # bat and cmd files are not always considered executable in cygwin causing which
41470    # to not find them
41471    if test "x$new_path" = x \
41472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41474      new_path=`$CYGPATH -u "$path"`
41475    fi
41476    if test "x$new_path" = x; then
41477      # It's still not found. Now this is an unrecoverable error.
41478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41479$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41480      has_space=`$ECHO "$complete" | $GREP " "`
41481      if test "x$has_space" != x; then
41482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41484      fi
41485      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41486    fi
41487  fi
41488
41489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41492  # "foo.exe" is OK but "foo" is an error.
41493  #
41494  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41495  # It is also a way to make sure we got the proper file name for the real test later on.
41496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41497  if test "x$test_shortpath" = x; then
41498    # Short path failed, file does not exist as specified.
41499    # Try adding .exe or .cmd
41500    if test -f "${new_path}.exe"; then
41501      input_to_shortpath="${new_path}.exe"
41502    elif test -f "${new_path}.cmd"; then
41503      input_to_shortpath="${new_path}.cmd"
41504    else
41505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
41506$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
41507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41509      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41510    fi
41511  else
41512    input_to_shortpath="$new_path"
41513  fi
41514
41515  # Call helper function which possibly converts this using DOS-style short mode.
41516  # If so, the updated path is stored in $new_path.
41517  new_path="$input_to_shortpath"
41518
41519  input_path="$input_to_shortpath"
41520  # Check if we need to convert this using DOS-style short mode. If the path
41521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41522  # take no chances and rewrite it.
41523  # Note: m4 eats our [], so we need to use [ and ] instead.
41524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41525  if test "x$has_forbidden_chars" != x; then
41526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41530      # Going to short mode and back again did indeed matter. Since short mode is
41531      # case insensitive, let's make it lowercase to improve readability.
41532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41533      # Now convert it back to Unix-style (cygpath)
41534      input_path=`$CYGPATH -u "$shortmode_path"`
41535      new_path="$input_path"
41536    fi
41537  fi
41538
41539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41540  if test "x$test_cygdrive_prefix" = x; then
41541    # As a simple fix, exclude /usr/bin since it's not a real path.
41542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41544      # a path prefixed by /cygdrive for fixpath to work.
41545      new_path="$CYGWIN_ROOT_PATH$input_path"
41546    fi
41547  fi
41548
41549  # remove trailing .exe if any
41550  new_path="${new_path/%.exe/}"
41551
41552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41553
41554  # First separate the path from the arguments. This will split at the first
41555  # space.
41556  complete="$OBJCOPY"
41557  path="${complete%% *}"
41558  tmp="$complete EOL"
41559  arguments="${tmp#* }"
41560
41561  # Input might be given as Windows format, start by converting to
41562  # unix format.
41563  new_path="$path"
41564
41565  windows_path="$new_path"
41566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41567    unix_path=`$CYGPATH -u "$windows_path"`
41568    new_path="$unix_path"
41569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41571    new_path="$unix_path"
41572  fi
41573
41574
41575  # Now try to locate executable using which
41576  new_path=`$WHICH "$new_path" 2> /dev/null`
41577
41578  if test "x$new_path" = x; then
41579    # Oops. Which didn't find the executable.
41580    # The splitting of arguments from the executable at a space might have been incorrect,
41581    # since paths with space are more likely in Windows. Give it another try with the whole
41582    # argument.
41583    path="$complete"
41584    arguments="EOL"
41585    new_path="$path"
41586
41587  windows_path="$new_path"
41588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41589    unix_path=`$CYGPATH -u "$windows_path"`
41590    new_path="$unix_path"
41591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41593    new_path="$unix_path"
41594  fi
41595
41596
41597    new_path=`$WHICH "$new_path" 2> /dev/null`
41598    # bat and cmd files are not always considered executable in MSYS causing which
41599    # to not find them
41600    if test "x$new_path" = x \
41601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41603      new_path="$path"
41604
41605  windows_path="$new_path"
41606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41607    unix_path=`$CYGPATH -u "$windows_path"`
41608    new_path="$unix_path"
41609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41611    new_path="$unix_path"
41612  fi
41613
41614    fi
41615
41616    if test "x$new_path" = x; then
41617      # It's still not found. Now this is an unrecoverable error.
41618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41619$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41620      has_space=`$ECHO "$complete" | $GREP " "`
41621      if test "x$has_space" != x; then
41622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41624      fi
41625      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41626    fi
41627  fi
41628
41629  # Now new_path has a complete unix path to the binary
41630  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41631    # Keep paths in /bin as-is, but remove trailing .exe if any
41632    new_path="${new_path/%.exe/}"
41633    # Do not save /bin paths to all_fixpath_prefixes!
41634  else
41635    # Not in mixed or Windows style, start by that.
41636    new_path=`cmd //c echo $new_path`
41637
41638  input_path="$new_path"
41639  # Check if we need to convert this using DOS-style short mode. If the path
41640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41641  # take no chances and rewrite it.
41642  # Note: m4 eats our [], so we need to use [ and ] instead.
41643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41644  if test "x$has_forbidden_chars" != x; then
41645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41647  fi
41648
41649    # Output is in $new_path
41650
41651  windows_path="$new_path"
41652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41653    unix_path=`$CYGPATH -u "$windows_path"`
41654    new_path="$unix_path"
41655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41657    new_path="$unix_path"
41658  fi
41659
41660    # remove trailing .exe if any
41661    new_path="${new_path/%.exe/}"
41662
41663    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41664    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41665  fi
41666
41667    else
41668      # We're on a unix platform. Hooray! :)
41669      # First separate the path from the arguments. This will split at the first
41670      # space.
41671      complete="$OBJCOPY"
41672      path="${complete%% *}"
41673      tmp="$complete EOL"
41674      arguments="${tmp#* }"
41675
41676      # Cannot rely on the command "which" here since it doesn't always work.
41677      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41678      if test -z "$is_absolute_path"; then
41679        # Path to executable is not absolute. Find it.
41680        IFS_save="$IFS"
41681        IFS=:
41682        for p in $PATH; do
41683          if test -f "$p/$path" && test -x "$p/$path"; then
41684            new_path="$p/$path"
41685            break
41686          fi
41687        done
41688        IFS="$IFS_save"
41689      else
41690        # This is an absolute path, we can use it without further modifications.
41691        new_path="$path"
41692      fi
41693
41694      if test "x$new_path" = x; then
41695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
41696$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
41697        has_space=`$ECHO "$complete" | $GREP " "`
41698        if test "x$has_space" != x; then
41699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41701        fi
41702        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
41703      fi
41704    fi
41705
41706    # Now join together the path and the arguments once again
41707    if test "x$arguments" != xEOL; then
41708      new_complete="$new_path ${arguments% *}"
41709    else
41710      new_complete="$new_path"
41711    fi
41712
41713    if test "x$complete" != "x$new_complete"; then
41714      OBJCOPY="$new_complete"
41715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
41716$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
41717    fi
41718  fi
41719
41720      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
41721        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
41722        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
41723        # - version number is last blank separate word on first line
41724        # - version number formats that have been seen:
41725        #   - <major>.<minor>
41726        #   - <major>.<minor>.<micro>
41727        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
41728        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
41729         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
41730              -e 's/.* //' \
41731              -e '/^[01]\./b bad' \
41732              -e '/^2\./{' \
41733              -e '  s/^2\.//' \
41734              -e '  /^[0-9]$/b bad' \
41735              -e '  /^[0-9]\./b bad' \
41736              -e '  /^1[0-9]$/b bad' \
41737              -e '  /^1[0-9]\./b bad' \
41738              -e '  /^20\./b bad' \
41739              -e '  /^21\.0$/b bad' \
41740              -e '  /^21\.0\./b bad' \
41741              -e '}' \
41742              -e ':good' \
41743              -e 's/.*/VALID_VERSION/p' \
41744              -e 'q' \
41745              -e ':bad' \
41746              -e 's/.*/BAD_VERSION/p' \
41747              -e 'q'`
41748        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
41749          OBJCOPY=
41750          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
41751$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
41752          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
41753$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
41754          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
41755$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
41756          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
41757$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
41758          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
41759$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
41760        fi
41761      fi
41762    fi
41763  fi
41764
41765
41766
41767  # Publish this variable in the help.
41768
41769
41770  if [ -z "${OBJDUMP+x}" ]; then
41771    # The variable is not set by user, try to locate tool using the code snippet
41772    if test -n "$ac_tool_prefix"; then
41773  for ac_prog in gobjdump objdump
41774  do
41775    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41776set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41778$as_echo_n "checking for $ac_word... " >&6; }
41779if ${ac_cv_prog_OBJDUMP+:} false; then :
41780  $as_echo_n "(cached) " >&6
41781else
41782  if test -n "$OBJDUMP"; then
41783  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41784else
41785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41786for as_dir in $PATH
41787do
41788  IFS=$as_save_IFS
41789  test -z "$as_dir" && as_dir=.
41790    for ac_exec_ext in '' $ac_executable_extensions; do
41791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41792    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41794    break 2
41795  fi
41796done
41797  done
41798IFS=$as_save_IFS
41799
41800fi
41801fi
41802OBJDUMP=$ac_cv_prog_OBJDUMP
41803if test -n "$OBJDUMP"; then
41804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41805$as_echo "$OBJDUMP" >&6; }
41806else
41807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41808$as_echo "no" >&6; }
41809fi
41810
41811
41812    test -n "$OBJDUMP" && break
41813  done
41814fi
41815if test -z "$OBJDUMP"; then
41816  ac_ct_OBJDUMP=$OBJDUMP
41817  for ac_prog in gobjdump objdump
41818do
41819  # Extract the first word of "$ac_prog", so it can be a program name with args.
41820set dummy $ac_prog; ac_word=$2
41821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41822$as_echo_n "checking for $ac_word... " >&6; }
41823if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41824  $as_echo_n "(cached) " >&6
41825else
41826  if test -n "$ac_ct_OBJDUMP"; then
41827  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41828else
41829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41830for as_dir in $PATH
41831do
41832  IFS=$as_save_IFS
41833  test -z "$as_dir" && as_dir=.
41834    for ac_exec_ext in '' $ac_executable_extensions; do
41835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41836    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41838    break 2
41839  fi
41840done
41841  done
41842IFS=$as_save_IFS
41843
41844fi
41845fi
41846ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41847if test -n "$ac_ct_OBJDUMP"; then
41848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41849$as_echo "$ac_ct_OBJDUMP" >&6; }
41850else
41851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41852$as_echo "no" >&6; }
41853fi
41854
41855
41856  test -n "$ac_ct_OBJDUMP" && break
41857done
41858
41859  if test "x$ac_ct_OBJDUMP" = x; then
41860    OBJDUMP=""
41861  else
41862    case $cross_compiling:$ac_tool_warned in
41863yes:)
41864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41866ac_tool_warned=yes ;;
41867esac
41868    OBJDUMP=$ac_ct_OBJDUMP
41869  fi
41870fi
41871
41872  else
41873    # The variable is set, but is it from the command line or the environment?
41874
41875    # Try to remove the string !OBJDUMP! from our list.
41876    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
41877    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41878      # If it failed, the variable was not from the command line. Ignore it,
41879      # but warn the user (except for BASH, which is always set by the calling BASH).
41880      if test "xOBJDUMP" != xBASH; then
41881        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
41882$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
41883      fi
41884      # Try to locate tool using the code snippet
41885      if test -n "$ac_tool_prefix"; then
41886  for ac_prog in gobjdump objdump
41887  do
41888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41891$as_echo_n "checking for $ac_word... " >&6; }
41892if ${ac_cv_prog_OBJDUMP+:} false; then :
41893  $as_echo_n "(cached) " >&6
41894else
41895  if test -n "$OBJDUMP"; then
41896  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
41897else
41898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41899for as_dir in $PATH
41900do
41901  IFS=$as_save_IFS
41902  test -z "$as_dir" && as_dir=.
41903    for ac_exec_ext in '' $ac_executable_extensions; do
41904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41905    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
41906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41907    break 2
41908  fi
41909done
41910  done
41911IFS=$as_save_IFS
41912
41913fi
41914fi
41915OBJDUMP=$ac_cv_prog_OBJDUMP
41916if test -n "$OBJDUMP"; then
41917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
41918$as_echo "$OBJDUMP" >&6; }
41919else
41920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41921$as_echo "no" >&6; }
41922fi
41923
41924
41925    test -n "$OBJDUMP" && break
41926  done
41927fi
41928if test -z "$OBJDUMP"; then
41929  ac_ct_OBJDUMP=$OBJDUMP
41930  for ac_prog in gobjdump objdump
41931do
41932  # Extract the first word of "$ac_prog", so it can be a program name with args.
41933set dummy $ac_prog; ac_word=$2
41934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41935$as_echo_n "checking for $ac_word... " >&6; }
41936if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
41937  $as_echo_n "(cached) " >&6
41938else
41939  if test -n "$ac_ct_OBJDUMP"; then
41940  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
41941else
41942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41943for as_dir in $PATH
41944do
41945  IFS=$as_save_IFS
41946  test -z "$as_dir" && as_dir=.
41947    for ac_exec_ext in '' $ac_executable_extensions; do
41948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41949    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
41950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41951    break 2
41952  fi
41953done
41954  done
41955IFS=$as_save_IFS
41956
41957fi
41958fi
41959ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
41960if test -n "$ac_ct_OBJDUMP"; then
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
41962$as_echo "$ac_ct_OBJDUMP" >&6; }
41963else
41964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41965$as_echo "no" >&6; }
41966fi
41967
41968
41969  test -n "$ac_ct_OBJDUMP" && break
41970done
41971
41972  if test "x$ac_ct_OBJDUMP" = x; then
41973    OBJDUMP=""
41974  else
41975    case $cross_compiling:$ac_tool_warned in
41976yes:)
41977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41979ac_tool_warned=yes ;;
41980esac
41981    OBJDUMP=$ac_ct_OBJDUMP
41982  fi
41983fi
41984
41985    else
41986      # If it succeeded, then it was overridden by the user. We will use it
41987      # for the tool.
41988
41989      # First remove it from the list of overridden variables, so we can test
41990      # for unknown variables in the end.
41991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41992
41993      # Check if we try to supply an empty value
41994      if test "x$OBJDUMP" = x; then
41995        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
41996$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
41997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
41998$as_echo_n "checking for OBJDUMP... " >&6; }
41999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42000$as_echo "disabled" >&6; }
42001      else
42002        # Check if the provided tool contains a complete path.
42003        tool_specified="$OBJDUMP"
42004        tool_basename="${tool_specified##*/}"
42005        if test "x$tool_basename" = "x$tool_specified"; then
42006          # A command without a complete path is provided, search $PATH.
42007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42008$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42009          # Extract the first word of "$tool_basename", so it can be a program name with args.
42010set dummy $tool_basename; ac_word=$2
42011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42012$as_echo_n "checking for $ac_word... " >&6; }
42013if ${ac_cv_path_OBJDUMP+:} false; then :
42014  $as_echo_n "(cached) " >&6
42015else
42016  case $OBJDUMP in
42017  [\\/]* | ?:[\\/]*)
42018  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42019  ;;
42020  *)
42021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42022for as_dir in $PATH
42023do
42024  IFS=$as_save_IFS
42025  test -z "$as_dir" && as_dir=.
42026    for ac_exec_ext in '' $ac_executable_extensions; do
42027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42028    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42030    break 2
42031  fi
42032done
42033  done
42034IFS=$as_save_IFS
42035
42036  ;;
42037esac
42038fi
42039OBJDUMP=$ac_cv_path_OBJDUMP
42040if test -n "$OBJDUMP"; then
42041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42042$as_echo "$OBJDUMP" >&6; }
42043else
42044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42045$as_echo "no" >&6; }
42046fi
42047
42048
42049          if test "x$OBJDUMP" = x; then
42050            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42051          fi
42052        else
42053          # Otherwise we believe it is a complete path. Use it as it is.
42054          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42055$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42056          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42057$as_echo_n "checking for OBJDUMP... " >&6; }
42058          if test ! -x "$tool_specified"; then
42059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42060$as_echo "not found" >&6; }
42061            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42062          fi
42063          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42064$as_echo "$tool_specified" >&6; }
42065        fi
42066      fi
42067    fi
42068
42069  fi
42070
42071
42072  if test "x$OBJDUMP" != x; then
42073    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42074    # bails if argument is missing.
42075
42076  # Only process if variable expands to non-empty
42077
42078  if test "x$OBJDUMP" != x; then
42079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42080
42081  # First separate the path from the arguments. This will split at the first
42082  # space.
42083  complete="$OBJDUMP"
42084  path="${complete%% *}"
42085  tmp="$complete EOL"
42086  arguments="${tmp#* }"
42087
42088  # Input might be given as Windows format, start by converting to
42089  # unix format.
42090  new_path=`$CYGPATH -u "$path"`
42091
42092  # Now try to locate executable using which
42093  new_path=`$WHICH "$new_path" 2> /dev/null`
42094  # bat and cmd files are not always considered executable in cygwin causing which
42095  # to not find them
42096  if test "x$new_path" = x \
42097      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42098      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42099    new_path=`$CYGPATH -u "$path"`
42100  fi
42101  if test "x$new_path" = x; then
42102    # Oops. Which didn't find the executable.
42103    # The splitting of arguments from the executable at a space might have been incorrect,
42104    # since paths with space are more likely in Windows. Give it another try with the whole
42105    # argument.
42106    path="$complete"
42107    arguments="EOL"
42108    new_path=`$CYGPATH -u "$path"`
42109    new_path=`$WHICH "$new_path" 2> /dev/null`
42110    # bat and cmd files are not always considered executable in cygwin causing which
42111    # to not find them
42112    if test "x$new_path" = x \
42113        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42114        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42115      new_path=`$CYGPATH -u "$path"`
42116    fi
42117    if test "x$new_path" = x; then
42118      # It's still not found. Now this is an unrecoverable error.
42119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42120$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42121      has_space=`$ECHO "$complete" | $GREP " "`
42122      if test "x$has_space" != x; then
42123        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42124$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42125      fi
42126      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42127    fi
42128  fi
42129
42130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42133  # "foo.exe" is OK but "foo" is an error.
42134  #
42135  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42136  # It is also a way to make sure we got the proper file name for the real test later on.
42137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42138  if test "x$test_shortpath" = x; then
42139    # Short path failed, file does not exist as specified.
42140    # Try adding .exe or .cmd
42141    if test -f "${new_path}.exe"; then
42142      input_to_shortpath="${new_path}.exe"
42143    elif test -f "${new_path}.cmd"; then
42144      input_to_shortpath="${new_path}.cmd"
42145    else
42146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42147$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42148      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42149$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42150      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42151    fi
42152  else
42153    input_to_shortpath="$new_path"
42154  fi
42155
42156  # Call helper function which possibly converts this using DOS-style short mode.
42157  # If so, the updated path is stored in $new_path.
42158  new_path="$input_to_shortpath"
42159
42160  input_path="$input_to_shortpath"
42161  # Check if we need to convert this using DOS-style short mode. If the path
42162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42163  # take no chances and rewrite it.
42164  # Note: m4 eats our [], so we need to use [ and ] instead.
42165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42166  if test "x$has_forbidden_chars" != x; then
42167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42168    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42169    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42170    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42171      # Going to short mode and back again did indeed matter. Since short mode is
42172      # case insensitive, let's make it lowercase to improve readability.
42173      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42174      # Now convert it back to Unix-style (cygpath)
42175      input_path=`$CYGPATH -u "$shortmode_path"`
42176      new_path="$input_path"
42177    fi
42178  fi
42179
42180  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42181  if test "x$test_cygdrive_prefix" = x; then
42182    # As a simple fix, exclude /usr/bin since it's not a real path.
42183    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42184      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42185      # a path prefixed by /cygdrive for fixpath to work.
42186      new_path="$CYGWIN_ROOT_PATH$input_path"
42187    fi
42188  fi
42189
42190  # remove trailing .exe if any
42191  new_path="${new_path/%.exe/}"
42192
42193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42194
42195  # First separate the path from the arguments. This will split at the first
42196  # space.
42197  complete="$OBJDUMP"
42198  path="${complete%% *}"
42199  tmp="$complete EOL"
42200  arguments="${tmp#* }"
42201
42202  # Input might be given as Windows format, start by converting to
42203  # unix format.
42204  new_path="$path"
42205
42206  windows_path="$new_path"
42207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42208    unix_path=`$CYGPATH -u "$windows_path"`
42209    new_path="$unix_path"
42210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42212    new_path="$unix_path"
42213  fi
42214
42215
42216  # Now try to locate executable using which
42217  new_path=`$WHICH "$new_path" 2> /dev/null`
42218
42219  if test "x$new_path" = x; then
42220    # Oops. Which didn't find the executable.
42221    # The splitting of arguments from the executable at a space might have been incorrect,
42222    # since paths with space are more likely in Windows. Give it another try with the whole
42223    # argument.
42224    path="$complete"
42225    arguments="EOL"
42226    new_path="$path"
42227
42228  windows_path="$new_path"
42229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42230    unix_path=`$CYGPATH -u "$windows_path"`
42231    new_path="$unix_path"
42232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42234    new_path="$unix_path"
42235  fi
42236
42237
42238    new_path=`$WHICH "$new_path" 2> /dev/null`
42239    # bat and cmd files are not always considered executable in MSYS causing which
42240    # to not find them
42241    if test "x$new_path" = x \
42242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42244      new_path="$path"
42245
42246  windows_path="$new_path"
42247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42248    unix_path=`$CYGPATH -u "$windows_path"`
42249    new_path="$unix_path"
42250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42252    new_path="$unix_path"
42253  fi
42254
42255    fi
42256
42257    if test "x$new_path" = x; then
42258      # It's still not found. Now this is an unrecoverable error.
42259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42260$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42261      has_space=`$ECHO "$complete" | $GREP " "`
42262      if test "x$has_space" != x; then
42263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42265      fi
42266      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42267    fi
42268  fi
42269
42270  # Now new_path has a complete unix path to the binary
42271  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42272    # Keep paths in /bin as-is, but remove trailing .exe if any
42273    new_path="${new_path/%.exe/}"
42274    # Do not save /bin paths to all_fixpath_prefixes!
42275  else
42276    # Not in mixed or Windows style, start by that.
42277    new_path=`cmd //c echo $new_path`
42278
42279  input_path="$new_path"
42280  # Check if we need to convert this using DOS-style short mode. If the path
42281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42282  # take no chances and rewrite it.
42283  # Note: m4 eats our [], so we need to use [ and ] instead.
42284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42285  if test "x$has_forbidden_chars" != x; then
42286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42288  fi
42289
42290    # Output is in $new_path
42291
42292  windows_path="$new_path"
42293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42294    unix_path=`$CYGPATH -u "$windows_path"`
42295    new_path="$unix_path"
42296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42298    new_path="$unix_path"
42299  fi
42300
42301    # remove trailing .exe if any
42302    new_path="${new_path/%.exe/}"
42303
42304    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42305    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42306  fi
42307
42308    else
42309      # We're on a unix platform. Hooray! :)
42310      # First separate the path from the arguments. This will split at the first
42311      # space.
42312      complete="$OBJDUMP"
42313      path="${complete%% *}"
42314      tmp="$complete EOL"
42315      arguments="${tmp#* }"
42316
42317      # Cannot rely on the command "which" here since it doesn't always work.
42318      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42319      if test -z "$is_absolute_path"; then
42320        # Path to executable is not absolute. Find it.
42321        IFS_save="$IFS"
42322        IFS=:
42323        for p in $PATH; do
42324          if test -f "$p/$path" && test -x "$p/$path"; then
42325            new_path="$p/$path"
42326            break
42327          fi
42328        done
42329        IFS="$IFS_save"
42330      else
42331        # This is an absolute path, we can use it without further modifications.
42332        new_path="$path"
42333      fi
42334
42335      if test "x$new_path" = x; then
42336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42337$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42338        has_space=`$ECHO "$complete" | $GREP " "`
42339        if test "x$has_space" != x; then
42340          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42341$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42342        fi
42343        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42344      fi
42345    fi
42346
42347    # Now join together the path and the arguments once again
42348    if test "x$arguments" != xEOL; then
42349      new_complete="$new_path ${arguments% *}"
42350    else
42351      new_complete="$new_path"
42352    fi
42353
42354    if test "x$complete" != "x$new_complete"; then
42355      OBJDUMP="$new_complete"
42356      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42357$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42358    fi
42359  fi
42360
42361  fi
42362
42363
42364  # Restore old path.
42365  PATH="$OLD_PATH"
42366
42367  # Restore the flags to the user specified values.
42368  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42369  CFLAGS="$ORG_CFLAGS"
42370  CXXFLAGS="$ORG_CXXFLAGS"
42371
42372
42373# Finally do some processing after the detection phase
42374
42375  if test "x$COMPILE_TYPE" = "xcross"; then
42376    # Now we need to find a C/C++ compiler that can build executables for the
42377    # build platform. We can't use the AC_PROG_CC macro, since it can only be
42378    # used once. Also, we need to do this without adding a tools dir to the
42379    # path, otherwise we might pick up cross-compilers which don't use standard
42380    # naming.
42381
42382    OLDPATH="$PATH"
42383
42384
42385# Check whether --with-build-devkit was given.
42386if test "${with_build_devkit+set}" = set; then :
42387  withval=$with_build_devkit;
42388fi
42389
42390    if test "x$with_build_devkit" = "xyes"; then
42391      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
42392    elif test -n "$with_build_devkit"; then
42393      if test ! -d "$with_build_devkit"; then
42394        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
42395      else
42396
42397  # Only process if variable expands to non-empty
42398
42399  if test "x$with_build_devkit" != x; then
42400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42401
42402  # Input might be given as Windows format, start by converting to
42403  # unix format.
42404  path="$with_build_devkit"
42405  new_path=`$CYGPATH -u "$path"`
42406
42407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42410  # "foo.exe" is OK but "foo" is an error.
42411  #
42412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
42413  # It is also a way to make sure we got the proper file name for the real test later on.
42414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42415  if test "x$test_shortpath" = x; then
42416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42417$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42418    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
42419  fi
42420
42421  # Call helper function which possibly converts this using DOS-style short mode.
42422  # If so, the updated path is stored in $new_path.
42423
42424  input_path="$new_path"
42425  # Check if we need to convert this using DOS-style short mode. If the path
42426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42427  # take no chances and rewrite it.
42428  # Note: m4 eats our [], so we need to use [ and ] instead.
42429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42430  if test "x$has_forbidden_chars" != x; then
42431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42435      # Going to short mode and back again did indeed matter. Since short mode is
42436      # case insensitive, let's make it lowercase to improve readability.
42437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42438      # Now convert it back to Unix-style (cygpath)
42439      input_path=`$CYGPATH -u "$shortmode_path"`
42440      new_path="$input_path"
42441    fi
42442  fi
42443
42444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42445  if test "x$test_cygdrive_prefix" = x; then
42446    # As a simple fix, exclude /usr/bin since it's not a real path.
42447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
42448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42449      # a path prefixed by /cygdrive for fixpath to work.
42450      new_path="$CYGWIN_ROOT_PATH$input_path"
42451    fi
42452  fi
42453
42454
42455  if test "x$path" != "x$new_path"; then
42456    with_build_devkit="$new_path"
42457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42458$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42459  fi
42460
42461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42462
42463  path="$with_build_devkit"
42464  has_colon=`$ECHO $path | $GREP ^.:`
42465  new_path="$path"
42466  if test "x$has_colon" = x; then
42467    # Not in mixed or Windows style, start by that.
42468    new_path=`cmd //c echo $path`
42469  fi
42470
42471
42472  input_path="$new_path"
42473  # Check if we need to convert this using DOS-style short mode. If the path
42474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42475  # take no chances and rewrite it.
42476  # Note: m4 eats our [], so we need to use [ and ] instead.
42477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42478  if test "x$has_forbidden_chars" != x; then
42479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42481  fi
42482
42483
42484  windows_path="$new_path"
42485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42486    unix_path=`$CYGPATH -u "$windows_path"`
42487    new_path="$unix_path"
42488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42490    new_path="$unix_path"
42491  fi
42492
42493  if test "x$path" != "x$new_path"; then
42494    with_build_devkit="$new_path"
42495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
42496$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
42497  fi
42498
42499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
42500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42501
42502    else
42503      # We're on a unix platform. Hooray! :)
42504      path="$with_build_devkit"
42505      has_space=`$ECHO "$path" | $GREP " "`
42506      if test "x$has_space" != x; then
42507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
42508$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
42509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
42510      fi
42511
42512      # Use eval to expand a potential ~
42513      eval path="$path"
42514      if test ! -f "$path" && test ! -d "$path"; then
42515        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
42516      fi
42517
42518      with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
42519    fi
42520  fi
42521
42522        BUILD_DEVKIT_ROOT="$with_build_devkit"
42523        # Check for a meta data info file in the root of the devkit
42524        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
42525          # Process devkit.info so that existing devkit variables are not
42526          # modified by this
42527          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
42528              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
42529              -e "s/\$host/\$build/g" \
42530              $BUILD_DEVKIT_ROOT/devkit.info \
42531              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42532          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
42533          # This potentially sets the following:
42534          # A descriptive name of the devkit
42535
42536  if test "x$BUILD_DEVKIT_NAME" = x; then
42537    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
42538  fi
42539
42540          # Corresponds to --with-extra-path
42541
42542  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
42543    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
42544  fi
42545
42546          # Corresponds to --with-toolchain-path
42547
42548  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42549    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
42550  fi
42551
42552          # Corresponds to --with-sysroot
42553
42554  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
42555    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
42556  fi
42557
42558          # Skip the Window specific parts
42559        fi
42560
42561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
42562$as_echo_n "checking for build platform devkit... " >&6; }
42563        if test "x$BUILD_DEVKIT_NAME" != x; then
42564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
42565$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
42566        else
42567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
42568$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
42569        fi
42570
42571        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
42572
42573  if test "x$BUILD_SYSROOT" != "x"; then
42574    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42575      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42576        # Solaris Studio does not have a concept of sysroot. Instead we must
42577        # make sure the default include and lib dirs are appended to each
42578        # compile and link command line.
42579        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
42580        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
42581            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
42582            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
42583      fi
42584    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42585      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
42586      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
42587    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42588      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
42589      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
42590    fi
42591    # Propagate the sysroot args to hotspot
42592    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
42593    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42594    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42595    # The global CFLAGS and LDFLAGS variables need these for configure to function
42596    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
42597    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
42598    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
42599    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
42600  fi
42601
42602  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42603    # We also need -iframework<path>/System/Library/Frameworks
42604    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42605    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
42606    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
42607    # set this here so it doesn't have to be peppered throughout the forest
42608    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42609    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
42610  fi
42611
42612
42613
42614
42615
42616         # Fallback default of just /bin if DEVKIT_PATH is not defined
42617        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
42618          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
42619        fi
42620        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
42621      fi
42622    fi
42623
42624    # FIXME: we should list the discovered compilers as an exclude pattern!
42625    # If we do that, we can do this detection before POST_DETECTION, and still
42626    # find the build compilers in the tools dir, if needed.
42627
42628
42629
42630  # Publish this variable in the help.
42631
42632
42633  if [ -z "${BUILD_CC+x}" ]; then
42634    # The variable is not set by user, try to locate tool using the code snippet
42635    for ac_prog in cl cc gcc
42636do
42637  # Extract the first word of "$ac_prog", so it can be a program name with args.
42638set dummy $ac_prog; ac_word=$2
42639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42640$as_echo_n "checking for $ac_word... " >&6; }
42641if ${ac_cv_path_BUILD_CC+:} false; then :
42642  $as_echo_n "(cached) " >&6
42643else
42644  case $BUILD_CC in
42645  [\\/]* | ?:[\\/]*)
42646  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42647  ;;
42648  *)
42649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42650for as_dir in $PATH
42651do
42652  IFS=$as_save_IFS
42653  test -z "$as_dir" && as_dir=.
42654    for ac_exec_ext in '' $ac_executable_extensions; do
42655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42656    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42658    break 2
42659  fi
42660done
42661  done
42662IFS=$as_save_IFS
42663
42664  ;;
42665esac
42666fi
42667BUILD_CC=$ac_cv_path_BUILD_CC
42668if test -n "$BUILD_CC"; then
42669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42670$as_echo "$BUILD_CC" >&6; }
42671else
42672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42673$as_echo "no" >&6; }
42674fi
42675
42676
42677  test -n "$BUILD_CC" && break
42678done
42679
42680  else
42681    # The variable is set, but is it from the command line or the environment?
42682
42683    # Try to remove the string !BUILD_CC! from our list.
42684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
42685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42686      # If it failed, the variable was not from the command line. Ignore it,
42687      # but warn the user (except for BASH, which is always set by the calling BASH).
42688      if test "xBUILD_CC" != xBASH; then
42689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
42690$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
42691      fi
42692      # Try to locate tool using the code snippet
42693      for ac_prog in cl cc gcc
42694do
42695  # Extract the first word of "$ac_prog", so it can be a program name with args.
42696set dummy $ac_prog; ac_word=$2
42697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42698$as_echo_n "checking for $ac_word... " >&6; }
42699if ${ac_cv_path_BUILD_CC+:} false; then :
42700  $as_echo_n "(cached) " >&6
42701else
42702  case $BUILD_CC in
42703  [\\/]* | ?:[\\/]*)
42704  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42705  ;;
42706  *)
42707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42708for as_dir in $PATH
42709do
42710  IFS=$as_save_IFS
42711  test -z "$as_dir" && as_dir=.
42712    for ac_exec_ext in '' $ac_executable_extensions; do
42713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42714    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42716    break 2
42717  fi
42718done
42719  done
42720IFS=$as_save_IFS
42721
42722  ;;
42723esac
42724fi
42725BUILD_CC=$ac_cv_path_BUILD_CC
42726if test -n "$BUILD_CC"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42728$as_echo "$BUILD_CC" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735  test -n "$BUILD_CC" && break
42736done
42737
42738    else
42739      # If it succeeded, then it was overridden by the user. We will use it
42740      # for the tool.
42741
42742      # First remove it from the list of overridden variables, so we can test
42743      # for unknown variables in the end.
42744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42745
42746      # Check if we try to supply an empty value
42747      if test "x$BUILD_CC" = x; then
42748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
42749$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
42750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42751$as_echo_n "checking for BUILD_CC... " >&6; }
42752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42753$as_echo "disabled" >&6; }
42754      else
42755        # Check if the provided tool contains a complete path.
42756        tool_specified="$BUILD_CC"
42757        tool_basename="${tool_specified##*/}"
42758        if test "x$tool_basename" = "x$tool_specified"; then
42759          # A command without a complete path is provided, search $PATH.
42760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
42761$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
42762          # Extract the first word of "$tool_basename", so it can be a program name with args.
42763set dummy $tool_basename; ac_word=$2
42764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42765$as_echo_n "checking for $ac_word... " >&6; }
42766if ${ac_cv_path_BUILD_CC+:} false; then :
42767  $as_echo_n "(cached) " >&6
42768else
42769  case $BUILD_CC in
42770  [\\/]* | ?:[\\/]*)
42771  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
42772  ;;
42773  *)
42774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42775for as_dir in $PATH
42776do
42777  IFS=$as_save_IFS
42778  test -z "$as_dir" && as_dir=.
42779    for ac_exec_ext in '' $ac_executable_extensions; do
42780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42781    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
42782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42783    break 2
42784  fi
42785done
42786  done
42787IFS=$as_save_IFS
42788
42789  ;;
42790esac
42791fi
42792BUILD_CC=$ac_cv_path_BUILD_CC
42793if test -n "$BUILD_CC"; then
42794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
42795$as_echo "$BUILD_CC" >&6; }
42796else
42797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42798$as_echo "no" >&6; }
42799fi
42800
42801
42802          if test "x$BUILD_CC" = x; then
42803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42804          fi
42805        else
42806          # Otherwise we believe it is a complete path. Use it as it is.
42807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
42808$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
42809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
42810$as_echo_n "checking for BUILD_CC... " >&6; }
42811          if test ! -x "$tool_specified"; then
42812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42813$as_echo "not found" >&6; }
42814            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
42815          fi
42816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42817$as_echo "$tool_specified" >&6; }
42818        fi
42819      fi
42820    fi
42821
42822  fi
42823
42824
42825
42826  if test "x$BUILD_CC" = x; then
42827    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
42828  fi
42829
42830
42831
42832  # Only process if variable expands to non-empty
42833
42834  if test "x$BUILD_CC" != x; then
42835    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42836
42837  # First separate the path from the arguments. This will split at the first
42838  # space.
42839  complete="$BUILD_CC"
42840  path="${complete%% *}"
42841  tmp="$complete EOL"
42842  arguments="${tmp#* }"
42843
42844  # Input might be given as Windows format, start by converting to
42845  # unix format.
42846  new_path=`$CYGPATH -u "$path"`
42847
42848  # Now try to locate executable using which
42849  new_path=`$WHICH "$new_path" 2> /dev/null`
42850  # bat and cmd files are not always considered executable in cygwin causing which
42851  # to not find them
42852  if test "x$new_path" = x \
42853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42855    new_path=`$CYGPATH -u "$path"`
42856  fi
42857  if test "x$new_path" = x; then
42858    # Oops. Which didn't find the executable.
42859    # The splitting of arguments from the executable at a space might have been incorrect,
42860    # since paths with space are more likely in Windows. Give it another try with the whole
42861    # argument.
42862    path="$complete"
42863    arguments="EOL"
42864    new_path=`$CYGPATH -u "$path"`
42865    new_path=`$WHICH "$new_path" 2> /dev/null`
42866    # bat and cmd files are not always considered executable in cygwin causing which
42867    # to not find them
42868    if test "x$new_path" = x \
42869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42871      new_path=`$CYGPATH -u "$path"`
42872    fi
42873    if test "x$new_path" = x; then
42874      # It's still not found. Now this is an unrecoverable error.
42875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
42876$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
42877      has_space=`$ECHO "$complete" | $GREP " "`
42878      if test "x$has_space" != x; then
42879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42881      fi
42882      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42883    fi
42884  fi
42885
42886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42889  # "foo.exe" is OK but "foo" is an error.
42890  #
42891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42892  # It is also a way to make sure we got the proper file name for the real test later on.
42893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42894  if test "x$test_shortpath" = x; then
42895    # Short path failed, file does not exist as specified.
42896    # Try adding .exe or .cmd
42897    if test -f "${new_path}.exe"; then
42898      input_to_shortpath="${new_path}.exe"
42899    elif test -f "${new_path}.cmd"; then
42900      input_to_shortpath="${new_path}.cmd"
42901    else
42902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
42903$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
42904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42906      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
42907    fi
42908  else
42909    input_to_shortpath="$new_path"
42910  fi
42911
42912  # Call helper function which possibly converts this using DOS-style short mode.
42913  # If so, the updated path is stored in $new_path.
42914  new_path="$input_to_shortpath"
42915
42916  input_path="$input_to_shortpath"
42917  # Check if we need to convert this using DOS-style short mode. If the path
42918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42919  # take no chances and rewrite it.
42920  # Note: m4 eats our [], so we need to use [ and ] instead.
42921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42922  if test "x$has_forbidden_chars" != x; then
42923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42927      # Going to short mode and back again did indeed matter. Since short mode is
42928      # case insensitive, let's make it lowercase to improve readability.
42929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42930      # Now convert it back to Unix-style (cygpath)
42931      input_path=`$CYGPATH -u "$shortmode_path"`
42932      new_path="$input_path"
42933    fi
42934  fi
42935
42936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42937  if test "x$test_cygdrive_prefix" = x; then
42938    # As a simple fix, exclude /usr/bin since it's not a real path.
42939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42941      # a path prefixed by /cygdrive for fixpath to work.
42942      new_path="$CYGWIN_ROOT_PATH$input_path"
42943    fi
42944  fi
42945
42946  # remove trailing .exe if any
42947  new_path="${new_path/%.exe/}"
42948
42949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42950
42951  # First separate the path from the arguments. This will split at the first
42952  # space.
42953  complete="$BUILD_CC"
42954  path="${complete%% *}"
42955  tmp="$complete EOL"
42956  arguments="${tmp#* }"
42957
42958  # Input might be given as Windows format, start by converting to
42959  # unix format.
42960  new_path="$path"
42961
42962  windows_path="$new_path"
42963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42964    unix_path=`$CYGPATH -u "$windows_path"`
42965    new_path="$unix_path"
42966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42968    new_path="$unix_path"
42969  fi
42970
42971
42972  # Now try to locate executable using which
42973  new_path=`$WHICH "$new_path" 2> /dev/null`
42974
42975  if test "x$new_path" = x; then
42976    # Oops. Which didn't find the executable.
42977    # The splitting of arguments from the executable at a space might have been incorrect,
42978    # since paths with space are more likely in Windows. Give it another try with the whole
42979    # argument.
42980    path="$complete"
42981    arguments="EOL"
42982    new_path="$path"
42983
42984  windows_path="$new_path"
42985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42986    unix_path=`$CYGPATH -u "$windows_path"`
42987    new_path="$unix_path"
42988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42990    new_path="$unix_path"
42991  fi
42992
42993
42994    new_path=`$WHICH "$new_path" 2> /dev/null`
42995    # bat and cmd files are not always considered executable in MSYS causing which
42996    # to not find them
42997    if test "x$new_path" = x \
42998        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42999        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43000      new_path="$path"
43001
43002  windows_path="$new_path"
43003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43004    unix_path=`$CYGPATH -u "$windows_path"`
43005    new_path="$unix_path"
43006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43008    new_path="$unix_path"
43009  fi
43010
43011    fi
43012
43013    if test "x$new_path" = x; then
43014      # It's still not found. Now this is an unrecoverable error.
43015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43016$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43017      has_space=`$ECHO "$complete" | $GREP " "`
43018      if test "x$has_space" != x; then
43019        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43020$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43021      fi
43022      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43023    fi
43024  fi
43025
43026  # Now new_path has a complete unix path to the binary
43027  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43028    # Keep paths in /bin as-is, but remove trailing .exe if any
43029    new_path="${new_path/%.exe/}"
43030    # Do not save /bin paths to all_fixpath_prefixes!
43031  else
43032    # Not in mixed or Windows style, start by that.
43033    new_path=`cmd //c echo $new_path`
43034
43035  input_path="$new_path"
43036  # Check if we need to convert this using DOS-style short mode. If the path
43037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43038  # take no chances and rewrite it.
43039  # Note: m4 eats our [], so we need to use [ and ] instead.
43040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43041  if test "x$has_forbidden_chars" != x; then
43042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43044  fi
43045
43046    # Output is in $new_path
43047
43048  windows_path="$new_path"
43049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43050    unix_path=`$CYGPATH -u "$windows_path"`
43051    new_path="$unix_path"
43052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43054    new_path="$unix_path"
43055  fi
43056
43057    # remove trailing .exe if any
43058    new_path="${new_path/%.exe/}"
43059
43060    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43061    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43062  fi
43063
43064    else
43065      # We're on a unix platform. Hooray! :)
43066      # First separate the path from the arguments. This will split at the first
43067      # space.
43068      complete="$BUILD_CC"
43069      path="${complete%% *}"
43070      tmp="$complete EOL"
43071      arguments="${tmp#* }"
43072
43073      # Cannot rely on the command "which" here since it doesn't always work.
43074      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43075      if test -z "$is_absolute_path"; then
43076        # Path to executable is not absolute. Find it.
43077        IFS_save="$IFS"
43078        IFS=:
43079        for p in $PATH; do
43080          if test -f "$p/$path" && test -x "$p/$path"; then
43081            new_path="$p/$path"
43082            break
43083          fi
43084        done
43085        IFS="$IFS_save"
43086      else
43087        # This is an absolute path, we can use it without further modifications.
43088        new_path="$path"
43089      fi
43090
43091      if test "x$new_path" = x; then
43092        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43093$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43094        has_space=`$ECHO "$complete" | $GREP " "`
43095        if test "x$has_space" != x; then
43096          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43097$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43098        fi
43099        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43100      fi
43101    fi
43102
43103    # Now join together the path and the arguments once again
43104    if test "x$arguments" != xEOL; then
43105      new_complete="$new_path ${arguments% *}"
43106    else
43107      new_complete="$new_path"
43108    fi
43109
43110    if test "x$complete" != "x$new_complete"; then
43111      BUILD_CC="$new_complete"
43112      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43113$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43114    fi
43115  fi
43116
43117
43118
43119
43120  # Publish this variable in the help.
43121
43122
43123  if [ -z "${BUILD_CXX+x}" ]; then
43124    # The variable is not set by user, try to locate tool using the code snippet
43125    for ac_prog in cl CC g++
43126do
43127  # Extract the first word of "$ac_prog", so it can be a program name with args.
43128set dummy $ac_prog; ac_word=$2
43129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43130$as_echo_n "checking for $ac_word... " >&6; }
43131if ${ac_cv_path_BUILD_CXX+:} false; then :
43132  $as_echo_n "(cached) " >&6
43133else
43134  case $BUILD_CXX in
43135  [\\/]* | ?:[\\/]*)
43136  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43137  ;;
43138  *)
43139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43140for as_dir in $PATH
43141do
43142  IFS=$as_save_IFS
43143  test -z "$as_dir" && as_dir=.
43144    for ac_exec_ext in '' $ac_executable_extensions; do
43145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43146    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43148    break 2
43149  fi
43150done
43151  done
43152IFS=$as_save_IFS
43153
43154  ;;
43155esac
43156fi
43157BUILD_CXX=$ac_cv_path_BUILD_CXX
43158if test -n "$BUILD_CXX"; then
43159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43160$as_echo "$BUILD_CXX" >&6; }
43161else
43162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43163$as_echo "no" >&6; }
43164fi
43165
43166
43167  test -n "$BUILD_CXX" && break
43168done
43169
43170  else
43171    # The variable is set, but is it from the command line or the environment?
43172
43173    # Try to remove the string !BUILD_CXX! from our list.
43174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43176      # If it failed, the variable was not from the command line. Ignore it,
43177      # but warn the user (except for BASH, which is always set by the calling BASH).
43178      if test "xBUILD_CXX" != xBASH; then
43179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43180$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43181      fi
43182      # Try to locate tool using the code snippet
43183      for ac_prog in cl CC g++
43184do
43185  # Extract the first word of "$ac_prog", so it can be a program name with args.
43186set dummy $ac_prog; ac_word=$2
43187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43188$as_echo_n "checking for $ac_word... " >&6; }
43189if ${ac_cv_path_BUILD_CXX+:} false; then :
43190  $as_echo_n "(cached) " >&6
43191else
43192  case $BUILD_CXX in
43193  [\\/]* | ?:[\\/]*)
43194  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43195  ;;
43196  *)
43197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43198for as_dir in $PATH
43199do
43200  IFS=$as_save_IFS
43201  test -z "$as_dir" && as_dir=.
43202    for ac_exec_ext in '' $ac_executable_extensions; do
43203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43204    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43206    break 2
43207  fi
43208done
43209  done
43210IFS=$as_save_IFS
43211
43212  ;;
43213esac
43214fi
43215BUILD_CXX=$ac_cv_path_BUILD_CXX
43216if test -n "$BUILD_CXX"; then
43217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43218$as_echo "$BUILD_CXX" >&6; }
43219else
43220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43221$as_echo "no" >&6; }
43222fi
43223
43224
43225  test -n "$BUILD_CXX" && break
43226done
43227
43228    else
43229      # If it succeeded, then it was overridden by the user. We will use it
43230      # for the tool.
43231
43232      # First remove it from the list of overridden variables, so we can test
43233      # for unknown variables in the end.
43234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43235
43236      # Check if we try to supply an empty value
43237      if test "x$BUILD_CXX" = x; then
43238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43239$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43241$as_echo_n "checking for BUILD_CXX... " >&6; }
43242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43243$as_echo "disabled" >&6; }
43244      else
43245        # Check if the provided tool contains a complete path.
43246        tool_specified="$BUILD_CXX"
43247        tool_basename="${tool_specified##*/}"
43248        if test "x$tool_basename" = "x$tool_specified"; then
43249          # A command without a complete path is provided, search $PATH.
43250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43251$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43252          # Extract the first word of "$tool_basename", so it can be a program name with args.
43253set dummy $tool_basename; ac_word=$2
43254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43255$as_echo_n "checking for $ac_word... " >&6; }
43256if ${ac_cv_path_BUILD_CXX+:} false; then :
43257  $as_echo_n "(cached) " >&6
43258else
43259  case $BUILD_CXX in
43260  [\\/]* | ?:[\\/]*)
43261  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43262  ;;
43263  *)
43264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43265for as_dir in $PATH
43266do
43267  IFS=$as_save_IFS
43268  test -z "$as_dir" && as_dir=.
43269    for ac_exec_ext in '' $ac_executable_extensions; do
43270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43271    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43273    break 2
43274  fi
43275done
43276  done
43277IFS=$as_save_IFS
43278
43279  ;;
43280esac
43281fi
43282BUILD_CXX=$ac_cv_path_BUILD_CXX
43283if test -n "$BUILD_CXX"; then
43284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43285$as_echo "$BUILD_CXX" >&6; }
43286else
43287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43288$as_echo "no" >&6; }
43289fi
43290
43291
43292          if test "x$BUILD_CXX" = x; then
43293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43294          fi
43295        else
43296          # Otherwise we believe it is a complete path. Use it as it is.
43297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43298$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43300$as_echo_n "checking for BUILD_CXX... " >&6; }
43301          if test ! -x "$tool_specified"; then
43302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43303$as_echo "not found" >&6; }
43304            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43305          fi
43306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43307$as_echo "$tool_specified" >&6; }
43308        fi
43309      fi
43310    fi
43311
43312  fi
43313
43314
43315
43316  if test "x$BUILD_CXX" = x; then
43317    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43318  fi
43319
43320
43321
43322  # Only process if variable expands to non-empty
43323
43324  if test "x$BUILD_CXX" != x; then
43325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43326
43327  # First separate the path from the arguments. This will split at the first
43328  # space.
43329  complete="$BUILD_CXX"
43330  path="${complete%% *}"
43331  tmp="$complete EOL"
43332  arguments="${tmp#* }"
43333
43334  # Input might be given as Windows format, start by converting to
43335  # unix format.
43336  new_path=`$CYGPATH -u "$path"`
43337
43338  # Now try to locate executable using which
43339  new_path=`$WHICH "$new_path" 2> /dev/null`
43340  # bat and cmd files are not always considered executable in cygwin causing which
43341  # to not find them
43342  if test "x$new_path" = x \
43343      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43344      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43345    new_path=`$CYGPATH -u "$path"`
43346  fi
43347  if test "x$new_path" = x; then
43348    # Oops. Which didn't find the executable.
43349    # The splitting of arguments from the executable at a space might have been incorrect,
43350    # since paths with space are more likely in Windows. Give it another try with the whole
43351    # argument.
43352    path="$complete"
43353    arguments="EOL"
43354    new_path=`$CYGPATH -u "$path"`
43355    new_path=`$WHICH "$new_path" 2> /dev/null`
43356    # bat and cmd files are not always considered executable in cygwin causing which
43357    # to not find them
43358    if test "x$new_path" = x \
43359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43361      new_path=`$CYGPATH -u "$path"`
43362    fi
43363    if test "x$new_path" = x; then
43364      # It's still not found. Now this is an unrecoverable error.
43365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43366$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43367      has_space=`$ECHO "$complete" | $GREP " "`
43368      if test "x$has_space" != x; then
43369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43371      fi
43372      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43373    fi
43374  fi
43375
43376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43379  # "foo.exe" is OK but "foo" is an error.
43380  #
43381  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43382  # It is also a way to make sure we got the proper file name for the real test later on.
43383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43384  if test "x$test_shortpath" = x; then
43385    # Short path failed, file does not exist as specified.
43386    # Try adding .exe or .cmd
43387    if test -f "${new_path}.exe"; then
43388      input_to_shortpath="${new_path}.exe"
43389    elif test -f "${new_path}.cmd"; then
43390      input_to_shortpath="${new_path}.cmd"
43391    else
43392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
43393$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
43394      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43395$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43396      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43397    fi
43398  else
43399    input_to_shortpath="$new_path"
43400  fi
43401
43402  # Call helper function which possibly converts this using DOS-style short mode.
43403  # If so, the updated path is stored in $new_path.
43404  new_path="$input_to_shortpath"
43405
43406  input_path="$input_to_shortpath"
43407  # Check if we need to convert this using DOS-style short mode. If the path
43408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43409  # take no chances and rewrite it.
43410  # Note: m4 eats our [], so we need to use [ and ] instead.
43411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43412  if test "x$has_forbidden_chars" != x; then
43413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43414    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43415    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43416    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43417      # Going to short mode and back again did indeed matter. Since short mode is
43418      # case insensitive, let's make it lowercase to improve readability.
43419      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43420      # Now convert it back to Unix-style (cygpath)
43421      input_path=`$CYGPATH -u "$shortmode_path"`
43422      new_path="$input_path"
43423    fi
43424  fi
43425
43426  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43427  if test "x$test_cygdrive_prefix" = x; then
43428    # As a simple fix, exclude /usr/bin since it's not a real path.
43429    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43430      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43431      # a path prefixed by /cygdrive for fixpath to work.
43432      new_path="$CYGWIN_ROOT_PATH$input_path"
43433    fi
43434  fi
43435
43436  # remove trailing .exe if any
43437  new_path="${new_path/%.exe/}"
43438
43439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43440
43441  # First separate the path from the arguments. This will split at the first
43442  # space.
43443  complete="$BUILD_CXX"
43444  path="${complete%% *}"
43445  tmp="$complete EOL"
43446  arguments="${tmp#* }"
43447
43448  # Input might be given as Windows format, start by converting to
43449  # unix format.
43450  new_path="$path"
43451
43452  windows_path="$new_path"
43453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43454    unix_path=`$CYGPATH -u "$windows_path"`
43455    new_path="$unix_path"
43456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43458    new_path="$unix_path"
43459  fi
43460
43461
43462  # Now try to locate executable using which
43463  new_path=`$WHICH "$new_path" 2> /dev/null`
43464
43465  if test "x$new_path" = x; then
43466    # Oops. Which didn't find the executable.
43467    # The splitting of arguments from the executable at a space might have been incorrect,
43468    # since paths with space are more likely in Windows. Give it another try with the whole
43469    # argument.
43470    path="$complete"
43471    arguments="EOL"
43472    new_path="$path"
43473
43474  windows_path="$new_path"
43475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43476    unix_path=`$CYGPATH -u "$windows_path"`
43477    new_path="$unix_path"
43478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43480    new_path="$unix_path"
43481  fi
43482
43483
43484    new_path=`$WHICH "$new_path" 2> /dev/null`
43485    # bat and cmd files are not always considered executable in MSYS causing which
43486    # to not find them
43487    if test "x$new_path" = x \
43488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43490      new_path="$path"
43491
43492  windows_path="$new_path"
43493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43494    unix_path=`$CYGPATH -u "$windows_path"`
43495    new_path="$unix_path"
43496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43498    new_path="$unix_path"
43499  fi
43500
43501    fi
43502
43503    if test "x$new_path" = x; then
43504      # It's still not found. Now this is an unrecoverable error.
43505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43506$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43507      has_space=`$ECHO "$complete" | $GREP " "`
43508      if test "x$has_space" != x; then
43509        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43510$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43511      fi
43512      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43513    fi
43514  fi
43515
43516  # Now new_path has a complete unix path to the binary
43517  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43518    # Keep paths in /bin as-is, but remove trailing .exe if any
43519    new_path="${new_path/%.exe/}"
43520    # Do not save /bin paths to all_fixpath_prefixes!
43521  else
43522    # Not in mixed or Windows style, start by that.
43523    new_path=`cmd //c echo $new_path`
43524
43525  input_path="$new_path"
43526  # Check if we need to convert this using DOS-style short mode. If the path
43527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43528  # take no chances and rewrite it.
43529  # Note: m4 eats our [], so we need to use [ and ] instead.
43530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43531  if test "x$has_forbidden_chars" != x; then
43532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43534  fi
43535
43536    # Output is in $new_path
43537
43538  windows_path="$new_path"
43539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43540    unix_path=`$CYGPATH -u "$windows_path"`
43541    new_path="$unix_path"
43542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43544    new_path="$unix_path"
43545  fi
43546
43547    # remove trailing .exe if any
43548    new_path="${new_path/%.exe/}"
43549
43550    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43551    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43552  fi
43553
43554    else
43555      # We're on a unix platform. Hooray! :)
43556      # First separate the path from the arguments. This will split at the first
43557      # space.
43558      complete="$BUILD_CXX"
43559      path="${complete%% *}"
43560      tmp="$complete EOL"
43561      arguments="${tmp#* }"
43562
43563      # Cannot rely on the command "which" here since it doesn't always work.
43564      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43565      if test -z "$is_absolute_path"; then
43566        # Path to executable is not absolute. Find it.
43567        IFS_save="$IFS"
43568        IFS=:
43569        for p in $PATH; do
43570          if test -f "$p/$path" && test -x "$p/$path"; then
43571            new_path="$p/$path"
43572            break
43573          fi
43574        done
43575        IFS="$IFS_save"
43576      else
43577        # This is an absolute path, we can use it without further modifications.
43578        new_path="$path"
43579      fi
43580
43581      if test "x$new_path" = x; then
43582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43583$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43584        has_space=`$ECHO "$complete" | $GREP " "`
43585        if test "x$has_space" != x; then
43586          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43587$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43588        fi
43589        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
43590      fi
43591    fi
43592
43593    # Now join together the path and the arguments once again
43594    if test "x$arguments" != xEOL; then
43595      new_complete="$new_path ${arguments% *}"
43596    else
43597      new_complete="$new_path"
43598    fi
43599
43600    if test "x$complete" != "x$new_complete"; then
43601      BUILD_CXX="$new_complete"
43602      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
43603$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
43604    fi
43605  fi
43606
43607
43608
43609  # Publish this variable in the help.
43610
43611
43612  if [ -z "${BUILD_NM+x}" ]; then
43613    # The variable is not set by user, try to locate tool using the code snippet
43614    for ac_prog in nm gcc-nm
43615do
43616  # Extract the first word of "$ac_prog", so it can be a program name with args.
43617set dummy $ac_prog; ac_word=$2
43618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43619$as_echo_n "checking for $ac_word... " >&6; }
43620if ${ac_cv_path_BUILD_NM+:} false; then :
43621  $as_echo_n "(cached) " >&6
43622else
43623  case $BUILD_NM in
43624  [\\/]* | ?:[\\/]*)
43625  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43626  ;;
43627  *)
43628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43629for as_dir in $PATH
43630do
43631  IFS=$as_save_IFS
43632  test -z "$as_dir" && as_dir=.
43633    for ac_exec_ext in '' $ac_executable_extensions; do
43634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43635    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43637    break 2
43638  fi
43639done
43640  done
43641IFS=$as_save_IFS
43642
43643  ;;
43644esac
43645fi
43646BUILD_NM=$ac_cv_path_BUILD_NM
43647if test -n "$BUILD_NM"; then
43648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43649$as_echo "$BUILD_NM" >&6; }
43650else
43651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43652$as_echo "no" >&6; }
43653fi
43654
43655
43656  test -n "$BUILD_NM" && break
43657done
43658
43659  else
43660    # The variable is set, but is it from the command line or the environment?
43661
43662    # Try to remove the string !BUILD_NM! from our list.
43663    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
43664    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43665      # If it failed, the variable was not from the command line. Ignore it,
43666      # but warn the user (except for BASH, which is always set by the calling BASH).
43667      if test "xBUILD_NM" != xBASH; then
43668        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
43669$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
43670      fi
43671      # Try to locate tool using the code snippet
43672      for ac_prog in nm gcc-nm
43673do
43674  # Extract the first word of "$ac_prog", so it can be a program name with args.
43675set dummy $ac_prog; ac_word=$2
43676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43677$as_echo_n "checking for $ac_word... " >&6; }
43678if ${ac_cv_path_BUILD_NM+:} false; then :
43679  $as_echo_n "(cached) " >&6
43680else
43681  case $BUILD_NM in
43682  [\\/]* | ?:[\\/]*)
43683  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43684  ;;
43685  *)
43686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43687for as_dir in $PATH
43688do
43689  IFS=$as_save_IFS
43690  test -z "$as_dir" && as_dir=.
43691    for ac_exec_ext in '' $ac_executable_extensions; do
43692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43693    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43695    break 2
43696  fi
43697done
43698  done
43699IFS=$as_save_IFS
43700
43701  ;;
43702esac
43703fi
43704BUILD_NM=$ac_cv_path_BUILD_NM
43705if test -n "$BUILD_NM"; then
43706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43707$as_echo "$BUILD_NM" >&6; }
43708else
43709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43710$as_echo "no" >&6; }
43711fi
43712
43713
43714  test -n "$BUILD_NM" && break
43715done
43716
43717    else
43718      # If it succeeded, then it was overridden by the user. We will use it
43719      # for the tool.
43720
43721      # First remove it from the list of overridden variables, so we can test
43722      # for unknown variables in the end.
43723      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43724
43725      # Check if we try to supply an empty value
43726      if test "x$BUILD_NM" = x; then
43727        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
43728$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
43729        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43730$as_echo_n "checking for BUILD_NM... " >&6; }
43731        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43732$as_echo "disabled" >&6; }
43733      else
43734        # Check if the provided tool contains a complete path.
43735        tool_specified="$BUILD_NM"
43736        tool_basename="${tool_specified##*/}"
43737        if test "x$tool_basename" = "x$tool_specified"; then
43738          # A command without a complete path is provided, search $PATH.
43739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
43740$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
43741          # Extract the first word of "$tool_basename", so it can be a program name with args.
43742set dummy $tool_basename; ac_word=$2
43743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43744$as_echo_n "checking for $ac_word... " >&6; }
43745if ${ac_cv_path_BUILD_NM+:} false; then :
43746  $as_echo_n "(cached) " >&6
43747else
43748  case $BUILD_NM in
43749  [\\/]* | ?:[\\/]*)
43750  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
43751  ;;
43752  *)
43753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43754for as_dir in $PATH
43755do
43756  IFS=$as_save_IFS
43757  test -z "$as_dir" && as_dir=.
43758    for ac_exec_ext in '' $ac_executable_extensions; do
43759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43760    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
43761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43762    break 2
43763  fi
43764done
43765  done
43766IFS=$as_save_IFS
43767
43768  ;;
43769esac
43770fi
43771BUILD_NM=$ac_cv_path_BUILD_NM
43772if test -n "$BUILD_NM"; then
43773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
43774$as_echo "$BUILD_NM" >&6; }
43775else
43776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43777$as_echo "no" >&6; }
43778fi
43779
43780
43781          if test "x$BUILD_NM" = x; then
43782            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43783          fi
43784        else
43785          # Otherwise we believe it is a complete path. Use it as it is.
43786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
43787$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
43788          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
43789$as_echo_n "checking for BUILD_NM... " >&6; }
43790          if test ! -x "$tool_specified"; then
43791            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43792$as_echo "not found" >&6; }
43793            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43794          fi
43795          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43796$as_echo "$tool_specified" >&6; }
43797        fi
43798      fi
43799    fi
43800
43801  fi
43802
43803
43804
43805  # Only process if variable expands to non-empty
43806
43807  if test "x$BUILD_NM" != x; then
43808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43809
43810  # First separate the path from the arguments. This will split at the first
43811  # space.
43812  complete="$BUILD_NM"
43813  path="${complete%% *}"
43814  tmp="$complete EOL"
43815  arguments="${tmp#* }"
43816
43817  # Input might be given as Windows format, start by converting to
43818  # unix format.
43819  new_path=`$CYGPATH -u "$path"`
43820
43821  # Now try to locate executable using which
43822  new_path=`$WHICH "$new_path" 2> /dev/null`
43823  # bat and cmd files are not always considered executable in cygwin causing which
43824  # to not find them
43825  if test "x$new_path" = x \
43826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43828    new_path=`$CYGPATH -u "$path"`
43829  fi
43830  if test "x$new_path" = x; then
43831    # Oops. Which didn't find the executable.
43832    # The splitting of arguments from the executable at a space might have been incorrect,
43833    # since paths with space are more likely in Windows. Give it another try with the whole
43834    # argument.
43835    path="$complete"
43836    arguments="EOL"
43837    new_path=`$CYGPATH -u "$path"`
43838    new_path=`$WHICH "$new_path" 2> /dev/null`
43839    # bat and cmd files are not always considered executable in cygwin causing which
43840    # to not find them
43841    if test "x$new_path" = x \
43842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43844      new_path=`$CYGPATH -u "$path"`
43845    fi
43846    if test "x$new_path" = x; then
43847      # It's still not found. Now this is an unrecoverable error.
43848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43849$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43850      has_space=`$ECHO "$complete" | $GREP " "`
43851      if test "x$has_space" != x; then
43852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43854      fi
43855      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43856    fi
43857  fi
43858
43859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43862  # "foo.exe" is OK but "foo" is an error.
43863  #
43864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43865  # It is also a way to make sure we got the proper file name for the real test later on.
43866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43867  if test "x$test_shortpath" = x; then
43868    # Short path failed, file does not exist as specified.
43869    # Try adding .exe or .cmd
43870    if test -f "${new_path}.exe"; then
43871      input_to_shortpath="${new_path}.exe"
43872    elif test -f "${new_path}.cmd"; then
43873      input_to_shortpath="${new_path}.cmd"
43874    else
43875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
43876$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
43877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43879      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43880    fi
43881  else
43882    input_to_shortpath="$new_path"
43883  fi
43884
43885  # Call helper function which possibly converts this using DOS-style short mode.
43886  # If so, the updated path is stored in $new_path.
43887  new_path="$input_to_shortpath"
43888
43889  input_path="$input_to_shortpath"
43890  # Check if we need to convert this using DOS-style short mode. If the path
43891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43892  # take no chances and rewrite it.
43893  # Note: m4 eats our [], so we need to use [ and ] instead.
43894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43895  if test "x$has_forbidden_chars" != x; then
43896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43900      # Going to short mode and back again did indeed matter. Since short mode is
43901      # case insensitive, let's make it lowercase to improve readability.
43902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43903      # Now convert it back to Unix-style (cygpath)
43904      input_path=`$CYGPATH -u "$shortmode_path"`
43905      new_path="$input_path"
43906    fi
43907  fi
43908
43909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43910  if test "x$test_cygdrive_prefix" = x; then
43911    # As a simple fix, exclude /usr/bin since it's not a real path.
43912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43914      # a path prefixed by /cygdrive for fixpath to work.
43915      new_path="$CYGWIN_ROOT_PATH$input_path"
43916    fi
43917  fi
43918
43919  # remove trailing .exe if any
43920  new_path="${new_path/%.exe/}"
43921
43922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43923
43924  # First separate the path from the arguments. This will split at the first
43925  # space.
43926  complete="$BUILD_NM"
43927  path="${complete%% *}"
43928  tmp="$complete EOL"
43929  arguments="${tmp#* }"
43930
43931  # Input might be given as Windows format, start by converting to
43932  # unix format.
43933  new_path="$path"
43934
43935  windows_path="$new_path"
43936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43937    unix_path=`$CYGPATH -u "$windows_path"`
43938    new_path="$unix_path"
43939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43941    new_path="$unix_path"
43942  fi
43943
43944
43945  # Now try to locate executable using which
43946  new_path=`$WHICH "$new_path" 2> /dev/null`
43947
43948  if test "x$new_path" = x; then
43949    # Oops. Which didn't find the executable.
43950    # The splitting of arguments from the executable at a space might have been incorrect,
43951    # since paths with space are more likely in Windows. Give it another try with the whole
43952    # argument.
43953    path="$complete"
43954    arguments="EOL"
43955    new_path="$path"
43956
43957  windows_path="$new_path"
43958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43959    unix_path=`$CYGPATH -u "$windows_path"`
43960    new_path="$unix_path"
43961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43963    new_path="$unix_path"
43964  fi
43965
43966
43967    new_path=`$WHICH "$new_path" 2> /dev/null`
43968    # bat and cmd files are not always considered executable in MSYS causing which
43969    # to not find them
43970    if test "x$new_path" = x \
43971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43973      new_path="$path"
43974
43975  windows_path="$new_path"
43976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43977    unix_path=`$CYGPATH -u "$windows_path"`
43978    new_path="$unix_path"
43979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43981    new_path="$unix_path"
43982  fi
43983
43984    fi
43985
43986    if test "x$new_path" = x; then
43987      # It's still not found. Now this is an unrecoverable error.
43988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
43989$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
43990      has_space=`$ECHO "$complete" | $GREP " "`
43991      if test "x$has_space" != x; then
43992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43994      fi
43995      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
43996    fi
43997  fi
43998
43999  # Now new_path has a complete unix path to the binary
44000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44001    # Keep paths in /bin as-is, but remove trailing .exe if any
44002    new_path="${new_path/%.exe/}"
44003    # Do not save /bin paths to all_fixpath_prefixes!
44004  else
44005    # Not in mixed or Windows style, start by that.
44006    new_path=`cmd //c echo $new_path`
44007
44008  input_path="$new_path"
44009  # Check if we need to convert this using DOS-style short mode. If the path
44010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44011  # take no chances and rewrite it.
44012  # Note: m4 eats our [], so we need to use [ and ] instead.
44013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44014  if test "x$has_forbidden_chars" != x; then
44015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44017  fi
44018
44019    # Output is in $new_path
44020
44021  windows_path="$new_path"
44022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44023    unix_path=`$CYGPATH -u "$windows_path"`
44024    new_path="$unix_path"
44025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44027    new_path="$unix_path"
44028  fi
44029
44030    # remove trailing .exe if any
44031    new_path="${new_path/%.exe/}"
44032
44033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44035  fi
44036
44037    else
44038      # We're on a unix platform. Hooray! :)
44039      # First separate the path from the arguments. This will split at the first
44040      # space.
44041      complete="$BUILD_NM"
44042      path="${complete%% *}"
44043      tmp="$complete EOL"
44044      arguments="${tmp#* }"
44045
44046      # Cannot rely on the command "which" here since it doesn't always work.
44047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44048      if test -z "$is_absolute_path"; then
44049        # Path to executable is not absolute. Find it.
44050        IFS_save="$IFS"
44051        IFS=:
44052        for p in $PATH; do
44053          if test -f "$p/$path" && test -x "$p/$path"; then
44054            new_path="$p/$path"
44055            break
44056          fi
44057        done
44058        IFS="$IFS_save"
44059      else
44060        # This is an absolute path, we can use it without further modifications.
44061        new_path="$path"
44062      fi
44063
44064      if test "x$new_path" = x; then
44065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44066$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44067        has_space=`$ECHO "$complete" | $GREP " "`
44068        if test "x$has_space" != x; then
44069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44071        fi
44072        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44073      fi
44074    fi
44075
44076    # Now join together the path and the arguments once again
44077    if test "x$arguments" != xEOL; then
44078      new_complete="$new_path ${arguments% *}"
44079    else
44080      new_complete="$new_path"
44081    fi
44082
44083    if test "x$complete" != "x$new_complete"; then
44084      BUILD_NM="$new_complete"
44085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44086$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44087    fi
44088  fi
44089
44090
44091
44092  # Publish this variable in the help.
44093
44094
44095  if [ -z "${BUILD_AR+x}" ]; then
44096    # The variable is not set by user, try to locate tool using the code snippet
44097    for ac_prog in ar gcc-ar
44098do
44099  # Extract the first word of "$ac_prog", so it can be a program name with args.
44100set dummy $ac_prog; ac_word=$2
44101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44102$as_echo_n "checking for $ac_word... " >&6; }
44103if ${ac_cv_path_BUILD_AR+:} false; then :
44104  $as_echo_n "(cached) " >&6
44105else
44106  case $BUILD_AR in
44107  [\\/]* | ?:[\\/]*)
44108  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44109  ;;
44110  *)
44111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44112for as_dir in $PATH
44113do
44114  IFS=$as_save_IFS
44115  test -z "$as_dir" && as_dir=.
44116    for ac_exec_ext in '' $ac_executable_extensions; do
44117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44118    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44120    break 2
44121  fi
44122done
44123  done
44124IFS=$as_save_IFS
44125
44126  ;;
44127esac
44128fi
44129BUILD_AR=$ac_cv_path_BUILD_AR
44130if test -n "$BUILD_AR"; then
44131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44132$as_echo "$BUILD_AR" >&6; }
44133else
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44135$as_echo "no" >&6; }
44136fi
44137
44138
44139  test -n "$BUILD_AR" && break
44140done
44141
44142  else
44143    # The variable is set, but is it from the command line or the environment?
44144
44145    # Try to remove the string !BUILD_AR! from our list.
44146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44148      # If it failed, the variable was not from the command line. Ignore it,
44149      # but warn the user (except for BASH, which is always set by the calling BASH).
44150      if test "xBUILD_AR" != xBASH; then
44151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44152$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44153      fi
44154      # Try to locate tool using the code snippet
44155      for ac_prog in ar gcc-ar
44156do
44157  # Extract the first word of "$ac_prog", so it can be a program name with args.
44158set dummy $ac_prog; ac_word=$2
44159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44160$as_echo_n "checking for $ac_word... " >&6; }
44161if ${ac_cv_path_BUILD_AR+:} false; then :
44162  $as_echo_n "(cached) " >&6
44163else
44164  case $BUILD_AR in
44165  [\\/]* | ?:[\\/]*)
44166  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44167  ;;
44168  *)
44169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44170for as_dir in $PATH
44171do
44172  IFS=$as_save_IFS
44173  test -z "$as_dir" && as_dir=.
44174    for ac_exec_ext in '' $ac_executable_extensions; do
44175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44176    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44178    break 2
44179  fi
44180done
44181  done
44182IFS=$as_save_IFS
44183
44184  ;;
44185esac
44186fi
44187BUILD_AR=$ac_cv_path_BUILD_AR
44188if test -n "$BUILD_AR"; then
44189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44190$as_echo "$BUILD_AR" >&6; }
44191else
44192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44193$as_echo "no" >&6; }
44194fi
44195
44196
44197  test -n "$BUILD_AR" && break
44198done
44199
44200    else
44201      # If it succeeded, then it was overridden by the user. We will use it
44202      # for the tool.
44203
44204      # First remove it from the list of overridden variables, so we can test
44205      # for unknown variables in the end.
44206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44207
44208      # Check if we try to supply an empty value
44209      if test "x$BUILD_AR" = x; then
44210        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44211$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44212        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44213$as_echo_n "checking for BUILD_AR... " >&6; }
44214        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44215$as_echo "disabled" >&6; }
44216      else
44217        # Check if the provided tool contains a complete path.
44218        tool_specified="$BUILD_AR"
44219        tool_basename="${tool_specified##*/}"
44220        if test "x$tool_basename" = "x$tool_specified"; then
44221          # A command without a complete path is provided, search $PATH.
44222          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44223$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44224          # Extract the first word of "$tool_basename", so it can be a program name with args.
44225set dummy $tool_basename; ac_word=$2
44226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44227$as_echo_n "checking for $ac_word... " >&6; }
44228if ${ac_cv_path_BUILD_AR+:} false; then :
44229  $as_echo_n "(cached) " >&6
44230else
44231  case $BUILD_AR in
44232  [\\/]* | ?:[\\/]*)
44233  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44234  ;;
44235  *)
44236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44237for as_dir in $PATH
44238do
44239  IFS=$as_save_IFS
44240  test -z "$as_dir" && as_dir=.
44241    for ac_exec_ext in '' $ac_executable_extensions; do
44242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44243    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44245    break 2
44246  fi
44247done
44248  done
44249IFS=$as_save_IFS
44250
44251  ;;
44252esac
44253fi
44254BUILD_AR=$ac_cv_path_BUILD_AR
44255if test -n "$BUILD_AR"; then
44256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44257$as_echo "$BUILD_AR" >&6; }
44258else
44259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44260$as_echo "no" >&6; }
44261fi
44262
44263
44264          if test "x$BUILD_AR" = x; then
44265            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44266          fi
44267        else
44268          # Otherwise we believe it is a complete path. Use it as it is.
44269          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44270$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44271          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44272$as_echo_n "checking for BUILD_AR... " >&6; }
44273          if test ! -x "$tool_specified"; then
44274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44275$as_echo "not found" >&6; }
44276            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44277          fi
44278          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44279$as_echo "$tool_specified" >&6; }
44280        fi
44281      fi
44282    fi
44283
44284  fi
44285
44286
44287
44288  # Only process if variable expands to non-empty
44289
44290  if test "x$BUILD_AR" != x; then
44291    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44292
44293  # First separate the path from the arguments. This will split at the first
44294  # space.
44295  complete="$BUILD_AR"
44296  path="${complete%% *}"
44297  tmp="$complete EOL"
44298  arguments="${tmp#* }"
44299
44300  # Input might be given as Windows format, start by converting to
44301  # unix format.
44302  new_path=`$CYGPATH -u "$path"`
44303
44304  # Now try to locate executable using which
44305  new_path=`$WHICH "$new_path" 2> /dev/null`
44306  # bat and cmd files are not always considered executable in cygwin causing which
44307  # to not find them
44308  if test "x$new_path" = x \
44309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44311    new_path=`$CYGPATH -u "$path"`
44312  fi
44313  if test "x$new_path" = x; then
44314    # Oops. Which didn't find the executable.
44315    # The splitting of arguments from the executable at a space might have been incorrect,
44316    # since paths with space are more likely in Windows. Give it another try with the whole
44317    # argument.
44318    path="$complete"
44319    arguments="EOL"
44320    new_path=`$CYGPATH -u "$path"`
44321    new_path=`$WHICH "$new_path" 2> /dev/null`
44322    # bat and cmd files are not always considered executable in cygwin causing which
44323    # to not find them
44324    if test "x$new_path" = x \
44325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44327      new_path=`$CYGPATH -u "$path"`
44328    fi
44329    if test "x$new_path" = x; then
44330      # It's still not found. Now this is an unrecoverable error.
44331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44332$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44333      has_space=`$ECHO "$complete" | $GREP " "`
44334      if test "x$has_space" != x; then
44335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44337      fi
44338      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44339    fi
44340  fi
44341
44342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44345  # "foo.exe" is OK but "foo" is an error.
44346  #
44347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44348  # It is also a way to make sure we got the proper file name for the real test later on.
44349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44350  if test "x$test_shortpath" = x; then
44351    # Short path failed, file does not exist as specified.
44352    # Try adding .exe or .cmd
44353    if test -f "${new_path}.exe"; then
44354      input_to_shortpath="${new_path}.exe"
44355    elif test -f "${new_path}.cmd"; then
44356      input_to_shortpath="${new_path}.cmd"
44357    else
44358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44359$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44362      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44363    fi
44364  else
44365    input_to_shortpath="$new_path"
44366  fi
44367
44368  # Call helper function which possibly converts this using DOS-style short mode.
44369  # If so, the updated path is stored in $new_path.
44370  new_path="$input_to_shortpath"
44371
44372  input_path="$input_to_shortpath"
44373  # Check if we need to convert this using DOS-style short mode. If the path
44374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44375  # take no chances and rewrite it.
44376  # Note: m4 eats our [], so we need to use [ and ] instead.
44377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44378  if test "x$has_forbidden_chars" != x; then
44379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44383      # Going to short mode and back again did indeed matter. Since short mode is
44384      # case insensitive, let's make it lowercase to improve readability.
44385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44386      # Now convert it back to Unix-style (cygpath)
44387      input_path=`$CYGPATH -u "$shortmode_path"`
44388      new_path="$input_path"
44389    fi
44390  fi
44391
44392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44393  if test "x$test_cygdrive_prefix" = x; then
44394    # As a simple fix, exclude /usr/bin since it's not a real path.
44395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44397      # a path prefixed by /cygdrive for fixpath to work.
44398      new_path="$CYGWIN_ROOT_PATH$input_path"
44399    fi
44400  fi
44401
44402  # remove trailing .exe if any
44403  new_path="${new_path/%.exe/}"
44404
44405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44406
44407  # First separate the path from the arguments. This will split at the first
44408  # space.
44409  complete="$BUILD_AR"
44410  path="${complete%% *}"
44411  tmp="$complete EOL"
44412  arguments="${tmp#* }"
44413
44414  # Input might be given as Windows format, start by converting to
44415  # unix format.
44416  new_path="$path"
44417
44418  windows_path="$new_path"
44419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44420    unix_path=`$CYGPATH -u "$windows_path"`
44421    new_path="$unix_path"
44422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44424    new_path="$unix_path"
44425  fi
44426
44427
44428  # Now try to locate executable using which
44429  new_path=`$WHICH "$new_path" 2> /dev/null`
44430
44431  if test "x$new_path" = x; then
44432    # Oops. Which didn't find the executable.
44433    # The splitting of arguments from the executable at a space might have been incorrect,
44434    # since paths with space are more likely in Windows. Give it another try with the whole
44435    # argument.
44436    path="$complete"
44437    arguments="EOL"
44438    new_path="$path"
44439
44440  windows_path="$new_path"
44441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44442    unix_path=`$CYGPATH -u "$windows_path"`
44443    new_path="$unix_path"
44444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44446    new_path="$unix_path"
44447  fi
44448
44449
44450    new_path=`$WHICH "$new_path" 2> /dev/null`
44451    # bat and cmd files are not always considered executable in MSYS causing which
44452    # to not find them
44453    if test "x$new_path" = x \
44454        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44455        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44456      new_path="$path"
44457
44458  windows_path="$new_path"
44459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44460    unix_path=`$CYGPATH -u "$windows_path"`
44461    new_path="$unix_path"
44462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44464    new_path="$unix_path"
44465  fi
44466
44467    fi
44468
44469    if test "x$new_path" = x; then
44470      # It's still not found. Now this is an unrecoverable error.
44471      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44472$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44473      has_space=`$ECHO "$complete" | $GREP " "`
44474      if test "x$has_space" != x; then
44475        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44476$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44477      fi
44478      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44479    fi
44480  fi
44481
44482  # Now new_path has a complete unix path to the binary
44483  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44484    # Keep paths in /bin as-is, but remove trailing .exe if any
44485    new_path="${new_path/%.exe/}"
44486    # Do not save /bin paths to all_fixpath_prefixes!
44487  else
44488    # Not in mixed or Windows style, start by that.
44489    new_path=`cmd //c echo $new_path`
44490
44491  input_path="$new_path"
44492  # Check if we need to convert this using DOS-style short mode. If the path
44493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44494  # take no chances and rewrite it.
44495  # Note: m4 eats our [], so we need to use [ and ] instead.
44496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44497  if test "x$has_forbidden_chars" != x; then
44498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44500  fi
44501
44502    # Output is in $new_path
44503
44504  windows_path="$new_path"
44505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44506    unix_path=`$CYGPATH -u "$windows_path"`
44507    new_path="$unix_path"
44508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44510    new_path="$unix_path"
44511  fi
44512
44513    # remove trailing .exe if any
44514    new_path="${new_path/%.exe/}"
44515
44516    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44517    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44518  fi
44519
44520    else
44521      # We're on a unix platform. Hooray! :)
44522      # First separate the path from the arguments. This will split at the first
44523      # space.
44524      complete="$BUILD_AR"
44525      path="${complete%% *}"
44526      tmp="$complete EOL"
44527      arguments="${tmp#* }"
44528
44529      # Cannot rely on the command "which" here since it doesn't always work.
44530      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44531      if test -z "$is_absolute_path"; then
44532        # Path to executable is not absolute. Find it.
44533        IFS_save="$IFS"
44534        IFS=:
44535        for p in $PATH; do
44536          if test -f "$p/$path" && test -x "$p/$path"; then
44537            new_path="$p/$path"
44538            break
44539          fi
44540        done
44541        IFS="$IFS_save"
44542      else
44543        # This is an absolute path, we can use it without further modifications.
44544        new_path="$path"
44545      fi
44546
44547      if test "x$new_path" = x; then
44548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44549$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44550        has_space=`$ECHO "$complete" | $GREP " "`
44551        if test "x$has_space" != x; then
44552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44554        fi
44555        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44556      fi
44557    fi
44558
44559    # Now join together the path and the arguments once again
44560    if test "x$arguments" != xEOL; then
44561      new_complete="$new_path ${arguments% *}"
44562    else
44563      new_complete="$new_path"
44564    fi
44565
44566    if test "x$complete" != "x$new_complete"; then
44567      BUILD_AR="$new_complete"
44568      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
44569$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
44570    fi
44571  fi
44572
44573    # Assume the C compiler is the assembler
44574    BUILD_AS="$BUILD_CC -c"
44575    # Just like for the target compiler, use the compiler as linker
44576    BUILD_LD="$BUILD_CC"
44577
44578    PATH="$OLDPATH"
44579  else
44580    # If we are not cross compiling, use the normal target compilers for
44581    # building the build platform executables.
44582    BUILD_CC="$CC"
44583    BUILD_CXX="$CXX"
44584    BUILD_LD="$LD"
44585    BUILD_NM="$NM"
44586    BUILD_AS="$AS"
44587    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
44588    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
44589    BUILD_AR="$AR"
44590  fi
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44603    # For hotspot, we need these in Windows mixed path,
44604    # so rewrite them all. Need added .exe suffix.
44605    HOTSPOT_CXX="$CXX.exe"
44606    HOTSPOT_LD="$LD.exe"
44607    HOTSPOT_MT="$MT.exe"
44608    HOTSPOT_RC="$RC.exe"
44609
44610  unix_path="$HOTSPOT_CXX"
44611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44612    windows_path=`$CYGPATH -m "$unix_path"`
44613    HOTSPOT_CXX="$windows_path"
44614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44615    windows_path=`cmd //c echo $unix_path`
44616    HOTSPOT_CXX="$windows_path"
44617  fi
44618
44619
44620  unix_path="$HOTSPOT_LD"
44621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44622    windows_path=`$CYGPATH -m "$unix_path"`
44623    HOTSPOT_LD="$windows_path"
44624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44625    windows_path=`cmd //c echo $unix_path`
44626    HOTSPOT_LD="$windows_path"
44627  fi
44628
44629
44630  unix_path="$HOTSPOT_MT"
44631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44632    windows_path=`$CYGPATH -m "$unix_path"`
44633    HOTSPOT_MT="$windows_path"
44634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44635    windows_path=`cmd //c echo $unix_path`
44636    HOTSPOT_MT="$windows_path"
44637  fi
44638
44639
44640  unix_path="$HOTSPOT_RC"
44641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44642    windows_path=`$CYGPATH -m "$unix_path"`
44643    HOTSPOT_RC="$windows_path"
44644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44645    windows_path=`cmd //c echo $unix_path`
44646    HOTSPOT_RC="$windows_path"
44647  fi
44648
44649
44650
44651  else
44652    HOTSPOT_CXX="$CXX"
44653    HOTSPOT_LD="$LD"
44654  fi
44655
44656
44657
44658  if test  "x$TOOLCHAIN_TYPE" = xclang; then
44659    USE_CLANG=true
44660  fi
44661
44662
44663
44664
44665
44666  # The package path is used only on macosx?
44667  # FIXME: clean this up, and/or move it elsewhere.
44668  PACKAGE_PATH=/opt/local
44669
44670
44671  # Check for extra potential brokenness.
44672  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
44673    # On Windows, double-check that we got the right compiler.
44674    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
44675    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
44676    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
44677      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
44678        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
44679      fi
44680    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
44681      if test "x$COMPILER_CPU_TEST" != "xx64"; then
44682        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
44683      fi
44684    fi
44685  fi
44686
44687  if test "x$TOOLCHAIN_TYPE" = xgcc; then
44688    # If this is a --hash-style=gnu system, use --hash-style=both, why?
44689    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
44690    # This is later checked when setting flags.
44691
44692    # "-Og" suppported for GCC 4.8 and later
44693    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
44694
44695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
44696$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
44697  supports=yes
44698
44699  saved_cflags="$CFLAGS"
44700  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
44701  ac_ext=c
44702ac_cpp='$CPP $CPPFLAGS'
44703ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44704ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44705ac_compiler_gnu=$ac_cv_c_compiler_gnu
44706
44707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44708/* end confdefs.h.  */
44709int i;
44710_ACEOF
44711if ac_fn_c_try_compile "$LINENO"; then :
44712
44713else
44714  supports=no
44715fi
44716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44717  ac_ext=cpp
44718ac_cpp='$CXXCPP $CPPFLAGS'
44719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44722
44723  CFLAGS="$saved_cflags"
44724
44725  saved_cxxflags="$CXXFLAGS"
44726  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
44727  ac_ext=cpp
44728ac_cpp='$CXXCPP $CPPFLAGS'
44729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44732
44733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44734/* end confdefs.h.  */
44735int i;
44736_ACEOF
44737if ac_fn_cxx_try_compile "$LINENO"; then :
44738
44739else
44740  supports=no
44741fi
44742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44743  ac_ext=cpp
44744ac_cpp='$CXXCPP $CPPFLAGS'
44745ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44746ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44747ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44748
44749  CXXFLAGS="$saved_cxxflags"
44750
44751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44752$as_echo "$supports" >&6; }
44753  if test "x$supports" = "xyes" ; then
44754    HAS_CFLAG_OPTIMIZE_DEBUG=true
44755  else
44756    HAS_CFLAG_OPTIMIZE_DEBUG=false
44757  fi
44758
44759
44760    # "-z relro" supported in GNU binutils 2.17 and later
44761    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
44762
44763  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
44764$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
44765  supports=yes
44766
44767  saved_ldflags="$LDFLAGS"
44768  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
44769  ac_ext=c
44770ac_cpp='$CPP $CPPFLAGS'
44771ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44772ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44773ac_compiler_gnu=$ac_cv_c_compiler_gnu
44774
44775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44776/* end confdefs.h.  */
44777
44778int
44779main ()
44780{
44781
44782  ;
44783  return 0;
44784}
44785_ACEOF
44786if ac_fn_c_try_link "$LINENO"; then :
44787
44788else
44789  supports=no
44790fi
44791rm -f core conftest.err conftest.$ac_objext \
44792    conftest$ac_exeext conftest.$ac_ext
44793  ac_ext=cpp
44794ac_cpp='$CXXCPP $CPPFLAGS'
44795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44798
44799  LDFLAGS="$saved_ldflags"
44800
44801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44802$as_echo "$supports" >&6; }
44803  if test "x$supports" = "xyes" ; then
44804    HAS_LINKER_RELRO=true
44805  else
44806    HAS_LINKER_RELRO=false
44807  fi
44808
44809
44810    # "-z now" supported in GNU binutils 2.11 and later
44811    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
44812
44813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
44814$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
44815  supports=yes
44816
44817  saved_ldflags="$LDFLAGS"
44818  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
44819  ac_ext=c
44820ac_cpp='$CPP $CPPFLAGS'
44821ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44822ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44823ac_compiler_gnu=$ac_cv_c_compiler_gnu
44824
44825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44826/* end confdefs.h.  */
44827
44828int
44829main ()
44830{
44831
44832  ;
44833  return 0;
44834}
44835_ACEOF
44836if ac_fn_c_try_link "$LINENO"; then :
44837
44838else
44839  supports=no
44840fi
44841rm -f core conftest.err conftest.$ac_objext \
44842    conftest$ac_exeext conftest.$ac_ext
44843  ac_ext=cpp
44844ac_cpp='$CXXCPP $CPPFLAGS'
44845ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44846ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44847ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44848
44849  LDFLAGS="$saved_ldflags"
44850
44851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
44852$as_echo "$supports" >&6; }
44853  if test "x$supports" = "xyes" ; then
44854    HAS_LINKER_NOW=true
44855  else
44856    HAS_LINKER_NOW=false
44857  fi
44858
44859  fi
44860
44861  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
44862  # in executable.'
44863  USING_BROKEN_SUSE_LD=no
44864  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
44866$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
44867    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
44868    $ECHO "int main() { }" > main.c
44869    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
44870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44871$as_echo "no" >&6; }
44872      USING_BROKEN_SUSE_LD=no
44873    else
44874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44875$as_echo "yes" >&6; }
44876      USING_BROKEN_SUSE_LD=yes
44877    fi
44878    rm -rf version-script.map main.c a.out
44879  fi
44880
44881
44882
44883# Setup the JTReg Regression Test Harness.
44884
44885
44886# Check whether --with-jtreg was given.
44887if test "${with_jtreg+set}" = set; then :
44888  withval=$with_jtreg;
44889else
44890  with_jtreg=no
44891fi
44892
44893
44894  if test "x$with_jtreg" = xno; then
44895    # jtreg disabled
44896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44897$as_echo_n "checking for jtreg... " >&6; }
44898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44899$as_echo "no" >&6; }
44900  else
44901    if test "x$with_jtreg" != xyes; then
44902      # with path specified.
44903      JT_HOME="$with_jtreg"
44904    fi
44905
44906    if test "x$JT_HOME" != x; then
44907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
44908$as_echo_n "checking for jtreg... " >&6; }
44909
44910      # use JT_HOME enviroment var.
44911
44912  # Only process if variable expands to non-empty
44913
44914  if test "x$JT_HOME" != x; then
44915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44916
44917  # Input might be given as Windows format, start by converting to
44918  # unix format.
44919  path="$JT_HOME"
44920  new_path=`$CYGPATH -u "$path"`
44921
44922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44925  # "foo.exe" is OK but "foo" is an error.
44926  #
44927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44928  # It is also a way to make sure we got the proper file name for the real test later on.
44929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44930  if test "x$test_shortpath" = x; then
44931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
44932$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
44933    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
44934  fi
44935
44936  # Call helper function which possibly converts this using DOS-style short mode.
44937  # If so, the updated path is stored in $new_path.
44938
44939  input_path="$new_path"
44940  # Check if we need to convert this using DOS-style short mode. If the path
44941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44942  # take no chances and rewrite it.
44943  # Note: m4 eats our [], so we need to use [ and ] instead.
44944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44945  if test "x$has_forbidden_chars" != x; then
44946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44950      # Going to short mode and back again did indeed matter. Since short mode is
44951      # case insensitive, let's make it lowercase to improve readability.
44952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44953      # Now convert it back to Unix-style (cygpath)
44954      input_path=`$CYGPATH -u "$shortmode_path"`
44955      new_path="$input_path"
44956    fi
44957  fi
44958
44959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44960  if test "x$test_cygdrive_prefix" = x; then
44961    # As a simple fix, exclude /usr/bin since it's not a real path.
44962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44964      # a path prefixed by /cygdrive for fixpath to work.
44965      new_path="$CYGWIN_ROOT_PATH$input_path"
44966    fi
44967  fi
44968
44969
44970  if test "x$path" != "x$new_path"; then
44971    JT_HOME="$new_path"
44972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
44973$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
44974  fi
44975
44976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44977
44978  path="$JT_HOME"
44979  has_colon=`$ECHO $path | $GREP ^.:`
44980  new_path="$path"
44981  if test "x$has_colon" = x; then
44982    # Not in mixed or Windows style, start by that.
44983    new_path=`cmd //c echo $path`
44984  fi
44985
44986
44987  input_path="$new_path"
44988  # Check if we need to convert this using DOS-style short mode. If the path
44989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44990  # take no chances and rewrite it.
44991  # Note: m4 eats our [], so we need to use [ and ] instead.
44992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44993  if test "x$has_forbidden_chars" != x; then
44994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44996  fi
44997
44998
44999  windows_path="$new_path"
45000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45001    unix_path=`$CYGPATH -u "$windows_path"`
45002    new_path="$unix_path"
45003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45005    new_path="$unix_path"
45006  fi
45007
45008  if test "x$path" != "x$new_path"; then
45009    JT_HOME="$new_path"
45010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45011$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45012  fi
45013
45014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45016
45017    else
45018      # We're on a unix platform. Hooray! :)
45019      path="$JT_HOME"
45020      has_space=`$ECHO "$path" | $GREP " "`
45021      if test "x$has_space" != x; then
45022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45023$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45025      fi
45026
45027      # Use eval to expand a potential ~
45028      eval path="$path"
45029      if test ! -f "$path" && test ! -d "$path"; then
45030        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45031      fi
45032
45033      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45034    fi
45035  fi
45036
45037
45038      # jtreg win32 script works for everybody
45039      JTREGEXE="$JT_HOME/bin/jtreg"
45040
45041      if test ! -f "$JTREGEXE"; then
45042        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45043      fi
45044
45045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45046$as_echo "$JTREGEXE" >&6; }
45047    else
45048      # try to find jtreg on path
45049
45050
45051
45052  # Publish this variable in the help.
45053
45054
45055  if [ -z "${JTREGEXE+x}" ]; then
45056    # The variable is not set by user, try to locate tool using the code snippet
45057    for ac_prog in jtreg
45058do
45059  # Extract the first word of "$ac_prog", so it can be a program name with args.
45060set dummy $ac_prog; ac_word=$2
45061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45062$as_echo_n "checking for $ac_word... " >&6; }
45063if ${ac_cv_path_JTREGEXE+:} false; then :
45064  $as_echo_n "(cached) " >&6
45065else
45066  case $JTREGEXE in
45067  [\\/]* | ?:[\\/]*)
45068  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45069  ;;
45070  *)
45071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45072for as_dir in $PATH
45073do
45074  IFS=$as_save_IFS
45075  test -z "$as_dir" && as_dir=.
45076    for ac_exec_ext in '' $ac_executable_extensions; do
45077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45078    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45080    break 2
45081  fi
45082done
45083  done
45084IFS=$as_save_IFS
45085
45086  ;;
45087esac
45088fi
45089JTREGEXE=$ac_cv_path_JTREGEXE
45090if test -n "$JTREGEXE"; then
45091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45092$as_echo "$JTREGEXE" >&6; }
45093else
45094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45095$as_echo "no" >&6; }
45096fi
45097
45098
45099  test -n "$JTREGEXE" && break
45100done
45101
45102  else
45103    # The variable is set, but is it from the command line or the environment?
45104
45105    # Try to remove the string !JTREGEXE! from our list.
45106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45108      # If it failed, the variable was not from the command line. Ignore it,
45109      # but warn the user (except for BASH, which is always set by the calling BASH).
45110      if test "xJTREGEXE" != xBASH; then
45111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45112$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45113      fi
45114      # Try to locate tool using the code snippet
45115      for ac_prog in jtreg
45116do
45117  # Extract the first word of "$ac_prog", so it can be a program name with args.
45118set dummy $ac_prog; ac_word=$2
45119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45120$as_echo_n "checking for $ac_word... " >&6; }
45121if ${ac_cv_path_JTREGEXE+:} false; then :
45122  $as_echo_n "(cached) " >&6
45123else
45124  case $JTREGEXE in
45125  [\\/]* | ?:[\\/]*)
45126  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45127  ;;
45128  *)
45129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45130for as_dir in $PATH
45131do
45132  IFS=$as_save_IFS
45133  test -z "$as_dir" && as_dir=.
45134    for ac_exec_ext in '' $ac_executable_extensions; do
45135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45136    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45138    break 2
45139  fi
45140done
45141  done
45142IFS=$as_save_IFS
45143
45144  ;;
45145esac
45146fi
45147JTREGEXE=$ac_cv_path_JTREGEXE
45148if test -n "$JTREGEXE"; then
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45150$as_echo "$JTREGEXE" >&6; }
45151else
45152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45153$as_echo "no" >&6; }
45154fi
45155
45156
45157  test -n "$JTREGEXE" && break
45158done
45159
45160    else
45161      # If it succeeded, then it was overridden by the user. We will use it
45162      # for the tool.
45163
45164      # First remove it from the list of overridden variables, so we can test
45165      # for unknown variables in the end.
45166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45167
45168      # Check if we try to supply an empty value
45169      if test "x$JTREGEXE" = x; then
45170        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45171$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45172        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45173$as_echo_n "checking for JTREGEXE... " >&6; }
45174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45175$as_echo "disabled" >&6; }
45176      else
45177        # Check if the provided tool contains a complete path.
45178        tool_specified="$JTREGEXE"
45179        tool_basename="${tool_specified##*/}"
45180        if test "x$tool_basename" = "x$tool_specified"; then
45181          # A command without a complete path is provided, search $PATH.
45182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45183$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45184          # Extract the first word of "$tool_basename", so it can be a program name with args.
45185set dummy $tool_basename; ac_word=$2
45186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45187$as_echo_n "checking for $ac_word... " >&6; }
45188if ${ac_cv_path_JTREGEXE+:} false; then :
45189  $as_echo_n "(cached) " >&6
45190else
45191  case $JTREGEXE in
45192  [\\/]* | ?:[\\/]*)
45193  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45194  ;;
45195  *)
45196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45197for as_dir in $PATH
45198do
45199  IFS=$as_save_IFS
45200  test -z "$as_dir" && as_dir=.
45201    for ac_exec_ext in '' $ac_executable_extensions; do
45202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45203    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45205    break 2
45206  fi
45207done
45208  done
45209IFS=$as_save_IFS
45210
45211  ;;
45212esac
45213fi
45214JTREGEXE=$ac_cv_path_JTREGEXE
45215if test -n "$JTREGEXE"; then
45216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45217$as_echo "$JTREGEXE" >&6; }
45218else
45219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45220$as_echo "no" >&6; }
45221fi
45222
45223
45224          if test "x$JTREGEXE" = x; then
45225            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45226          fi
45227        else
45228          # Otherwise we believe it is a complete path. Use it as it is.
45229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45230$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45231          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45232$as_echo_n "checking for JTREGEXE... " >&6; }
45233          if test ! -x "$tool_specified"; then
45234            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45235$as_echo "not found" >&6; }
45236            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45237          fi
45238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45239$as_echo "$tool_specified" >&6; }
45240        fi
45241      fi
45242    fi
45243
45244  fi
45245
45246
45247
45248  if test "x$JTREGEXE" = x; then
45249    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45250  fi
45251
45252
45253      JT_HOME="`$DIRNAME $JTREGEXE`"
45254    fi
45255  fi
45256
45257
45258
45259
45260
45261
45262  # Option used to tell the compiler whether to create 32- or 64-bit executables
45263  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45264    COMPILER_TARGET_BITS_FLAG="-q"
45265  else
45266    COMPILER_TARGET_BITS_FLAG="-m"
45267  fi
45268
45269
45270  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45271  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45272    ARFLAGS="-r"
45273  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45274    ARFLAGS="-X64"
45275  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45276    # lib.exe is used as AR to create static libraries.
45277    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45278  else
45279    ARFLAGS=""
45280  fi
45281
45282
45283  ## Setup strip.
45284  # FIXME: should this really be per platform, or should it be per toolchain type?
45285  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45286  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45287  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45288    STRIPFLAGS="-g"
45289  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45290    STRIPFLAGS="-x"
45291  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45292    STRIPFLAGS="-S"
45293  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45294    STRIPFLAGS="-X32_64"
45295  fi
45296
45297
45298
45299  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45300    CC_OUT_OPTION=-Fo
45301    EXE_OUT_OPTION=-out:
45302    LD_OUT_OPTION=-out:
45303    AR_OUT_OPTION=-out:
45304  else
45305    # The option used to specify the target .o,.a or .so file.
45306    # When compiling, how to specify the to be created object file.
45307    CC_OUT_OPTION='-o$(SPACE)'
45308    # When linking, how to specify the to be created executable.
45309    EXE_OUT_OPTION='-o$(SPACE)'
45310    # When linking, how to specify the to be created dynamically linkable library.
45311    LD_OUT_OPTION='-o$(SPACE)'
45312    # When archiving, how to specify the to be create static archive for object files.
45313    AR_OUT_OPTION='rcs$(SPACE)'
45314  fi
45315
45316
45317
45318
45319
45320  # On Windows, we need to set RC flags.
45321  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45322    RC_FLAGS="-nologo -l0x409"
45323    if test "x$VARIANT" = xOPT; then
45324      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45325    fi
45326
45327    # The version variables used to create RC_FLAGS may be overridden
45328    # in a custom configure script, or possibly the command line.
45329    # Let those variables be expanded at make time in spec.gmk.
45330    # The \$ are escaped to the shell, and the $(...) variables
45331    # are evaluated by make.
45332    RC_FLAGS="$RC_FLAGS \
45333        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
45334        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45335        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45336        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
45337        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45338        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
45339        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
45340  fi
45341
45342
45343  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45344    # silence copyright notice and other headers.
45345    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45346  fi
45347
45348
45349# FIXME: Currently we must test this after toolchain but before flags. Fix!
45350
45351# Now we can test some aspects on the target using configure macros.
45352
45353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45354$as_echo_n "checking for ANSI C header files... " >&6; }
45355if ${ac_cv_header_stdc+:} false; then :
45356  $as_echo_n "(cached) " >&6
45357else
45358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45359/* end confdefs.h.  */
45360#include <stdlib.h>
45361#include <stdarg.h>
45362#include <string.h>
45363#include <float.h>
45364
45365int
45366main ()
45367{
45368
45369  ;
45370  return 0;
45371}
45372_ACEOF
45373if ac_fn_cxx_try_compile "$LINENO"; then :
45374  ac_cv_header_stdc=yes
45375else
45376  ac_cv_header_stdc=no
45377fi
45378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45379
45380if test $ac_cv_header_stdc = yes; then
45381  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
45382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45383/* end confdefs.h.  */
45384#include <string.h>
45385
45386_ACEOF
45387if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45388  $EGREP "memchr" >/dev/null 2>&1; then :
45389
45390else
45391  ac_cv_header_stdc=no
45392fi
45393rm -f conftest*
45394
45395fi
45396
45397if test $ac_cv_header_stdc = yes; then
45398  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
45399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45400/* end confdefs.h.  */
45401#include <stdlib.h>
45402
45403_ACEOF
45404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45405  $EGREP "free" >/dev/null 2>&1; then :
45406
45407else
45408  ac_cv_header_stdc=no
45409fi
45410rm -f conftest*
45411
45412fi
45413
45414if test $ac_cv_header_stdc = yes; then
45415  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
45416  if test "$cross_compiling" = yes; then :
45417  :
45418else
45419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45420/* end confdefs.h.  */
45421#include <ctype.h>
45422#include <stdlib.h>
45423#if ((' ' & 0x0FF) == 0x020)
45424# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
45425# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
45426#else
45427# define ISLOWER(c) \
45428		   (('a' <= (c) && (c) <= 'i') \
45429		     || ('j' <= (c) && (c) <= 'r') \
45430		     || ('s' <= (c) && (c) <= 'z'))
45431# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
45432#endif
45433
45434#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
45435int
45436main ()
45437{
45438  int i;
45439  for (i = 0; i < 256; i++)
45440    if (XOR (islower (i), ISLOWER (i))
45441	|| toupper (i) != TOUPPER (i))
45442      return 2;
45443  return 0;
45444}
45445_ACEOF
45446if ac_fn_cxx_try_run "$LINENO"; then :
45447
45448else
45449  ac_cv_header_stdc=no
45450fi
45451rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45452  conftest.$ac_objext conftest.beam conftest.$ac_ext
45453fi
45454
45455fi
45456fi
45457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
45458$as_echo "$ac_cv_header_stdc" >&6; }
45459if test $ac_cv_header_stdc = yes; then
45460
45461$as_echo "#define STDC_HEADERS 1" >>confdefs.h
45462
45463fi
45464
45465# On IRIX 5.3, sys/types and inttypes.h are conflicting.
45466for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
45467		  inttypes.h stdint.h unistd.h
45468do :
45469  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
45470ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
45471"
45472if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
45473  cat >>confdefs.h <<_ACEOF
45474#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
45475_ACEOF
45476
45477fi
45478
45479done
45480
45481
45482
45483  ###############################################################################
45484  #
45485  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
45486  # (The JVM can use 32 or 64 bit Java pointers but that decision
45487  # is made at runtime.)
45488  #
45489
45490  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
45491    # Always specify -m flag on Solaris
45492    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
45493
45494  # When we add flags to the "official" CFLAGS etc, we need to
45495  # keep track of these additions in ADDED_CFLAGS etc. These
45496  # will later be checked to make sure only controlled additions
45497  # have been made to CFLAGS etc.
45498  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45499  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45500  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45501
45502  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45503  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45504  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45505
45506  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45507  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45508  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45509
45510  elif test "x$COMPILE_TYPE" = xreduced; then
45511    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
45512      # Specify -m if running reduced on unix platforms
45513
45514  # When we add flags to the "official" CFLAGS etc, we need to
45515  # keep track of these additions in ADDED_CFLAGS etc. These
45516  # will later be checked to make sure only controlled additions
45517  # have been made to CFLAGS etc.
45518  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45519  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45520  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45521
45522  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45523  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45524  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45525
45526  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45527  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45528  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45529
45530    fi
45531  fi
45532
45533  # Make compilation sanity check
45534  for ac_header in stdio.h
45535do :
45536  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
45537if test "x$ac_cv_header_stdio_h" = xyes; then :
45538  cat >>confdefs.h <<_ACEOF
45539#define HAVE_STDIO_H 1
45540_ACEOF
45541
45542else
45543
45544    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
45545$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
45546    if test "x$COMPILE_TYPE" = xreduced; then
45547
45548  # Print a helpful message on how to acquire the necessary build dependency.
45549  # reduced is the help tag: freetype, cups, alsa etc
45550  MISSING_DEPENDENCY=reduced
45551
45552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45553    cygwin_help $MISSING_DEPENDENCY
45554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45555    msys_help $MISSING_DEPENDENCY
45556  else
45557    PKGHANDLER_COMMAND=
45558
45559    case $PKGHANDLER in
45560      apt-get)
45561        apt_help     $MISSING_DEPENDENCY ;;
45562      yum)
45563        yum_help     $MISSING_DEPENDENCY ;;
45564      port)
45565        port_help    $MISSING_DEPENDENCY ;;
45566      pkgutil)
45567        pkgutil_help $MISSING_DEPENDENCY ;;
45568      pkgadd)
45569        pkgadd_help  $MISSING_DEPENDENCY ;;
45570    esac
45571
45572    if test "x$PKGHANDLER_COMMAND" != x; then
45573      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45574    fi
45575  fi
45576
45577      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45578$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45579    elif test "x$COMPILE_TYPE" = xcross; then
45580      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45581$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45582    fi
45583    as_fn_error $? "Cannot continue." "$LINENO" 5
45584
45585fi
45586
45587done
45588
45589
45590  # The cast to long int works around a bug in the HP C Compiler
45591# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45592# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45593# This bug is HP SR number 8606223364.
45594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45595$as_echo_n "checking size of int *... " >&6; }
45596if ${ac_cv_sizeof_int_p+:} false; then :
45597  $as_echo_n "(cached) " >&6
45598else
45599  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45600
45601else
45602  if test "$ac_cv_type_int_p" = yes; then
45603     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45605as_fn_error 77 "cannot compute sizeof (int *)
45606See \`config.log' for more details" "$LINENO" 5; }
45607   else
45608     ac_cv_sizeof_int_p=0
45609   fi
45610fi
45611
45612fi
45613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45614$as_echo "$ac_cv_sizeof_int_p" >&6; }
45615
45616
45617
45618cat >>confdefs.h <<_ACEOF
45619#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45620_ACEOF
45621
45622
45623
45624  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
45625  if test "x$ac_cv_sizeof_int_p" = x; then
45626    # The test failed, lets stick to the assumed value.
45627    { $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
45628$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
45629  else
45630    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45631
45632    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45633      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
45634      # Let's try to implicitely set the compilers target architecture and retry the test
45635      { $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
45636$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;}
45637      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
45638$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
45639
45640  # When we add flags to the "official" CFLAGS etc, we need to
45641  # keep track of these additions in ADDED_CFLAGS etc. These
45642  # will later be checked to make sure only controlled additions
45643  # have been made to CFLAGS etc.
45644  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45645  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45646  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
45647
45648  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
45649  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
45650  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
45651
45652  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
45653  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
45654  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
45655
45656
45657      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
45658      unset ac_cv_sizeof_int_p
45659      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
45660      cat >>confdefs.h <<_ACEOF
45661#undef SIZEOF_INT_P
45662_ACEOF
45663
45664      # The cast to long int works around a bug in the HP C Compiler
45665# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
45666# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
45667# This bug is HP SR number 8606223364.
45668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
45669$as_echo_n "checking size of int *... " >&6; }
45670if ${ac_cv_sizeof_int_p+:} false; then :
45671  $as_echo_n "(cached) " >&6
45672else
45673  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
45674
45675else
45676  if test "$ac_cv_type_int_p" = yes; then
45677     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
45678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
45679as_fn_error 77 "cannot compute sizeof (int *)
45680See \`config.log' for more details" "$LINENO" 5; }
45681   else
45682     ac_cv_sizeof_int_p=0
45683   fi
45684fi
45685
45686fi
45687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
45688$as_echo "$ac_cv_sizeof_int_p" >&6; }
45689
45690
45691
45692cat >>confdefs.h <<_ACEOF
45693#define SIZEOF_INT_P $ac_cv_sizeof_int_p
45694_ACEOF
45695
45696
45697
45698      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
45699
45700      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
45701        { $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
45702$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;}
45703        if test "x$COMPILE_TYPE" = xreduced; then
45704
45705  # Print a helpful message on how to acquire the necessary build dependency.
45706  # reduced is the help tag: freetype, cups, alsa etc
45707  MISSING_DEPENDENCY=reduced
45708
45709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45710    cygwin_help $MISSING_DEPENDENCY
45711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45712    msys_help $MISSING_DEPENDENCY
45713  else
45714    PKGHANDLER_COMMAND=
45715
45716    case $PKGHANDLER in
45717      apt-get)
45718        apt_help     $MISSING_DEPENDENCY ;;
45719      yum)
45720        yum_help     $MISSING_DEPENDENCY ;;
45721      port)
45722        port_help    $MISSING_DEPENDENCY ;;
45723      pkgutil)
45724        pkgutil_help $MISSING_DEPENDENCY ;;
45725      pkgadd)
45726        pkgadd_help  $MISSING_DEPENDENCY ;;
45727    esac
45728
45729    if test "x$PKGHANDLER_COMMAND" != x; then
45730      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45731    fi
45732  fi
45733
45734          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
45735$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
45736        elif test "x$COMPILE_TYPE" = xcross; then
45737          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
45738$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
45739        fi
45740        as_fn_error $? "Cannot continue." "$LINENO" 5
45741      fi
45742    fi
45743  fi
45744
45745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
45746$as_echo_n "checking for target address size... " >&6; }
45747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
45748$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
45749
45750
45751  ###############################################################################
45752  #
45753  # Is the target little of big endian?
45754  #
45755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
45756$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
45757if ${ac_cv_c_bigendian+:} false; then :
45758  $as_echo_n "(cached) " >&6
45759else
45760  ac_cv_c_bigendian=unknown
45761    # See if we're dealing with a universal compiler.
45762    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45763/* end confdefs.h.  */
45764#ifndef __APPLE_CC__
45765	       not a universal capable compiler
45766	     #endif
45767	     typedef int dummy;
45768
45769_ACEOF
45770if ac_fn_cxx_try_compile "$LINENO"; then :
45771
45772	# Check for potential -arch flags.  It is not universal unless
45773	# there are at least two -arch flags with different values.
45774	ac_arch=
45775	ac_prev=
45776	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
45777	 if test -n "$ac_prev"; then
45778	   case $ac_word in
45779	     i?86 | x86_64 | ppc | ppc64)
45780	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
45781		 ac_arch=$ac_word
45782	       else
45783		 ac_cv_c_bigendian=universal
45784		 break
45785	       fi
45786	       ;;
45787	   esac
45788	   ac_prev=
45789	 elif test "x$ac_word" = "x-arch"; then
45790	   ac_prev=arch
45791	 fi
45792       done
45793fi
45794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45795    if test $ac_cv_c_bigendian = unknown; then
45796      # See if sys/param.h defines the BYTE_ORDER macro.
45797      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45798/* end confdefs.h.  */
45799#include <sys/types.h>
45800	     #include <sys/param.h>
45801
45802int
45803main ()
45804{
45805#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
45806		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
45807		     && LITTLE_ENDIAN)
45808	      bogus endian macros
45809	     #endif
45810
45811  ;
45812  return 0;
45813}
45814_ACEOF
45815if ac_fn_cxx_try_compile "$LINENO"; then :
45816  # It does; now see whether it defined to BIG_ENDIAN or not.
45817	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45818/* end confdefs.h.  */
45819#include <sys/types.h>
45820		#include <sys/param.h>
45821
45822int
45823main ()
45824{
45825#if BYTE_ORDER != BIG_ENDIAN
45826		 not big endian
45827		#endif
45828
45829  ;
45830  return 0;
45831}
45832_ACEOF
45833if ac_fn_cxx_try_compile "$LINENO"; then :
45834  ac_cv_c_bigendian=yes
45835else
45836  ac_cv_c_bigendian=no
45837fi
45838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45839fi
45840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45841    fi
45842    if test $ac_cv_c_bigendian = unknown; then
45843      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
45844      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45845/* end confdefs.h.  */
45846#include <limits.h>
45847
45848int
45849main ()
45850{
45851#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
45852	      bogus endian macros
45853	     #endif
45854
45855  ;
45856  return 0;
45857}
45858_ACEOF
45859if ac_fn_cxx_try_compile "$LINENO"; then :
45860  # It does; now see whether it defined to _BIG_ENDIAN or not.
45861	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45862/* end confdefs.h.  */
45863#include <limits.h>
45864
45865int
45866main ()
45867{
45868#ifndef _BIG_ENDIAN
45869		 not big endian
45870		#endif
45871
45872  ;
45873  return 0;
45874}
45875_ACEOF
45876if ac_fn_cxx_try_compile "$LINENO"; then :
45877  ac_cv_c_bigendian=yes
45878else
45879  ac_cv_c_bigendian=no
45880fi
45881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45882fi
45883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45884    fi
45885    if test $ac_cv_c_bigendian = unknown; then
45886      # Compile a test program.
45887      if test "$cross_compiling" = yes; then :
45888  # Try to guess by grepping values from an object file.
45889	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45890/* end confdefs.h.  */
45891short int ascii_mm[] =
45892		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
45893		short int ascii_ii[] =
45894		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
45895		int use_ascii (int i) {
45896		  return ascii_mm[i] + ascii_ii[i];
45897		}
45898		short int ebcdic_ii[] =
45899		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
45900		short int ebcdic_mm[] =
45901		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
45902		int use_ebcdic (int i) {
45903		  return ebcdic_mm[i] + ebcdic_ii[i];
45904		}
45905		extern int foo;
45906
45907int
45908main ()
45909{
45910return use_ascii (foo) == use_ebcdic (foo);
45911  ;
45912  return 0;
45913}
45914_ACEOF
45915if ac_fn_cxx_try_compile "$LINENO"; then :
45916  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
45917	      ac_cv_c_bigendian=yes
45918	    fi
45919	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
45920	      if test "$ac_cv_c_bigendian" = unknown; then
45921		ac_cv_c_bigendian=no
45922	      else
45923		# finding both strings is unlikely to happen, but who knows?
45924		ac_cv_c_bigendian=unknown
45925	      fi
45926	    fi
45927fi
45928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45929else
45930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45931/* end confdefs.h.  */
45932$ac_includes_default
45933int
45934main ()
45935{
45936
45937	     /* Are we little or big endian?  From Harbison&Steele.  */
45938	     union
45939	     {
45940	       long int l;
45941	       char c[sizeof (long int)];
45942	     } u;
45943	     u.l = 1;
45944	     return u.c[sizeof (long int) - 1] == 1;
45945
45946  ;
45947  return 0;
45948}
45949_ACEOF
45950if ac_fn_cxx_try_run "$LINENO"; then :
45951  ac_cv_c_bigendian=no
45952else
45953  ac_cv_c_bigendian=yes
45954fi
45955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45956  conftest.$ac_objext conftest.beam conftest.$ac_ext
45957fi
45958
45959    fi
45960fi
45961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
45962$as_echo "$ac_cv_c_bigendian" >&6; }
45963 case $ac_cv_c_bigendian in #(
45964   yes)
45965     ENDIAN="big";; #(
45966   no)
45967     ENDIAN="little" ;; #(
45968   universal)
45969     ENDIAN="universal_endianness"
45970     ;; #(
45971   *)
45972     ENDIAN="unknown" ;;
45973 esac
45974
45975
45976  if test "x$ENDIAN" = xuniversal_endianness; then
45977    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
45978  fi
45979  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
45980    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
45981  fi
45982
45983
45984# Configure flags for the tools
45985
45986  ###############################################################################
45987  #
45988  # How to compile shared libraries.
45989  #
45990
45991  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45992    PICFLAG="-fPIC"
45993    C_FLAG_REORDER=''
45994    CXX_FLAG_REORDER=''
45995
45996    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45997      # Linking is different on MacOSX
45998      if test "x$STATIC_BUILD" = xtrue; then
45999        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46000      else
46001        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46002      fi
46003      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46004      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46005      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46006      SET_SHARED_LIBRARY_MAPFILE=''
46007    else
46008      # Default works for linux, might work on other platforms as well.
46009      SHARED_LIBRARY_FLAGS='-shared'
46010      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46011      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46012      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46013      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46014    fi
46015  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46016    PICFLAG=''
46017    C_FLAG_REORDER=''
46018    CXX_FLAG_REORDER=''
46019
46020    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46021      # Linking is different on MacOSX
46022      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46023      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46024      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46025      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46026      SET_SHARED_LIBRARY_MAPFILE=''
46027    else
46028      # Default works for linux, might work on other platforms as well.
46029      SHARED_LIBRARY_FLAGS='-shared'
46030      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46031      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46032      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46033      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46034    fi
46035  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46036    PICFLAG="-KPIC"
46037    C_FLAG_REORDER='-xF'
46038    CXX_FLAG_REORDER='-xF'
46039    SHARED_LIBRARY_FLAGS="-G"
46040    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46041    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46042    SET_SHARED_LIBRARY_NAME=''
46043    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46044  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46045    PICFLAG="-qpic=large"
46046    C_FLAG_REORDER=''
46047    CXX_FLAG_REORDER=''
46048    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46049    SET_EXECUTABLE_ORIGIN=""
46050    SET_SHARED_LIBRARY_ORIGIN=''
46051    SET_SHARED_LIBRARY_NAME=''
46052    SET_SHARED_LIBRARY_MAPFILE=''
46053  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46054    PICFLAG=""
46055    C_FLAG_REORDER=''
46056    CXX_FLAG_REORDER=''
46057    SHARED_LIBRARY_FLAGS="-LD"
46058    SET_EXECUTABLE_ORIGIN=''
46059    SET_SHARED_LIBRARY_ORIGIN=''
46060    SET_SHARED_LIBRARY_NAME=''
46061    SET_SHARED_LIBRARY_MAPFILE=''
46062  fi
46063
46064
46065
46066
46067
46068
46069
46070
46071  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46072    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46073    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46074    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46075  fi
46076  # The (cross) compiler is now configured, we can now test capabilities
46077  # of the target platform.
46078
46079
46080
46081  ###############################################################################
46082  #
46083  # Setup the opt flags for different compilers
46084  # and different operating systems.
46085  #
46086
46087  # FIXME: this was indirectly the old default, but just inherited.
46088  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46089  #   C_FLAG_DEPS="-MMD -MF"
46090  # fi
46091
46092  # Generate make dependency files
46093  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46094    C_FLAG_DEPS="-MMD -MF"
46095  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46096    C_FLAG_DEPS="-MMD -MF"
46097  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46098    C_FLAG_DEPS="-xMMD -xMF"
46099  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46100    C_FLAG_DEPS="-qmakedep=gcc -MF"
46101  fi
46102  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46103
46104
46105
46106  # Debug symbols
46107  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46108    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46109      # reduce from default "-g2" option to save space
46110      CFLAGS_DEBUG_SYMBOLS="-g1"
46111      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46112    else
46113      CFLAGS_DEBUG_SYMBOLS="-g"
46114      CXXFLAGS_DEBUG_SYMBOLS="-g"
46115    fi
46116  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46117    CFLAGS_DEBUG_SYMBOLS="-g"
46118    CXXFLAGS_DEBUG_SYMBOLS="-g"
46119  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46120    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46121    # FIXME: likely a bug, this disables debug symbols rather than enables them
46122    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46123  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46124    CFLAGS_DEBUG_SYMBOLS="-g"
46125    CXXFLAGS_DEBUG_SYMBOLS="-g"
46126  fi
46127
46128
46129
46130  # bounds, memory and behavior checking options
46131  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46132    case $DEBUG_LEVEL in
46133    release )
46134      # no adjustment
46135      ;;
46136    fastdebug )
46137      # no adjustment
46138      ;;
46139    slowdebug )
46140      # Add runtime stack smashing and undefined behavior checks.
46141      # Not all versions of gcc support -fstack-protector
46142      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46143
46144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46145$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46146  supports=yes
46147
46148  saved_cflags="$CFLAGS"
46149  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46150  ac_ext=c
46151ac_cpp='$CPP $CPPFLAGS'
46152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46154ac_compiler_gnu=$ac_cv_c_compiler_gnu
46155
46156  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46157/* end confdefs.h.  */
46158int i;
46159_ACEOF
46160if ac_fn_c_try_compile "$LINENO"; then :
46161
46162else
46163  supports=no
46164fi
46165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46166  ac_ext=cpp
46167ac_cpp='$CXXCPP $CPPFLAGS'
46168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46171
46172  CFLAGS="$saved_cflags"
46173
46174  saved_cxxflags="$CXXFLAGS"
46175  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46176  ac_ext=cpp
46177ac_cpp='$CXXCPP $CPPFLAGS'
46178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46181
46182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46183/* end confdefs.h.  */
46184int i;
46185_ACEOF
46186if ac_fn_cxx_try_compile "$LINENO"; then :
46187
46188else
46189  supports=no
46190fi
46191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46192  ac_ext=cpp
46193ac_cpp='$CXXCPP $CPPFLAGS'
46194ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46195ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46196ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46197
46198  CXXFLAGS="$saved_cxxflags"
46199
46200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46201$as_echo "$supports" >&6; }
46202  if test "x$supports" = "xyes" ; then
46203    :
46204  else
46205    STACK_PROTECTOR_CFLAG=""
46206  fi
46207
46208
46209      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46210      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46211      ;;
46212    esac
46213  fi
46214
46215  # Optimization levels
46216  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46217    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46218
46219    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46220      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46221      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46222      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46223      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46224      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46225      C_O_FLAG_NONE="-xregs=no%frameptr"
46226      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46227      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46228      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46229      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46230      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46231      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46232        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46233        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46234      fi
46235    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46236      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46237      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46238      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46239      C_O_FLAG_DEBUG=""
46240      C_O_FLAG_NONE=""
46241      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46242      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46243      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46244      C_O_FLAG_DEBUG=""
46245      CXX_O_FLAG_NONE=""
46246    fi
46247  else
46248    # The remaining toolchains share opt flags between CC and CXX;
46249    # setup for C and duplicate afterwards.
46250    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46251      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46252        # On MacOSX we optimize for size, something
46253        # we should do for all platforms?
46254        C_O_FLAG_HIGHEST="-Os"
46255        C_O_FLAG_HI="-Os"
46256        C_O_FLAG_NORM="-Os"
46257      else
46258        C_O_FLAG_HIGHEST="-O3"
46259        C_O_FLAG_HI="-O3"
46260        C_O_FLAG_NORM="-O2"
46261      fi
46262      C_O_FLAG_DEBUG="-O0"
46263      C_O_FLAG_NONE="-O0"
46264    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46265      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46266        # On MacOSX we optimize for size, something
46267        # we should do for all platforms?
46268        C_O_FLAG_HIGHEST="-Os"
46269        C_O_FLAG_HI="-Os"
46270        C_O_FLAG_NORM="-Os"
46271      else
46272        C_O_FLAG_HIGHEST="-O3"
46273        C_O_FLAG_HI="-O3"
46274        C_O_FLAG_NORM="-O2"
46275      fi
46276      C_O_FLAG_DEBUG="-O0"
46277      C_O_FLAG_NONE="-O0"
46278    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46279      C_O_FLAG_HIGHEST="-O3"
46280      C_O_FLAG_HI="-O3 -qstrict"
46281      C_O_FLAG_NORM="-O2"
46282      C_O_FLAG_DEBUG="-qnoopt"
46283      C_O_FLAG_NONE="-qnoop"
46284    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46285      C_O_FLAG_HIGHEST="-O2"
46286      C_O_FLAG_HI="-O1"
46287      C_O_FLAG_NORM="-O1"
46288      C_O_FLAG_DEBUG="-Od"
46289      C_O_FLAG_NONE="-Od"
46290    fi
46291    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46292    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46293    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46294    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46295    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46296  fi
46297
46298  # Adjust optimization flags according to debug level.
46299  case $DEBUG_LEVEL in
46300    release )
46301      # no adjustment
46302      ;;
46303    fastdebug )
46304      # Not quite so much optimization
46305      C_O_FLAG_HI="$C_O_FLAG_NORM"
46306      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46307      ;;
46308    slowdebug )
46309      # Disable optimization
46310      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46311      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46312      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46313      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46314      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46315      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46316      ;;
46317  esac
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331  # Special extras...
46332  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46333    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46334      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46335      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46336    fi
46337    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46338    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46339  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46340    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46341    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46342  fi
46343
46344  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46345  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46346  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46347
46348  ###############################################################################
46349  #
46350  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46351  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46352  #
46353
46354  # Setup compiler/platform specific flags into
46355  #    CFLAGS_JDK    - C Compiler flags
46356  #    CXXFLAGS_JDK  - C++ Compiler flags
46357  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46358  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46359    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46360      # Force compatibility with i586 on 32 bit intel platforms.
46361      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46362    fi
46363    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
46364        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
46365    case $OPENJDK_TARGET_CPU_ARCH in
46366      arm )
46367        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46368        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46369        ;;
46370      ppc )
46371        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
46372        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46373        ;;
46374      * )
46375        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
46376        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
46377        ;;
46378    esac
46379  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46380    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
46381    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
46382      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
46383    fi
46384
46385    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
46386    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
46387  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46388    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46389    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
46390  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46391    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
46392        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
46393        -DWIN32_LEAN_AND_MEAN \
46394        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
46395        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
46396        -DWIN32 -DIAL"
46397    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
46398      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
46399    else
46400      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
46401    fi
46402    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
46403    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
46404    # studio.
46405    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
46406      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46407          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
46408    fi
46409  fi
46410
46411  ###############################################################################
46412
46413  # Adjust flags according to debug level.
46414  case $DEBUG_LEVEL in
46415    fastdebug | slowdebug )
46416      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
46417      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
46418      JAVAC_FLAGS="$JAVAC_FLAGS -g"
46419      ;;
46420    release )
46421      ;;
46422    * )
46423      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46424      ;;
46425  esac
46426
46427  # Setup LP64
46428  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
46429
46430  # Set some common defines. These works for all compilers, but assume
46431  # -D is universally accepted.
46432
46433  # Setup endianness
46434  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
46435    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
46436    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
46437    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
46438    #   Note: -Dmacro         is the same as    #define macro 1
46439    #         -Dmacro=        is the same as    #define macro
46440    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46441      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
46442    else
46443      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
46444    fi
46445  else
46446    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
46447    # are defined in the system?
46448    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46449      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
46450    else
46451      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
46452    fi
46453  fi
46454
46455  # Setup target OS define. Use OS target name but in upper case.
46456  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
46457  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
46458
46459  # Setup target CPU
46460  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
46461
46462  # Setup debug/release defines
46463  if test "x$DEBUG_LEVEL" = xrelease; then
46464    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
46465    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46466      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
46467    fi
46468  else
46469    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
46470  fi
46471
46472  # Setup release name
46473  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
46474
46475
46476  # Set some additional per-OS defines.
46477  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46478    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
46479  elif test "x$OPENJDK_TARGET_OS" = xaix; then
46480    # FIXME: PPC64 should not be here.
46481    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
46482  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
46483    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
46484  fi
46485
46486  # Additional macosx handling
46487  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46488    # Setting these parameters makes it an error to link to macosx APIs that are
46489    # newer than the given OS version and makes the linked binaries compatible
46490    # even if built on a newer version of the OS.
46491    # The expected format is X.Y.Z
46492    MACOSX_VERSION_MIN=10.7.0
46493
46494
46495    # The macro takes the version with no dots, ex: 1070
46496    # Let the flags variables get resolved in make for easier override on make
46497    # command line.
46498    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46499    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
46500  fi
46501
46502  # Setup some hard coded includes
46503  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
46504      -I${JDK_TOPDIR}/src/java.base/share/native/include \
46505      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
46506      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
46507      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
46508      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
46509
46510  # The shared libraries are compiled using the picflag.
46511  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46512  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46513
46514  # Executable flags
46515  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46516  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46517
46518
46519
46520
46521
46522
46523  # Flags for compiling test libraries
46524  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
46525  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
46526
46527  # Flags for compiling test executables
46528  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
46529  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
46530
46531
46532
46533
46534
46535
46536  # Setup LDFLAGS et al.
46537  #
46538
46539  # Now this is odd. The JDK native libraries have to link against libjvm.so
46540  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
46541  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
46542  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
46543  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
46544  # libraries will link to whatever is in memory. Yuck.
46545  #
46546  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
46547  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46548    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
46549    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46550      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
46551    fi
46552    # TODO: make -debug optional "--disable-full-debug-symbols"
46553    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
46554  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46555    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46556    # We have previously set HAS_GNU_HASH if this is the case
46557    if test -n "$HAS_GNU_HASH"; then
46558      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
46559    fi
46560    if test "x$OPENJDK_TARGET_OS" = xlinux; then
46561      # And since we now know that the linker is gnu, then add -z defs, to forbid
46562      # undefined symbols in object files.
46563      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
46564      case $DEBUG_LEVEL in
46565        release )
46566          # tell linker to optimize libraries.
46567          # Should this be supplied to the OSS linker as well?
46568          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
46569          ;;
46570        slowdebug )
46571          if test "x$HAS_LINKER_NOW" = "xtrue"; then
46572            # do relocations at load
46573            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
46574            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
46575          fi
46576          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46577            # mark relocations read only
46578            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46579            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46580          fi
46581          ;;
46582        fastdebug )
46583          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
46584            # mark relocations read only
46585            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
46586            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
46587          fi
46588          ;;
46589        * )
46590          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
46591          ;;
46592        esac
46593    fi
46594  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46595    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
46596    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
46597  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46598    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
46599  fi
46600
46601  # Customize LDFLAGS for executables
46602
46603  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
46604
46605  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46606    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
46607      LDFLAGS_STACK_SIZE=1048576
46608    else
46609      LDFLAGS_STACK_SIZE=327680
46610    fi
46611    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
46612  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
46613    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
46614  fi
46615
46616  # Customize LDFLAGS for libs
46617  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
46618
46619  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46620    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
46621    JDKLIB_LIBS=""
46622  else
46623    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
46624        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
46625
46626    # On some platforms (mac) the linker warns about non existing -L dirs.
46627    # Add server first if available. Linking aginst client does not always produce the same results.
46628    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
46629    # Default to server for other variants.
46630    if test "x$JVM_VARIANT_SERVER" = xtrue; then
46631      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46632    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
46633      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
46634    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
46635      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
46636    else
46637      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
46638    fi
46639
46640    JDKLIB_LIBS="-ljava -ljvm"
46641    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46642      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
46643    fi
46644  fi
46645
46646
46647
46648
46649
46650
46651
46652  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
46653  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
46654
46655
46656
46657
46658
46659  # Some Zero and Shark settings.
46660  # ZERO_ARCHFLAG tells the compiler which mode to build for
46661  case "${OPENJDK_TARGET_CPU}" in
46662    s390)
46663      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
46664      ;;
46665    *)
46666      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46667  esac
46668
46669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
46670$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
46671  supports=yes
46672
46673  saved_cflags="$CFLAGS"
46674  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
46675  ac_ext=c
46676ac_cpp='$CPP $CPPFLAGS'
46677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46679ac_compiler_gnu=$ac_cv_c_compiler_gnu
46680
46681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46682/* end confdefs.h.  */
46683int i;
46684_ACEOF
46685if ac_fn_c_try_compile "$LINENO"; then :
46686
46687else
46688  supports=no
46689fi
46690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46691  ac_ext=cpp
46692ac_cpp='$CXXCPP $CPPFLAGS'
46693ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46694ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46695ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46696
46697  CFLAGS="$saved_cflags"
46698
46699  saved_cxxflags="$CXXFLAGS"
46700  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
46701  ac_ext=cpp
46702ac_cpp='$CXXCPP $CPPFLAGS'
46703ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46704ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46705ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46706
46707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46708/* end confdefs.h.  */
46709int i;
46710_ACEOF
46711if ac_fn_cxx_try_compile "$LINENO"; then :
46712
46713else
46714  supports=no
46715fi
46716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46717  ac_ext=cpp
46718ac_cpp='$CXXCPP $CPPFLAGS'
46719ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46720ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46721ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46722
46723  CXXFLAGS="$saved_cxxflags"
46724
46725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46726$as_echo "$supports" >&6; }
46727  if test "x$supports" = "xyes" ; then
46728    :
46729  else
46730    ZERO_ARCHFLAG=""
46731  fi
46732
46733
46734
46735  # Check that the compiler supports -mX (or -qX on AIX) flags
46736  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
46737
46738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
46739$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
46740  supports=yes
46741
46742  saved_cflags="$CFLAGS"
46743  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46744  ac_ext=c
46745ac_cpp='$CPP $CPPFLAGS'
46746ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46747ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46748ac_compiler_gnu=$ac_cv_c_compiler_gnu
46749
46750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46751/* end confdefs.h.  */
46752int i;
46753_ACEOF
46754if ac_fn_c_try_compile "$LINENO"; then :
46755
46756else
46757  supports=no
46758fi
46759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46760  ac_ext=cpp
46761ac_cpp='$CXXCPP $CPPFLAGS'
46762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46765
46766  CFLAGS="$saved_cflags"
46767
46768  saved_cxxflags="$CXXFLAGS"
46769  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46770  ac_ext=cpp
46771ac_cpp='$CXXCPP $CPPFLAGS'
46772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46775
46776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46777/* end confdefs.h.  */
46778int i;
46779_ACEOF
46780if ac_fn_cxx_try_compile "$LINENO"; then :
46781
46782else
46783  supports=no
46784fi
46785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46786  ac_ext=cpp
46787ac_cpp='$CXXCPP $CPPFLAGS'
46788ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46789ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46790ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46791
46792  CXXFLAGS="$saved_cxxflags"
46793
46794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46795$as_echo "$supports" >&6; }
46796  if test "x$supports" = "xyes" ; then
46797    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
46798  else
46799    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
46800  fi
46801
46802
46803
46804  # Check whether --enable-warnings-as-errors was given.
46805if test "${enable_warnings_as_errors+set}" = set; then :
46806  enableval=$enable_warnings_as_errors;
46807fi
46808
46809
46810  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
46811$as_echo_n "checking if native warnings are errors... " >&6; }
46812  if test "x$enable_warnings_as_errors" = "xyes"; then
46813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
46814$as_echo "yes (explicitely set)" >&6; }
46815    WARNINGS_AS_ERRORS=true
46816  elif test "x$enable_warnings_as_errors" = "xno"; then
46817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46818$as_echo "no" >&6; }
46819    WARNINGS_AS_ERRORS=false
46820  elif test "x$enable_warnings_as_errors" = "x"; then
46821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
46822$as_echo "yes (default)" >&6; }
46823    WARNINGS_AS_ERRORS=true
46824  else
46825    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
46826  fi
46827
46828  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
46829    # Set legacy hotspot variable
46830    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
46831  else
46832    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
46833  fi
46834
46835
46836
46837
46838  case "${TOOLCHAIN_TYPE}" in
46839    microsoft)
46840      DISABLE_WARNING_PREFIX="-wd"
46841      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
46842      ;;
46843    solstudio)
46844      DISABLE_WARNING_PREFIX="-erroff="
46845      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
46846      ;;
46847    gcc)
46848      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
46849
46850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46851$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46852  supports=yes
46853
46854  saved_cflags="$CFLAGS"
46855  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46856  ac_ext=c
46857ac_cpp='$CPP $CPPFLAGS'
46858ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46859ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46860ac_compiler_gnu=$ac_cv_c_compiler_gnu
46861
46862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46863/* end confdefs.h.  */
46864int i;
46865_ACEOF
46866if ac_fn_c_try_compile "$LINENO"; then :
46867
46868else
46869  supports=no
46870fi
46871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46872  ac_ext=cpp
46873ac_cpp='$CXXCPP $CPPFLAGS'
46874ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46875ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46876ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46877
46878  CFLAGS="$saved_cflags"
46879
46880  saved_cxxflags="$CXXFLAGS"
46881  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46882  ac_ext=cpp
46883ac_cpp='$CXXCPP $CPPFLAGS'
46884ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46885ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46886ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46887
46888  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46889/* end confdefs.h.  */
46890int i;
46891_ACEOF
46892if ac_fn_cxx_try_compile "$LINENO"; then :
46893
46894else
46895  supports=no
46896fi
46897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46898  ac_ext=cpp
46899ac_cpp='$CXXCPP $CPPFLAGS'
46900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46903
46904  CXXFLAGS="$saved_cxxflags"
46905
46906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46907$as_echo "$supports" >&6; }
46908  if test "x$supports" = "xyes" ; then
46909    GCC_CAN_DISABLE_WARNINGS=true
46910  else
46911    GCC_CAN_DISABLE_WARNINGS=false
46912
46913  fi
46914
46915      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46916        DISABLE_WARNING_PREFIX="-Wno-"
46917      else
46918        DISABLE_WARNING_PREFIX=
46919      fi
46920      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
46921      # Repeate the check for the BUILD_CC
46922      CC_OLD="$CC"
46923      CC="$BUILD_CC"
46924
46925  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
46926$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
46927  supports=yes
46928
46929  saved_cflags="$CFLAGS"
46930  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
46931  ac_ext=c
46932ac_cpp='$CPP $CPPFLAGS'
46933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46935ac_compiler_gnu=$ac_cv_c_compiler_gnu
46936
46937  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46938/* end confdefs.h.  */
46939int i;
46940_ACEOF
46941if ac_fn_c_try_compile "$LINENO"; then :
46942
46943else
46944  supports=no
46945fi
46946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46947  ac_ext=cpp
46948ac_cpp='$CXXCPP $CPPFLAGS'
46949ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46950ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46951ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46952
46953  CFLAGS="$saved_cflags"
46954
46955  saved_cxxflags="$CXXFLAGS"
46956  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
46957  ac_ext=cpp
46958ac_cpp='$CXXCPP $CPPFLAGS'
46959ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46960ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46961ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46962
46963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46964/* end confdefs.h.  */
46965int i;
46966_ACEOF
46967if ac_fn_cxx_try_compile "$LINENO"; then :
46968
46969else
46970  supports=no
46971fi
46972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46973  ac_ext=cpp
46974ac_cpp='$CXXCPP $CPPFLAGS'
46975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46978
46979  CXXFLAGS="$saved_cxxflags"
46980
46981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46982$as_echo "$supports" >&6; }
46983  if test "x$supports" = "xyes" ; then
46984    BUILD_CC_CAN_DISABLE_WARNINGS=true
46985  else
46986    BUILD_CC_CAN_DISABLE_WARNINGS=false
46987
46988  fi
46989
46990      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
46991        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
46992      else
46993        BUILD_CC_DISABLE_WARNING_PREFIX=
46994      fi
46995      CC="$CC_OLD"
46996      ;;
46997    clang)
46998      DISABLE_WARNING_PREFIX="-Wno-"
46999      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47000      ;;
47001  esac
47002
47003
47004
47005
47006# Setup debug symbols (need objcopy from the toolchain for that)
47007
47008  #
47009  # ENABLE_DEBUG_SYMBOLS
47010  # This must be done after the toolchain is setup, since we're looking at objcopy.
47011  #
47012  # Check whether --enable-debug-symbols was given.
47013if test "${enable_debug_symbols+set}" = set; then :
47014  enableval=$enable_debug_symbols;
47015fi
47016
47017
47018  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
47019$as_echo_n "checking if we should generate debug symbols... " >&6; }
47020
47021  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
47022    # explicit enabling of enable-debug-symbols and can't find objcopy
47023    #   this is an error
47024    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47025  fi
47026
47027  if test "x$enable_debug_symbols" = "xyes"; then
47028    ENABLE_DEBUG_SYMBOLS=true
47029  elif test "x$enable_debug_symbols" = "xno"; then
47030    ENABLE_DEBUG_SYMBOLS=false
47031  else
47032    # Default is on if objcopy is found
47033    if test "x$OBJCOPY" != x; then
47034      ENABLE_DEBUG_SYMBOLS=true
47035    # MacOS X and Windows don't use objcopy but default is on for those OSes
47036    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
47037      ENABLE_DEBUG_SYMBOLS=true
47038    else
47039      ENABLE_DEBUG_SYMBOLS=false
47040    fi
47041  fi
47042
47043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
47044$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
47045
47046  #
47047  # ZIP_DEBUGINFO_FILES
47048  #
47049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
47050$as_echo_n "checking if we should zip debug-info files... " >&6; }
47051  # Check whether --enable-zip-debug-info was given.
47052if test "${enable_zip_debug_info+set}" = set; then :
47053  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
47054else
47055  enable_zip_debug_info="yes"
47056fi
47057
47058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
47059$as_echo "${enable_zip_debug_info}" >&6; }
47060
47061  if test "x${enable_zip_debug_info}" = "xno"; then
47062    ZIP_DEBUGINFO_FILES=false
47063  else
47064    ZIP_DEBUGINFO_FILES=true
47065  fi
47066
47067
47068
47069
47070
47071  # Check whether --enable-native-coverage was given.
47072if test "${enable_native_coverage+set}" = set; then :
47073  enableval=$enable_native_coverage;
47074fi
47075
47076  GCOV_ENABLED="false"
47077  if test "x$enable_native_coverage" = "xyes"; then
47078    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47080$as_echo_n "checking if native coverage is enabled... " >&6; }
47081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47082$as_echo "yes" >&6; }
47083      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47084      GCOV_LDFLAGS="-fprofile-arcs"
47085      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47086      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47087      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47088      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47089      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47090      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47091      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47092      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47093      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47094      GCOV_ENABLED="true"
47095    else
47096      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47097    fi
47098  elif test "x$enable_native_coverage" = "xno"; then
47099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47100$as_echo_n "checking if native coverage is enabled... " >&6; }
47101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47102$as_echo "no" >&6; }
47103  elif test "x$enable_native_coverage" != "x"; then
47104    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47105  fi
47106
47107
47108
47109
47110###############################################################################
47111#
47112# Check dependencies for external and internal libraries.
47113#
47114###############################################################################
47115
47116# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47117
47118  # When using cygwin or msys, we need a wrapper binary that renames
47119  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47120  # @files and rewrites these too! This wrapper binary is
47121  # called fixpath.
47122  FIXPATH=
47123  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47125$as_echo_n "checking if fixpath can be created... " >&6; }
47126    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47127    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47128    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47129    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47130      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47131      FIXPATH="$FIXPATH_BIN -c"
47132    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47133      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47134      # @ was chosen as separator to minimize risk of other tools messing around with it
47135      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47136          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47137      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47138      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47139    fi
47140    FIXPATH_SRC_W="$FIXPATH_SRC"
47141    FIXPATH_BIN_W="$FIXPATH_BIN"
47142
47143  unix_path="$FIXPATH_SRC_W"
47144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47145    windows_path=`$CYGPATH -m "$unix_path"`
47146    FIXPATH_SRC_W="$windows_path"
47147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47148    windows_path=`cmd //c echo $unix_path`
47149    FIXPATH_SRC_W="$windows_path"
47150  fi
47151
47152
47153  unix_path="$FIXPATH_BIN_W"
47154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47155    windows_path=`$CYGPATH -m "$unix_path"`
47156    FIXPATH_BIN_W="$windows_path"
47157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47158    windows_path=`cmd //c echo $unix_path`
47159    FIXPATH_BIN_W="$windows_path"
47160  fi
47161
47162    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47163    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47164    cd $FIXPATH_DIR
47165    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47166    cd $CURDIR
47167
47168    if test ! -x $FIXPATH_BIN; then
47169      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47170$as_echo "no" >&6; }
47171      cat $FIXPATH_DIR/fixpath1.log
47172      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47173    fi
47174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47175$as_echo "yes" >&6; }
47176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47177$as_echo_n "checking if fixpath.exe works... " >&6; }
47178    cd $FIXPATH_DIR
47179    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47180        > $FIXPATH_DIR/fixpath2.log 2>&1
47181    cd $CURDIR
47182    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47184$as_echo "no" >&6; }
47185      cat $FIXPATH_DIR/fixpath2.log
47186      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47187    fi
47188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47189$as_echo "yes" >&6; }
47190
47191    FIXPATH_DETACH_FLAG="--detach"
47192  fi
47193
47194
47195
47196
47197
47198
47199  # Check if X11 is needed
47200  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47201    # No X11 support on windows or macosx
47202    NEEDS_LIB_X11=false
47203  else
47204    if test "x$SUPPORT_HEADFUL" = xno; then
47205      # No X11 support if building headless-only
47206      NEEDS_LIB_X11=false
47207    else
47208      # All other instances need X11
47209      NEEDS_LIB_X11=true
47210    fi
47211  fi
47212
47213  # Check if cups is needed
47214  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47215    # Windows have a separate print system
47216    NEEDS_LIB_CUPS=false
47217  else
47218    NEEDS_LIB_CUPS=true
47219  fi
47220
47221  # Check if freetype is needed
47222  if test "x$OPENJDK" = "xtrue"; then
47223    NEEDS_LIB_FREETYPE=true
47224  else
47225    NEEDS_LIB_FREETYPE=false
47226  fi
47227
47228  # Check if alsa is needed
47229  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47230    NEEDS_LIB_ALSA=true
47231  else
47232    NEEDS_LIB_ALSA=false
47233  fi
47234
47235  # Check if ffi is needed
47236  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47237    NEEDS_LIB_FFI=true
47238  else
47239    NEEDS_LIB_FFI=false
47240  fi
47241
47242
47243  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47244  # dynamic build is configured on command line.
47245
47246# Check whether --with-stdc++lib was given.
47247if test "${with_stdc__lib+set}" = set; then :
47248  withval=$with_stdc__lib;
47249        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47250                && test "x$with_stdc__lib" != xdefault; then
47251          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47252        fi
47253
47254else
47255  with_stdc__lib=default
47256
47257fi
47258
47259
47260  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47261    # Test if -lstdc++ works.
47262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47263$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47264    ac_ext=cpp
47265ac_cpp='$CXXCPP $CPPFLAGS'
47266ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47267ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47268ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47269
47270    OLD_CXXFLAGS="$CXXFLAGS"
47271    CXXFLAGS="$CXXFLAGS -lstdc++"
47272    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47273/* end confdefs.h.  */
47274
47275int
47276main ()
47277{
47278return 0;
47279  ;
47280  return 0;
47281}
47282_ACEOF
47283if ac_fn_cxx_try_link "$LINENO"; then :
47284  has_dynamic_libstdcxx=yes
47285else
47286  has_dynamic_libstdcxx=no
47287fi
47288rm -f core conftest.err conftest.$ac_objext \
47289    conftest$ac_exeext conftest.$ac_ext
47290    CXXFLAGS="$OLD_CXXFLAGS"
47291    ac_ext=cpp
47292ac_cpp='$CXXCPP $CPPFLAGS'
47293ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47294ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47295ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47296
47297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47298$as_echo "$has_dynamic_libstdcxx" >&6; }
47299
47300    # Test if stdc++ can be linked statically.
47301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47302$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47303    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47304    ac_ext=cpp
47305ac_cpp='$CXXCPP $CPPFLAGS'
47306ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47307ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47308ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47309
47310    OLD_LIBS="$LIBS"
47311    OLD_CXX="$CXX"
47312    LIBS="$STATIC_STDCXX_FLAGS"
47313    CXX="$CC"
47314    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47315/* end confdefs.h.  */
47316
47317int
47318main ()
47319{
47320return 0;
47321  ;
47322  return 0;
47323}
47324_ACEOF
47325if ac_fn_cxx_try_link "$LINENO"; then :
47326  has_static_libstdcxx=yes
47327else
47328  has_static_libstdcxx=no
47329fi
47330rm -f core conftest.err conftest.$ac_objext \
47331    conftest$ac_exeext conftest.$ac_ext
47332    LIBS="$OLD_LIBS"
47333    CXX="$OLD_CXX"
47334    ac_ext=cpp
47335ac_cpp='$CXXCPP $CPPFLAGS'
47336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47339
47340    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47341$as_echo "$has_static_libstdcxx" >&6; }
47342
47343    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47344      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47345    fi
47346
47347    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47348      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47349    fi
47350
47351    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47352      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47353    fi
47354
47355    # If dynamic was requested, it's available since it would fail above otherwise.
47356    # If dynamic wasn't requested, go with static unless it isn't available.
47357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47358$as_echo_n "checking how to link with libstdc++... " >&6; }
47359    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47360      LIBCXX="$LIBCXX -lstdc++"
47361      LDCXX="$CXX"
47362      STATIC_CXX_SETTING="STATIC_CXX=false"
47363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47364$as_echo "dynamic" >&6; }
47365    else
47366      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47367      LDCXX="$CC"
47368      STATIC_CXX_SETTING="STATIC_CXX=true"
47369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47370$as_echo "static" >&6; }
47371    fi
47372  fi
47373
47374
47375  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47376  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47377    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47378  fi
47379
47380  # TODO better (platform agnostic) test
47381  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47382    LIBCXX="-lstdc++"
47383  fi
47384
47385
47386  # Setup Windows runtime dlls
47387  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47388
47389
47390# Check whether --with-msvcr-dll was given.
47391if test "${with_msvcr_dll+set}" = set; then :
47392  withval=$with_msvcr_dll;
47393fi
47394
47395
47396  if test "x$with_msvcr_dll" != x; then
47397    # If given explicitely by user, do not probe. If not present, fail directly.
47398
47399  DLL_NAME="$MSVCR_NAME"
47400  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
47401  METHOD="--with-msvcr-dll"
47402  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47403    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47404$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47405
47406    # Need to check if the found msvcr is correct architecture
47407    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47408$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47409    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47411      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47412      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47413      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47414        CORRECT_MSVCR_ARCH="PE32 executable"
47415      else
47416        CORRECT_MSVCR_ARCH="PE32+ executable"
47417      fi
47418    else
47419      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47420        CORRECT_MSVCR_ARCH=386
47421      else
47422        CORRECT_MSVCR_ARCH=x86-64
47423      fi
47424    fi
47425    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47427$as_echo "ok" >&6; }
47428      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47429
47430  # Only process if variable expands to non-empty
47431
47432  if test "x$MSVC_DLL" != x; then
47433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47434
47435  # Input might be given as Windows format, start by converting to
47436  # unix format.
47437  path="$MSVC_DLL"
47438  new_path=`$CYGPATH -u "$path"`
47439
47440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47443  # "foo.exe" is OK but "foo" is an error.
47444  #
47445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47446  # It is also a way to make sure we got the proper file name for the real test later on.
47447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47448  if test "x$test_shortpath" = x; then
47449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47450$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47451    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47452  fi
47453
47454  # Call helper function which possibly converts this using DOS-style short mode.
47455  # If so, the updated path is stored in $new_path.
47456
47457  input_path="$new_path"
47458  # Check if we need to convert this using DOS-style short mode. If the path
47459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47460  # take no chances and rewrite it.
47461  # Note: m4 eats our [], so we need to use [ and ] instead.
47462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47463  if test "x$has_forbidden_chars" != x; then
47464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47468      # Going to short mode and back again did indeed matter. Since short mode is
47469      # case insensitive, let's make it lowercase to improve readability.
47470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47471      # Now convert it back to Unix-style (cygpath)
47472      input_path=`$CYGPATH -u "$shortmode_path"`
47473      new_path="$input_path"
47474    fi
47475  fi
47476
47477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47478  if test "x$test_cygdrive_prefix" = x; then
47479    # As a simple fix, exclude /usr/bin since it's not a real path.
47480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47482      # a path prefixed by /cygdrive for fixpath to work.
47483      new_path="$CYGWIN_ROOT_PATH$input_path"
47484    fi
47485  fi
47486
47487
47488  if test "x$path" != "x$new_path"; then
47489    MSVC_DLL="$new_path"
47490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47491$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47492  fi
47493
47494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47495
47496  path="$MSVC_DLL"
47497  has_colon=`$ECHO $path | $GREP ^.:`
47498  new_path="$path"
47499  if test "x$has_colon" = x; then
47500    # Not in mixed or Windows style, start by that.
47501    new_path=`cmd //c echo $path`
47502  fi
47503
47504
47505  input_path="$new_path"
47506  # Check if we need to convert this using DOS-style short mode. If the path
47507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47508  # take no chances and rewrite it.
47509  # Note: m4 eats our [], so we need to use [ and ] instead.
47510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47511  if test "x$has_forbidden_chars" != x; then
47512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47514  fi
47515
47516
47517  windows_path="$new_path"
47518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47519    unix_path=`$CYGPATH -u "$windows_path"`
47520    new_path="$unix_path"
47521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47523    new_path="$unix_path"
47524  fi
47525
47526  if test "x$path" != "x$new_path"; then
47527    MSVC_DLL="$new_path"
47528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47529$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47530  fi
47531
47532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47534
47535    else
47536      # We're on a unix platform. Hooray! :)
47537      path="$MSVC_DLL"
47538      has_space=`$ECHO "$path" | $GREP " "`
47539      if test "x$has_space" != x; then
47540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47541$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47543      fi
47544
47545      # Use eval to expand a potential ~
47546      eval path="$path"
47547      if test ! -f "$path" && test ! -d "$path"; then
47548        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47549      fi
47550
47551      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47552    fi
47553  fi
47554
47555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47556$as_echo_n "checking for $DLL_NAME... " >&6; }
47557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47558$as_echo "$MSVC_DLL" >&6; }
47559    else
47560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47561$as_echo "incorrect, ignoring" >&6; }
47562      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47563$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47564    fi
47565  fi
47566
47567    if test "x$MSVC_DLL" = x; then
47568      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
47569    fi
47570    MSVCR_DLL="$MSVC_DLL"
47571  elif test "x$DEVKIT_MSVCR_DLL" != x; then
47572
47573  DLL_NAME="$MSVCR_NAME"
47574  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
47575  METHOD="devkit"
47576  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47577    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47578$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47579
47580    # Need to check if the found msvcr is correct architecture
47581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47582$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47583    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47585      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47586      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47587      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47588        CORRECT_MSVCR_ARCH="PE32 executable"
47589      else
47590        CORRECT_MSVCR_ARCH="PE32+ executable"
47591      fi
47592    else
47593      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47594        CORRECT_MSVCR_ARCH=386
47595      else
47596        CORRECT_MSVCR_ARCH=x86-64
47597      fi
47598    fi
47599    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47601$as_echo "ok" >&6; }
47602      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47603
47604  # Only process if variable expands to non-empty
47605
47606  if test "x$MSVC_DLL" != x; then
47607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47608
47609  # Input might be given as Windows format, start by converting to
47610  # unix format.
47611  path="$MSVC_DLL"
47612  new_path=`$CYGPATH -u "$path"`
47613
47614  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47615  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47616  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47617  # "foo.exe" is OK but "foo" is an error.
47618  #
47619  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47620  # It is also a way to make sure we got the proper file name for the real test later on.
47621  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47622  if test "x$test_shortpath" = x; then
47623    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47624$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47625    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47626  fi
47627
47628  # Call helper function which possibly converts this using DOS-style short mode.
47629  # If so, the updated path is stored in $new_path.
47630
47631  input_path="$new_path"
47632  # Check if we need to convert this using DOS-style short mode. If the path
47633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47634  # take no chances and rewrite it.
47635  # Note: m4 eats our [], so we need to use [ and ] instead.
47636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47637  if test "x$has_forbidden_chars" != x; then
47638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47639    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47640    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47641    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47642      # Going to short mode and back again did indeed matter. Since short mode is
47643      # case insensitive, let's make it lowercase to improve readability.
47644      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47645      # Now convert it back to Unix-style (cygpath)
47646      input_path=`$CYGPATH -u "$shortmode_path"`
47647      new_path="$input_path"
47648    fi
47649  fi
47650
47651  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47652  if test "x$test_cygdrive_prefix" = x; then
47653    # As a simple fix, exclude /usr/bin since it's not a real path.
47654    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47655      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47656      # a path prefixed by /cygdrive for fixpath to work.
47657      new_path="$CYGWIN_ROOT_PATH$input_path"
47658    fi
47659  fi
47660
47661
47662  if test "x$path" != "x$new_path"; then
47663    MSVC_DLL="$new_path"
47664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47665$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47666  fi
47667
47668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47669
47670  path="$MSVC_DLL"
47671  has_colon=`$ECHO $path | $GREP ^.:`
47672  new_path="$path"
47673  if test "x$has_colon" = x; then
47674    # Not in mixed or Windows style, start by that.
47675    new_path=`cmd //c echo $path`
47676  fi
47677
47678
47679  input_path="$new_path"
47680  # Check if we need to convert this using DOS-style short mode. If the path
47681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47682  # take no chances and rewrite it.
47683  # Note: m4 eats our [], so we need to use [ and ] instead.
47684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47685  if test "x$has_forbidden_chars" != x; then
47686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47688  fi
47689
47690
47691  windows_path="$new_path"
47692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47693    unix_path=`$CYGPATH -u "$windows_path"`
47694    new_path="$unix_path"
47695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47697    new_path="$unix_path"
47698  fi
47699
47700  if test "x$path" != "x$new_path"; then
47701    MSVC_DLL="$new_path"
47702    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47703$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47704  fi
47705
47706  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47707  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47708
47709    else
47710      # We're on a unix platform. Hooray! :)
47711      path="$MSVC_DLL"
47712      has_space=`$ECHO "$path" | $GREP " "`
47713      if test "x$has_space" != x; then
47714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47715$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47716        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47717      fi
47718
47719      # Use eval to expand a potential ~
47720      eval path="$path"
47721      if test ! -f "$path" && test ! -d "$path"; then
47722        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47723      fi
47724
47725      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47726    fi
47727  fi
47728
47729      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47730$as_echo_n "checking for $DLL_NAME... " >&6; }
47731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47732$as_echo "$MSVC_DLL" >&6; }
47733    else
47734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47735$as_echo "incorrect, ignoring" >&6; }
47736      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47737$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47738    fi
47739  fi
47740
47741    if test "x$MSVC_DLL" = x; then
47742      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
47743    fi
47744    MSVCR_DLL="$MSVC_DLL"
47745  else
47746
47747  DLL_NAME="${MSVCR_NAME}"
47748  MSVC_DLL=
47749
47750  if test "x$MSVC_DLL" = x; then
47751    # Probe: Using well-known location from Visual Studio 10.0
47752    if test "x$VCINSTALLDIR" != x; then
47753      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47754
47755  windows_path="$CYGWIN_VC_INSTALL_DIR"
47756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47757    unix_path=`$CYGPATH -u "$windows_path"`
47758    CYGWIN_VC_INSTALL_DIR="$unix_path"
47759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47761    CYGWIN_VC_INSTALL_DIR="$unix_path"
47762  fi
47763
47764      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47765        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47766      else
47767        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
47768      fi
47769      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
47770
47771  DLL_NAME="$DLL_NAME"
47772  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47773  METHOD="well-known location in VCINSTALLDIR"
47774  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47776$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47777
47778    # Need to check if the found msvcr is correct architecture
47779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47780$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47781    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47783      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47784      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47786        CORRECT_MSVCR_ARCH="PE32 executable"
47787      else
47788        CORRECT_MSVCR_ARCH="PE32+ executable"
47789      fi
47790    else
47791      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47792        CORRECT_MSVCR_ARCH=386
47793      else
47794        CORRECT_MSVCR_ARCH=x86-64
47795      fi
47796    fi
47797    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47798      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47799$as_echo "ok" >&6; }
47800      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47801
47802  # Only process if variable expands to non-empty
47803
47804  if test "x$MSVC_DLL" != x; then
47805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47806
47807  # Input might be given as Windows format, start by converting to
47808  # unix format.
47809  path="$MSVC_DLL"
47810  new_path=`$CYGPATH -u "$path"`
47811
47812  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47813  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47814  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47815  # "foo.exe" is OK but "foo" is an error.
47816  #
47817  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47818  # It is also a way to make sure we got the proper file name for the real test later on.
47819  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47820  if test "x$test_shortpath" = x; then
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47822$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47823    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47824  fi
47825
47826  # Call helper function which possibly converts this using DOS-style short mode.
47827  # If so, the updated path is stored in $new_path.
47828
47829  input_path="$new_path"
47830  # Check if we need to convert this using DOS-style short mode. If the path
47831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47832  # take no chances and rewrite it.
47833  # Note: m4 eats our [], so we need to use [ and ] instead.
47834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47835  if test "x$has_forbidden_chars" != x; then
47836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47840      # Going to short mode and back again did indeed matter. Since short mode is
47841      # case insensitive, let's make it lowercase to improve readability.
47842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47843      # Now convert it back to Unix-style (cygpath)
47844      input_path=`$CYGPATH -u "$shortmode_path"`
47845      new_path="$input_path"
47846    fi
47847  fi
47848
47849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47850  if test "x$test_cygdrive_prefix" = x; then
47851    # As a simple fix, exclude /usr/bin since it's not a real path.
47852    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47854      # a path prefixed by /cygdrive for fixpath to work.
47855      new_path="$CYGWIN_ROOT_PATH$input_path"
47856    fi
47857  fi
47858
47859
47860  if test "x$path" != "x$new_path"; then
47861    MSVC_DLL="$new_path"
47862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47863$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47864  fi
47865
47866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47867
47868  path="$MSVC_DLL"
47869  has_colon=`$ECHO $path | $GREP ^.:`
47870  new_path="$path"
47871  if test "x$has_colon" = x; then
47872    # Not in mixed or Windows style, start by that.
47873    new_path=`cmd //c echo $path`
47874  fi
47875
47876
47877  input_path="$new_path"
47878  # Check if we need to convert this using DOS-style short mode. If the path
47879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47880  # take no chances and rewrite it.
47881  # Note: m4 eats our [], so we need to use [ and ] instead.
47882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47883  if test "x$has_forbidden_chars" != x; then
47884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47886  fi
47887
47888
47889  windows_path="$new_path"
47890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47891    unix_path=`$CYGPATH -u "$windows_path"`
47892    new_path="$unix_path"
47893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47895    new_path="$unix_path"
47896  fi
47897
47898  if test "x$path" != "x$new_path"; then
47899    MSVC_DLL="$new_path"
47900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
47901$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
47902  fi
47903
47904  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47905  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47906
47907    else
47908      # We're on a unix platform. Hooray! :)
47909      path="$MSVC_DLL"
47910      has_space=`$ECHO "$path" | $GREP " "`
47911      if test "x$has_space" != x; then
47912        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47913$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47914        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47915      fi
47916
47917      # Use eval to expand a potential ~
47918      eval path="$path"
47919      if test ! -f "$path" && test ! -d "$path"; then
47920        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47921      fi
47922
47923      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
47924    fi
47925  fi
47926
47927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
47928$as_echo_n "checking for $DLL_NAME... " >&6; }
47929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
47930$as_echo "$MSVC_DLL" >&6; }
47931    else
47932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47933$as_echo "incorrect, ignoring" >&6; }
47934      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
47935$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
47936    fi
47937  fi
47938
47939    fi
47940  fi
47941
47942  if test "x$MSVC_DLL" = x; then
47943    # Probe: Check in the Boot JDK directory.
47944    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
47945
47946  DLL_NAME="$DLL_NAME"
47947  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
47948  METHOD="well-known location in Boot JDK"
47949  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
47950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
47951$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
47952
47953    # Need to check if the found msvcr is correct architecture
47954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
47955$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
47956    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
47957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47958      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
47959      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
47960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47961        CORRECT_MSVCR_ARCH="PE32 executable"
47962      else
47963        CORRECT_MSVCR_ARCH="PE32+ executable"
47964      fi
47965    else
47966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47967        CORRECT_MSVCR_ARCH=386
47968      else
47969        CORRECT_MSVCR_ARCH=x86-64
47970      fi
47971    fi
47972    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
47973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47974$as_echo "ok" >&6; }
47975      MSVC_DLL="$POSSIBLE_MSVC_DLL"
47976
47977  # Only process if variable expands to non-empty
47978
47979  if test "x$MSVC_DLL" != x; then
47980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47981
47982  # Input might be given as Windows format, start by converting to
47983  # unix format.
47984  path="$MSVC_DLL"
47985  new_path=`$CYGPATH -u "$path"`
47986
47987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47990  # "foo.exe" is OK but "foo" is an error.
47991  #
47992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47993  # It is also a way to make sure we got the proper file name for the real test later on.
47994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47995  if test "x$test_shortpath" = x; then
47996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
47997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
47998    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
47999  fi
48000
48001  # Call helper function which possibly converts this using DOS-style short mode.
48002  # If so, the updated path is stored in $new_path.
48003
48004  input_path="$new_path"
48005  # Check if we need to convert this using DOS-style short mode. If the path
48006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48007  # take no chances and rewrite it.
48008  # Note: m4 eats our [], so we need to use [ and ] instead.
48009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48010  if test "x$has_forbidden_chars" != x; then
48011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48015      # Going to short mode and back again did indeed matter. Since short mode is
48016      # case insensitive, let's make it lowercase to improve readability.
48017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48018      # Now convert it back to Unix-style (cygpath)
48019      input_path=`$CYGPATH -u "$shortmode_path"`
48020      new_path="$input_path"
48021    fi
48022  fi
48023
48024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48025  if test "x$test_cygdrive_prefix" = x; then
48026    # As a simple fix, exclude /usr/bin since it's not a real path.
48027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48029      # a path prefixed by /cygdrive for fixpath to work.
48030      new_path="$CYGWIN_ROOT_PATH$input_path"
48031    fi
48032  fi
48033
48034
48035  if test "x$path" != "x$new_path"; then
48036    MSVC_DLL="$new_path"
48037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48038$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48039  fi
48040
48041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48042
48043  path="$MSVC_DLL"
48044  has_colon=`$ECHO $path | $GREP ^.:`
48045  new_path="$path"
48046  if test "x$has_colon" = x; then
48047    # Not in mixed or Windows style, start by that.
48048    new_path=`cmd //c echo $path`
48049  fi
48050
48051
48052  input_path="$new_path"
48053  # Check if we need to convert this using DOS-style short mode. If the path
48054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48055  # take no chances and rewrite it.
48056  # Note: m4 eats our [], so we need to use [ and ] instead.
48057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48058  if test "x$has_forbidden_chars" != x; then
48059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48061  fi
48062
48063
48064  windows_path="$new_path"
48065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48066    unix_path=`$CYGPATH -u "$windows_path"`
48067    new_path="$unix_path"
48068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48070    new_path="$unix_path"
48071  fi
48072
48073  if test "x$path" != "x$new_path"; then
48074    MSVC_DLL="$new_path"
48075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48076$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48077  fi
48078
48079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48081
48082    else
48083      # We're on a unix platform. Hooray! :)
48084      path="$MSVC_DLL"
48085      has_space=`$ECHO "$path" | $GREP " "`
48086      if test "x$has_space" != x; then
48087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48088$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48090      fi
48091
48092      # Use eval to expand a potential ~
48093      eval path="$path"
48094      if test ! -f "$path" && test ! -d "$path"; then
48095        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48096      fi
48097
48098      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48099    fi
48100  fi
48101
48102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48103$as_echo_n "checking for $DLL_NAME... " >&6; }
48104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48105$as_echo "$MSVC_DLL" >&6; }
48106    else
48107      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48108$as_echo "incorrect, ignoring" >&6; }
48109      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48110$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48111    fi
48112  fi
48113
48114  fi
48115
48116  if test "x$MSVC_DLL" = x; then
48117    # Probe: Look in the Windows system32 directory
48118    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48119
48120  windows_path="$CYGWIN_SYSTEMROOT"
48121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48122    unix_path=`$CYGPATH -u "$windows_path"`
48123    CYGWIN_SYSTEMROOT="$unix_path"
48124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48126    CYGWIN_SYSTEMROOT="$unix_path"
48127  fi
48128
48129    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48130
48131  DLL_NAME="$DLL_NAME"
48132  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48133  METHOD="well-known location in SYSTEMROOT"
48134  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48135    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48136$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48137
48138    # Need to check if the found msvcr is correct architecture
48139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48140$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48141    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48143      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48144      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48145      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48146        CORRECT_MSVCR_ARCH="PE32 executable"
48147      else
48148        CORRECT_MSVCR_ARCH="PE32+ executable"
48149      fi
48150    else
48151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48152        CORRECT_MSVCR_ARCH=386
48153      else
48154        CORRECT_MSVCR_ARCH=x86-64
48155      fi
48156    fi
48157    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48159$as_echo "ok" >&6; }
48160      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48161
48162  # Only process if variable expands to non-empty
48163
48164  if test "x$MSVC_DLL" != x; then
48165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48166
48167  # Input might be given as Windows format, start by converting to
48168  # unix format.
48169  path="$MSVC_DLL"
48170  new_path=`$CYGPATH -u "$path"`
48171
48172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48175  # "foo.exe" is OK but "foo" is an error.
48176  #
48177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48178  # It is also a way to make sure we got the proper file name for the real test later on.
48179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48180  if test "x$test_shortpath" = x; then
48181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48182$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48183    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48184  fi
48185
48186  # Call helper function which possibly converts this using DOS-style short mode.
48187  # If so, the updated path is stored in $new_path.
48188
48189  input_path="$new_path"
48190  # Check if we need to convert this using DOS-style short mode. If the path
48191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48192  # take no chances and rewrite it.
48193  # Note: m4 eats our [], so we need to use [ and ] instead.
48194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48195  if test "x$has_forbidden_chars" != x; then
48196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48200      # Going to short mode and back again did indeed matter. Since short mode is
48201      # case insensitive, let's make it lowercase to improve readability.
48202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48203      # Now convert it back to Unix-style (cygpath)
48204      input_path=`$CYGPATH -u "$shortmode_path"`
48205      new_path="$input_path"
48206    fi
48207  fi
48208
48209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48210  if test "x$test_cygdrive_prefix" = x; then
48211    # As a simple fix, exclude /usr/bin since it's not a real path.
48212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48214      # a path prefixed by /cygdrive for fixpath to work.
48215      new_path="$CYGWIN_ROOT_PATH$input_path"
48216    fi
48217  fi
48218
48219
48220  if test "x$path" != "x$new_path"; then
48221    MSVC_DLL="$new_path"
48222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48223$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48224  fi
48225
48226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48227
48228  path="$MSVC_DLL"
48229  has_colon=`$ECHO $path | $GREP ^.:`
48230  new_path="$path"
48231  if test "x$has_colon" = x; then
48232    # Not in mixed or Windows style, start by that.
48233    new_path=`cmd //c echo $path`
48234  fi
48235
48236
48237  input_path="$new_path"
48238  # Check if we need to convert this using DOS-style short mode. If the path
48239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48240  # take no chances and rewrite it.
48241  # Note: m4 eats our [], so we need to use [ and ] instead.
48242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48243  if test "x$has_forbidden_chars" != x; then
48244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48246  fi
48247
48248
48249  windows_path="$new_path"
48250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48251    unix_path=`$CYGPATH -u "$windows_path"`
48252    new_path="$unix_path"
48253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48255    new_path="$unix_path"
48256  fi
48257
48258  if test "x$path" != "x$new_path"; then
48259    MSVC_DLL="$new_path"
48260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48261$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48262  fi
48263
48264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48266
48267    else
48268      # We're on a unix platform. Hooray! :)
48269      path="$MSVC_DLL"
48270      has_space=`$ECHO "$path" | $GREP " "`
48271      if test "x$has_space" != x; then
48272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48273$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48275      fi
48276
48277      # Use eval to expand a potential ~
48278      eval path="$path"
48279      if test ! -f "$path" && test ! -d "$path"; then
48280        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48281      fi
48282
48283      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48284    fi
48285  fi
48286
48287      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48288$as_echo_n "checking for $DLL_NAME... " >&6; }
48289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48290$as_echo "$MSVC_DLL" >&6; }
48291    else
48292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48293$as_echo "incorrect, ignoring" >&6; }
48294      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48295$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48296    fi
48297  fi
48298
48299  fi
48300
48301  if test "x$MSVC_DLL" = x; then
48302    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48303    if test "x$VS100COMNTOOLS" != x; then
48304      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48305
48306  windows_path="$CYGWIN_VS_TOOLS_DIR"
48307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48308    unix_path=`$CYGPATH -u "$windows_path"`
48309    CYGWIN_VS_TOOLS_DIR="$unix_path"
48310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48312    CYGWIN_VS_TOOLS_DIR="$unix_path"
48313  fi
48314
48315      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48316        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48317	    | $GREP -i /x64/ | $HEAD --lines 1`
48318      else
48319        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48320	    | $GREP -i /x86/ | $HEAD --lines 1`
48321      fi
48322
48323  DLL_NAME="$DLL_NAME"
48324  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48325  METHOD="search of VS100COMNTOOLS"
48326  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48327    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48328$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48329
48330    # Need to check if the found msvcr is correct architecture
48331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48332$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48333    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48335      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48336      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48337      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48338        CORRECT_MSVCR_ARCH="PE32 executable"
48339      else
48340        CORRECT_MSVCR_ARCH="PE32+ executable"
48341      fi
48342    else
48343      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48344        CORRECT_MSVCR_ARCH=386
48345      else
48346        CORRECT_MSVCR_ARCH=x86-64
48347      fi
48348    fi
48349    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48350      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48351$as_echo "ok" >&6; }
48352      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48353
48354  # Only process if variable expands to non-empty
48355
48356  if test "x$MSVC_DLL" != x; then
48357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48358
48359  # Input might be given as Windows format, start by converting to
48360  # unix format.
48361  path="$MSVC_DLL"
48362  new_path=`$CYGPATH -u "$path"`
48363
48364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48367  # "foo.exe" is OK but "foo" is an error.
48368  #
48369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48370  # It is also a way to make sure we got the proper file name for the real test later on.
48371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48372  if test "x$test_shortpath" = x; then
48373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48374$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48375    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48376  fi
48377
48378  # Call helper function which possibly converts this using DOS-style short mode.
48379  # If so, the updated path is stored in $new_path.
48380
48381  input_path="$new_path"
48382  # Check if we need to convert this using DOS-style short mode. If the path
48383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48384  # take no chances and rewrite it.
48385  # Note: m4 eats our [], so we need to use [ and ] instead.
48386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48387  if test "x$has_forbidden_chars" != x; then
48388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48392      # Going to short mode and back again did indeed matter. Since short mode is
48393      # case insensitive, let's make it lowercase to improve readability.
48394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48395      # Now convert it back to Unix-style (cygpath)
48396      input_path=`$CYGPATH -u "$shortmode_path"`
48397      new_path="$input_path"
48398    fi
48399  fi
48400
48401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48402  if test "x$test_cygdrive_prefix" = x; then
48403    # As a simple fix, exclude /usr/bin since it's not a real path.
48404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48406      # a path prefixed by /cygdrive for fixpath to work.
48407      new_path="$CYGWIN_ROOT_PATH$input_path"
48408    fi
48409  fi
48410
48411
48412  if test "x$path" != "x$new_path"; then
48413    MSVC_DLL="$new_path"
48414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48415$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48416  fi
48417
48418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48419
48420  path="$MSVC_DLL"
48421  has_colon=`$ECHO $path | $GREP ^.:`
48422  new_path="$path"
48423  if test "x$has_colon" = x; then
48424    # Not in mixed or Windows style, start by that.
48425    new_path=`cmd //c echo $path`
48426  fi
48427
48428
48429  input_path="$new_path"
48430  # Check if we need to convert this using DOS-style short mode. If the path
48431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48432  # take no chances and rewrite it.
48433  # Note: m4 eats our [], so we need to use [ and ] instead.
48434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48435  if test "x$has_forbidden_chars" != x; then
48436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48438  fi
48439
48440
48441  windows_path="$new_path"
48442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48443    unix_path=`$CYGPATH -u "$windows_path"`
48444    new_path="$unix_path"
48445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48447    new_path="$unix_path"
48448  fi
48449
48450  if test "x$path" != "x$new_path"; then
48451    MSVC_DLL="$new_path"
48452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48453$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48454  fi
48455
48456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48458
48459    else
48460      # We're on a unix platform. Hooray! :)
48461      path="$MSVC_DLL"
48462      has_space=`$ECHO "$path" | $GREP " "`
48463      if test "x$has_space" != x; then
48464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48465$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48467      fi
48468
48469      # Use eval to expand a potential ~
48470      eval path="$path"
48471      if test ! -f "$path" && test ! -d "$path"; then
48472        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48473      fi
48474
48475      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48476    fi
48477  fi
48478
48479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48480$as_echo_n "checking for $DLL_NAME... " >&6; }
48481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48482$as_echo "$MSVC_DLL" >&6; }
48483    else
48484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48485$as_echo "incorrect, ignoring" >&6; }
48486      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48487$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48488    fi
48489  fi
48490
48491    fi
48492  fi
48493
48494  if test "x$MSVC_DLL" = x; then
48495    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48496    # (This was the original behaviour; kept since it might turn something up)
48497    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48498      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48499        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48500	    | $GREP x64 | $HEAD --lines 1`
48501      else
48502        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48503	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48504        if test "x$POSSIBLE_MSVC_DLL" = x; then
48505          # We're grasping at straws now...
48506          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
48507	      | $HEAD --lines 1`
48508        fi
48509      fi
48510
48511
48512  DLL_NAME="$DLL_NAME"
48513  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48514  METHOD="search of VCINSTALLDIR"
48515  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48517$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48518
48519    # Need to check if the found msvcr is correct architecture
48520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48521$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48522    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48524      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48525      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48526      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48527        CORRECT_MSVCR_ARCH="PE32 executable"
48528      else
48529        CORRECT_MSVCR_ARCH="PE32+ executable"
48530      fi
48531    else
48532      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48533        CORRECT_MSVCR_ARCH=386
48534      else
48535        CORRECT_MSVCR_ARCH=x86-64
48536      fi
48537    fi
48538    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48539      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48540$as_echo "ok" >&6; }
48541      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48542
48543  # Only process if variable expands to non-empty
48544
48545  if test "x$MSVC_DLL" != x; then
48546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48547
48548  # Input might be given as Windows format, start by converting to
48549  # unix format.
48550  path="$MSVC_DLL"
48551  new_path=`$CYGPATH -u "$path"`
48552
48553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48556  # "foo.exe" is OK but "foo" is an error.
48557  #
48558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48559  # It is also a way to make sure we got the proper file name for the real test later on.
48560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48561  if test "x$test_shortpath" = x; then
48562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48563$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48564    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48565  fi
48566
48567  # Call helper function which possibly converts this using DOS-style short mode.
48568  # If so, the updated path is stored in $new_path.
48569
48570  input_path="$new_path"
48571  # Check if we need to convert this using DOS-style short mode. If the path
48572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48573  # take no chances and rewrite it.
48574  # Note: m4 eats our [], so we need to use [ and ] instead.
48575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48576  if test "x$has_forbidden_chars" != x; then
48577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48581      # Going to short mode and back again did indeed matter. Since short mode is
48582      # case insensitive, let's make it lowercase to improve readability.
48583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48584      # Now convert it back to Unix-style (cygpath)
48585      input_path=`$CYGPATH -u "$shortmode_path"`
48586      new_path="$input_path"
48587    fi
48588  fi
48589
48590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48591  if test "x$test_cygdrive_prefix" = x; then
48592    # As a simple fix, exclude /usr/bin since it's not a real path.
48593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48595      # a path prefixed by /cygdrive for fixpath to work.
48596      new_path="$CYGWIN_ROOT_PATH$input_path"
48597    fi
48598  fi
48599
48600
48601  if test "x$path" != "x$new_path"; then
48602    MSVC_DLL="$new_path"
48603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48604$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48605  fi
48606
48607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48608
48609  path="$MSVC_DLL"
48610  has_colon=`$ECHO $path | $GREP ^.:`
48611  new_path="$path"
48612  if test "x$has_colon" = x; then
48613    # Not in mixed or Windows style, start by that.
48614    new_path=`cmd //c echo $path`
48615  fi
48616
48617
48618  input_path="$new_path"
48619  # Check if we need to convert this using DOS-style short mode. If the path
48620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48621  # take no chances and rewrite it.
48622  # Note: m4 eats our [], so we need to use [ and ] instead.
48623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48624  if test "x$has_forbidden_chars" != x; then
48625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48627  fi
48628
48629
48630  windows_path="$new_path"
48631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48632    unix_path=`$CYGPATH -u "$windows_path"`
48633    new_path="$unix_path"
48634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48636    new_path="$unix_path"
48637  fi
48638
48639  if test "x$path" != "x$new_path"; then
48640    MSVC_DLL="$new_path"
48641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48642$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48643  fi
48644
48645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48647
48648    else
48649      # We're on a unix platform. Hooray! :)
48650      path="$MSVC_DLL"
48651      has_space=`$ECHO "$path" | $GREP " "`
48652      if test "x$has_space" != x; then
48653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48654$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48656      fi
48657
48658      # Use eval to expand a potential ~
48659      eval path="$path"
48660      if test ! -f "$path" && test ! -d "$path"; then
48661        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48662      fi
48663
48664      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48665    fi
48666  fi
48667
48668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48669$as_echo_n "checking for $DLL_NAME... " >&6; }
48670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48671$as_echo "$MSVC_DLL" >&6; }
48672    else
48673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48674$as_echo "incorrect, ignoring" >&6; }
48675      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48676$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48677    fi
48678  fi
48679
48680    fi
48681  fi
48682
48683  if test "x$MSVC_DLL" = x; then
48684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48685$as_echo_n "checking for $DLL_NAME... " >&6; }
48686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48687$as_echo "no" >&6; }
48688    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
48689  fi
48690
48691    MSVCR_DLL="$MSVC_DLL"
48692  fi
48693
48694
48695
48696# Check whether --with-msvcp-dll was given.
48697if test "${with_msvcp_dll+set}" = set; then :
48698  withval=$with_msvcp_dll;
48699fi
48700
48701
48702  if test "x$MSVCP_NAME" != "x"; then
48703    if test "x$with_msvcp_dll" != x; then
48704      # If given explicitely by user, do not probe. If not present, fail directly.
48705
48706  DLL_NAME="$MSVCP_NAME"
48707  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
48708  METHOD="--with-msvcp-dll"
48709  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48710    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48711$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48712
48713    # Need to check if the found msvcr is correct architecture
48714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48715$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48716    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48718      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48719      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48721        CORRECT_MSVCR_ARCH="PE32 executable"
48722      else
48723        CORRECT_MSVCR_ARCH="PE32+ executable"
48724      fi
48725    else
48726      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48727        CORRECT_MSVCR_ARCH=386
48728      else
48729        CORRECT_MSVCR_ARCH=x86-64
48730      fi
48731    fi
48732    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48734$as_echo "ok" >&6; }
48735      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48736
48737  # Only process if variable expands to non-empty
48738
48739  if test "x$MSVC_DLL" != x; then
48740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48741
48742  # Input might be given as Windows format, start by converting to
48743  # unix format.
48744  path="$MSVC_DLL"
48745  new_path=`$CYGPATH -u "$path"`
48746
48747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48750  # "foo.exe" is OK but "foo" is an error.
48751  #
48752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48753  # It is also a way to make sure we got the proper file name for the real test later on.
48754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48755  if test "x$test_shortpath" = x; then
48756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48758    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48759  fi
48760
48761  # Call helper function which possibly converts this using DOS-style short mode.
48762  # If so, the updated path is stored in $new_path.
48763
48764  input_path="$new_path"
48765  # Check if we need to convert this using DOS-style short mode. If the path
48766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48767  # take no chances and rewrite it.
48768  # Note: m4 eats our [], so we need to use [ and ] instead.
48769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48770  if test "x$has_forbidden_chars" != x; then
48771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48775      # Going to short mode and back again did indeed matter. Since short mode is
48776      # case insensitive, let's make it lowercase to improve readability.
48777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48778      # Now convert it back to Unix-style (cygpath)
48779      input_path=`$CYGPATH -u "$shortmode_path"`
48780      new_path="$input_path"
48781    fi
48782  fi
48783
48784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48785  if test "x$test_cygdrive_prefix" = x; then
48786    # As a simple fix, exclude /usr/bin since it's not a real path.
48787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48789      # a path prefixed by /cygdrive for fixpath to work.
48790      new_path="$CYGWIN_ROOT_PATH$input_path"
48791    fi
48792  fi
48793
48794
48795  if test "x$path" != "x$new_path"; then
48796    MSVC_DLL="$new_path"
48797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48798$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48799  fi
48800
48801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48802
48803  path="$MSVC_DLL"
48804  has_colon=`$ECHO $path | $GREP ^.:`
48805  new_path="$path"
48806  if test "x$has_colon" = x; then
48807    # Not in mixed or Windows style, start by that.
48808    new_path=`cmd //c echo $path`
48809  fi
48810
48811
48812  input_path="$new_path"
48813  # Check if we need to convert this using DOS-style short mode. If the path
48814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48815  # take no chances and rewrite it.
48816  # Note: m4 eats our [], so we need to use [ and ] instead.
48817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48818  if test "x$has_forbidden_chars" != x; then
48819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48821  fi
48822
48823
48824  windows_path="$new_path"
48825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48826    unix_path=`$CYGPATH -u "$windows_path"`
48827    new_path="$unix_path"
48828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48830    new_path="$unix_path"
48831  fi
48832
48833  if test "x$path" != "x$new_path"; then
48834    MSVC_DLL="$new_path"
48835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48836$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48837  fi
48838
48839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48841
48842    else
48843      # We're on a unix platform. Hooray! :)
48844      path="$MSVC_DLL"
48845      has_space=`$ECHO "$path" | $GREP " "`
48846      if test "x$has_space" != x; then
48847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48848$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48850      fi
48851
48852      # Use eval to expand a potential ~
48853      eval path="$path"
48854      if test ! -f "$path" && test ! -d "$path"; then
48855        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48856      fi
48857
48858      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48859    fi
48860  fi
48861
48862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48863$as_echo_n "checking for $DLL_NAME... " >&6; }
48864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48865$as_echo "$MSVC_DLL" >&6; }
48866    else
48867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48868$as_echo "incorrect, ignoring" >&6; }
48869      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48870$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48871    fi
48872  fi
48873
48874      if test "x$MSVC_DLL" = x; then
48875        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
48876      fi
48877      MSVCP_DLL="$MSVC_DLL"
48878    elif test "x$DEVKIT_MSVCP_DLL" != x; then
48879
48880  DLL_NAME="$MSVCP_NAME"
48881  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
48882  METHOD="devkit"
48883  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48885$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48886
48887    # Need to check if the found msvcr is correct architecture
48888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48889$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48890    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48892      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48893      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48894      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48895        CORRECT_MSVCR_ARCH="PE32 executable"
48896      else
48897        CORRECT_MSVCR_ARCH="PE32+ executable"
48898      fi
48899    else
48900      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48901        CORRECT_MSVCR_ARCH=386
48902      else
48903        CORRECT_MSVCR_ARCH=x86-64
48904      fi
48905    fi
48906    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48908$as_echo "ok" >&6; }
48909      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48910
48911  # Only process if variable expands to non-empty
48912
48913  if test "x$MSVC_DLL" != x; then
48914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48915
48916  # Input might be given as Windows format, start by converting to
48917  # unix format.
48918  path="$MSVC_DLL"
48919  new_path=`$CYGPATH -u "$path"`
48920
48921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48924  # "foo.exe" is OK but "foo" is an error.
48925  #
48926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48927  # It is also a way to make sure we got the proper file name for the real test later on.
48928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48929  if test "x$test_shortpath" = x; then
48930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48931$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48932    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48933  fi
48934
48935  # Call helper function which possibly converts this using DOS-style short mode.
48936  # If so, the updated path is stored in $new_path.
48937
48938  input_path="$new_path"
48939  # Check if we need to convert this using DOS-style short mode. If the path
48940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48941  # take no chances and rewrite it.
48942  # Note: m4 eats our [], so we need to use [ and ] instead.
48943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48944  if test "x$has_forbidden_chars" != x; then
48945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48949      # Going to short mode and back again did indeed matter. Since short mode is
48950      # case insensitive, let's make it lowercase to improve readability.
48951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48952      # Now convert it back to Unix-style (cygpath)
48953      input_path=`$CYGPATH -u "$shortmode_path"`
48954      new_path="$input_path"
48955    fi
48956  fi
48957
48958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48959  if test "x$test_cygdrive_prefix" = x; then
48960    # As a simple fix, exclude /usr/bin since it's not a real path.
48961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48963      # a path prefixed by /cygdrive for fixpath to work.
48964      new_path="$CYGWIN_ROOT_PATH$input_path"
48965    fi
48966  fi
48967
48968
48969  if test "x$path" != "x$new_path"; then
48970    MSVC_DLL="$new_path"
48971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48972$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48973  fi
48974
48975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48976
48977  path="$MSVC_DLL"
48978  has_colon=`$ECHO $path | $GREP ^.:`
48979  new_path="$path"
48980  if test "x$has_colon" = x; then
48981    # Not in mixed or Windows style, start by that.
48982    new_path=`cmd //c echo $path`
48983  fi
48984
48985
48986  input_path="$new_path"
48987  # Check if we need to convert this using DOS-style short mode. If the path
48988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48989  # take no chances and rewrite it.
48990  # Note: m4 eats our [], so we need to use [ and ] instead.
48991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48992  if test "x$has_forbidden_chars" != x; then
48993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48995  fi
48996
48997
48998  windows_path="$new_path"
48999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49000    unix_path=`$CYGPATH -u "$windows_path"`
49001    new_path="$unix_path"
49002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49004    new_path="$unix_path"
49005  fi
49006
49007  if test "x$path" != "x$new_path"; then
49008    MSVC_DLL="$new_path"
49009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49010$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49011  fi
49012
49013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49015
49016    else
49017      # We're on a unix platform. Hooray! :)
49018      path="$MSVC_DLL"
49019      has_space=`$ECHO "$path" | $GREP " "`
49020      if test "x$has_space" != x; then
49021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49022$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49024      fi
49025
49026      # Use eval to expand a potential ~
49027      eval path="$path"
49028      if test ! -f "$path" && test ! -d "$path"; then
49029        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49030      fi
49031
49032      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49033    fi
49034  fi
49035
49036      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49037$as_echo_n "checking for $DLL_NAME... " >&6; }
49038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49039$as_echo "$MSVC_DLL" >&6; }
49040    else
49041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49042$as_echo "incorrect, ignoring" >&6; }
49043      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49044$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49045    fi
49046  fi
49047
49048      if test "x$MSVC_DLL" = x; then
49049        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49050      fi
49051      MSVCP_DLL="$MSVC_DLL"
49052    else
49053
49054  DLL_NAME="${MSVCP_NAME}"
49055  MSVC_DLL=
49056
49057  if test "x$MSVC_DLL" = x; then
49058    # Probe: Using well-known location from Visual Studio 10.0
49059    if test "x$VCINSTALLDIR" != x; then
49060      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49061
49062  windows_path="$CYGWIN_VC_INSTALL_DIR"
49063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49064    unix_path=`$CYGPATH -u "$windows_path"`
49065    CYGWIN_VC_INSTALL_DIR="$unix_path"
49066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49068    CYGWIN_VC_INSTALL_DIR="$unix_path"
49069  fi
49070
49071      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49072        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49073      else
49074        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49075      fi
49076      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49077
49078  DLL_NAME="$DLL_NAME"
49079  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49080  METHOD="well-known location in VCINSTALLDIR"
49081  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49082    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49083$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49084
49085    # Need to check if the found msvcr is correct architecture
49086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49087$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49088    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49090      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49091      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49092      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49093        CORRECT_MSVCR_ARCH="PE32 executable"
49094      else
49095        CORRECT_MSVCR_ARCH="PE32+ executable"
49096      fi
49097    else
49098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49099        CORRECT_MSVCR_ARCH=386
49100      else
49101        CORRECT_MSVCR_ARCH=x86-64
49102      fi
49103    fi
49104    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49106$as_echo "ok" >&6; }
49107      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49108
49109  # Only process if variable expands to non-empty
49110
49111  if test "x$MSVC_DLL" != x; then
49112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49113
49114  # Input might be given as Windows format, start by converting to
49115  # unix format.
49116  path="$MSVC_DLL"
49117  new_path=`$CYGPATH -u "$path"`
49118
49119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49122  # "foo.exe" is OK but "foo" is an error.
49123  #
49124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49125  # It is also a way to make sure we got the proper file name for the real test later on.
49126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49127  if test "x$test_shortpath" = x; then
49128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49129$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49130    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49131  fi
49132
49133  # Call helper function which possibly converts this using DOS-style short mode.
49134  # If so, the updated path is stored in $new_path.
49135
49136  input_path="$new_path"
49137  # Check if we need to convert this using DOS-style short mode. If the path
49138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49139  # take no chances and rewrite it.
49140  # Note: m4 eats our [], so we need to use [ and ] instead.
49141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49142  if test "x$has_forbidden_chars" != x; then
49143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49147      # Going to short mode and back again did indeed matter. Since short mode is
49148      # case insensitive, let's make it lowercase to improve readability.
49149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49150      # Now convert it back to Unix-style (cygpath)
49151      input_path=`$CYGPATH -u "$shortmode_path"`
49152      new_path="$input_path"
49153    fi
49154  fi
49155
49156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49157  if test "x$test_cygdrive_prefix" = x; then
49158    # As a simple fix, exclude /usr/bin since it's not a real path.
49159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49161      # a path prefixed by /cygdrive for fixpath to work.
49162      new_path="$CYGWIN_ROOT_PATH$input_path"
49163    fi
49164  fi
49165
49166
49167  if test "x$path" != "x$new_path"; then
49168    MSVC_DLL="$new_path"
49169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49170$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49171  fi
49172
49173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49174
49175  path="$MSVC_DLL"
49176  has_colon=`$ECHO $path | $GREP ^.:`
49177  new_path="$path"
49178  if test "x$has_colon" = x; then
49179    # Not in mixed or Windows style, start by that.
49180    new_path=`cmd //c echo $path`
49181  fi
49182
49183
49184  input_path="$new_path"
49185  # Check if we need to convert this using DOS-style short mode. If the path
49186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49187  # take no chances and rewrite it.
49188  # Note: m4 eats our [], so we need to use [ and ] instead.
49189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49190  if test "x$has_forbidden_chars" != x; then
49191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49193  fi
49194
49195
49196  windows_path="$new_path"
49197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49198    unix_path=`$CYGPATH -u "$windows_path"`
49199    new_path="$unix_path"
49200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49202    new_path="$unix_path"
49203  fi
49204
49205  if test "x$path" != "x$new_path"; then
49206    MSVC_DLL="$new_path"
49207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49208$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49209  fi
49210
49211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49213
49214    else
49215      # We're on a unix platform. Hooray! :)
49216      path="$MSVC_DLL"
49217      has_space=`$ECHO "$path" | $GREP " "`
49218      if test "x$has_space" != x; then
49219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49220$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49222      fi
49223
49224      # Use eval to expand a potential ~
49225      eval path="$path"
49226      if test ! -f "$path" && test ! -d "$path"; then
49227        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49228      fi
49229
49230      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49231    fi
49232  fi
49233
49234      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49235$as_echo_n "checking for $DLL_NAME... " >&6; }
49236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49237$as_echo "$MSVC_DLL" >&6; }
49238    else
49239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49240$as_echo "incorrect, ignoring" >&6; }
49241      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49242$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49243    fi
49244  fi
49245
49246    fi
49247  fi
49248
49249  if test "x$MSVC_DLL" = x; then
49250    # Probe: Check in the Boot JDK directory.
49251    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49252
49253  DLL_NAME="$DLL_NAME"
49254  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49255  METHOD="well-known location in Boot JDK"
49256  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49257    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49258$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49259
49260    # Need to check if the found msvcr is correct architecture
49261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49262$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49263    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49265      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49266      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49267      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49268        CORRECT_MSVCR_ARCH="PE32 executable"
49269      else
49270        CORRECT_MSVCR_ARCH="PE32+ executable"
49271      fi
49272    else
49273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49274        CORRECT_MSVCR_ARCH=386
49275      else
49276        CORRECT_MSVCR_ARCH=x86-64
49277      fi
49278    fi
49279    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49281$as_echo "ok" >&6; }
49282      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49283
49284  # Only process if variable expands to non-empty
49285
49286  if test "x$MSVC_DLL" != x; then
49287    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49288
49289  # Input might be given as Windows format, start by converting to
49290  # unix format.
49291  path="$MSVC_DLL"
49292  new_path=`$CYGPATH -u "$path"`
49293
49294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49297  # "foo.exe" is OK but "foo" is an error.
49298  #
49299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49300  # It is also a way to make sure we got the proper file name for the real test later on.
49301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49302  if test "x$test_shortpath" = x; then
49303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49304$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49305    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49306  fi
49307
49308  # Call helper function which possibly converts this using DOS-style short mode.
49309  # If so, the updated path is stored in $new_path.
49310
49311  input_path="$new_path"
49312  # Check if we need to convert this using DOS-style short mode. If the path
49313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49314  # take no chances and rewrite it.
49315  # Note: m4 eats our [], so we need to use [ and ] instead.
49316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49317  if test "x$has_forbidden_chars" != x; then
49318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49322      # Going to short mode and back again did indeed matter. Since short mode is
49323      # case insensitive, let's make it lowercase to improve readability.
49324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49325      # Now convert it back to Unix-style (cygpath)
49326      input_path=`$CYGPATH -u "$shortmode_path"`
49327      new_path="$input_path"
49328    fi
49329  fi
49330
49331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49332  if test "x$test_cygdrive_prefix" = x; then
49333    # As a simple fix, exclude /usr/bin since it's not a real path.
49334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49336      # a path prefixed by /cygdrive for fixpath to work.
49337      new_path="$CYGWIN_ROOT_PATH$input_path"
49338    fi
49339  fi
49340
49341
49342  if test "x$path" != "x$new_path"; then
49343    MSVC_DLL="$new_path"
49344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49345$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49346  fi
49347
49348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49349
49350  path="$MSVC_DLL"
49351  has_colon=`$ECHO $path | $GREP ^.:`
49352  new_path="$path"
49353  if test "x$has_colon" = x; then
49354    # Not in mixed or Windows style, start by that.
49355    new_path=`cmd //c echo $path`
49356  fi
49357
49358
49359  input_path="$new_path"
49360  # Check if we need to convert this using DOS-style short mode. If the path
49361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49362  # take no chances and rewrite it.
49363  # Note: m4 eats our [], so we need to use [ and ] instead.
49364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49365  if test "x$has_forbidden_chars" != x; then
49366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49368  fi
49369
49370
49371  windows_path="$new_path"
49372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49373    unix_path=`$CYGPATH -u "$windows_path"`
49374    new_path="$unix_path"
49375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49377    new_path="$unix_path"
49378  fi
49379
49380  if test "x$path" != "x$new_path"; then
49381    MSVC_DLL="$new_path"
49382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49384  fi
49385
49386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49388
49389    else
49390      # We're on a unix platform. Hooray! :)
49391      path="$MSVC_DLL"
49392      has_space=`$ECHO "$path" | $GREP " "`
49393      if test "x$has_space" != x; then
49394        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49395$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49396        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49397      fi
49398
49399      # Use eval to expand a potential ~
49400      eval path="$path"
49401      if test ! -f "$path" && test ! -d "$path"; then
49402        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49403      fi
49404
49405      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49406    fi
49407  fi
49408
49409      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49410$as_echo_n "checking for $DLL_NAME... " >&6; }
49411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49412$as_echo "$MSVC_DLL" >&6; }
49413    else
49414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49415$as_echo "incorrect, ignoring" >&6; }
49416      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49417$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49418    fi
49419  fi
49420
49421  fi
49422
49423  if test "x$MSVC_DLL" = x; then
49424    # Probe: Look in the Windows system32 directory
49425    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49426
49427  windows_path="$CYGWIN_SYSTEMROOT"
49428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49429    unix_path=`$CYGPATH -u "$windows_path"`
49430    CYGWIN_SYSTEMROOT="$unix_path"
49431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49433    CYGWIN_SYSTEMROOT="$unix_path"
49434  fi
49435
49436    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49437
49438  DLL_NAME="$DLL_NAME"
49439  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49440  METHOD="well-known location in SYSTEMROOT"
49441  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49443$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49444
49445    # Need to check if the found msvcr is correct architecture
49446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49447$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49448    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49450      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49451      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49453        CORRECT_MSVCR_ARCH="PE32 executable"
49454      else
49455        CORRECT_MSVCR_ARCH="PE32+ executable"
49456      fi
49457    else
49458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49459        CORRECT_MSVCR_ARCH=386
49460      else
49461        CORRECT_MSVCR_ARCH=x86-64
49462      fi
49463    fi
49464    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49466$as_echo "ok" >&6; }
49467      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49468
49469  # Only process if variable expands to non-empty
49470
49471  if test "x$MSVC_DLL" != x; then
49472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49473
49474  # Input might be given as Windows format, start by converting to
49475  # unix format.
49476  path="$MSVC_DLL"
49477  new_path=`$CYGPATH -u "$path"`
49478
49479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49482  # "foo.exe" is OK but "foo" is an error.
49483  #
49484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49485  # It is also a way to make sure we got the proper file name for the real test later on.
49486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49487  if test "x$test_shortpath" = x; then
49488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49489$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49490    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49491  fi
49492
49493  # Call helper function which possibly converts this using DOS-style short mode.
49494  # If so, the updated path is stored in $new_path.
49495
49496  input_path="$new_path"
49497  # Check if we need to convert this using DOS-style short mode. If the path
49498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49499  # take no chances and rewrite it.
49500  # Note: m4 eats our [], so we need to use [ and ] instead.
49501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49502  if test "x$has_forbidden_chars" != x; then
49503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49507      # Going to short mode and back again did indeed matter. Since short mode is
49508      # case insensitive, let's make it lowercase to improve readability.
49509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49510      # Now convert it back to Unix-style (cygpath)
49511      input_path=`$CYGPATH -u "$shortmode_path"`
49512      new_path="$input_path"
49513    fi
49514  fi
49515
49516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49517  if test "x$test_cygdrive_prefix" = x; then
49518    # As a simple fix, exclude /usr/bin since it's not a real path.
49519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49521      # a path prefixed by /cygdrive for fixpath to work.
49522      new_path="$CYGWIN_ROOT_PATH$input_path"
49523    fi
49524  fi
49525
49526
49527  if test "x$path" != "x$new_path"; then
49528    MSVC_DLL="$new_path"
49529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49530$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49531  fi
49532
49533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49534
49535  path="$MSVC_DLL"
49536  has_colon=`$ECHO $path | $GREP ^.:`
49537  new_path="$path"
49538  if test "x$has_colon" = x; then
49539    # Not in mixed or Windows style, start by that.
49540    new_path=`cmd //c echo $path`
49541  fi
49542
49543
49544  input_path="$new_path"
49545  # Check if we need to convert this using DOS-style short mode. If the path
49546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49547  # take no chances and rewrite it.
49548  # Note: m4 eats our [], so we need to use [ and ] instead.
49549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49550  if test "x$has_forbidden_chars" != x; then
49551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49553  fi
49554
49555
49556  windows_path="$new_path"
49557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49558    unix_path=`$CYGPATH -u "$windows_path"`
49559    new_path="$unix_path"
49560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49562    new_path="$unix_path"
49563  fi
49564
49565  if test "x$path" != "x$new_path"; then
49566    MSVC_DLL="$new_path"
49567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49568$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49569  fi
49570
49571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49573
49574    else
49575      # We're on a unix platform. Hooray! :)
49576      path="$MSVC_DLL"
49577      has_space=`$ECHO "$path" | $GREP " "`
49578      if test "x$has_space" != x; then
49579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49580$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49582      fi
49583
49584      # Use eval to expand a potential ~
49585      eval path="$path"
49586      if test ! -f "$path" && test ! -d "$path"; then
49587        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49588      fi
49589
49590      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49591    fi
49592  fi
49593
49594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49595$as_echo_n "checking for $DLL_NAME... " >&6; }
49596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49597$as_echo "$MSVC_DLL" >&6; }
49598    else
49599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49600$as_echo "incorrect, ignoring" >&6; }
49601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49603    fi
49604  fi
49605
49606  fi
49607
49608  if test "x$MSVC_DLL" = x; then
49609    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49610    if test "x$VS100COMNTOOLS" != x; then
49611      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49612
49613  windows_path="$CYGWIN_VS_TOOLS_DIR"
49614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49615    unix_path=`$CYGPATH -u "$windows_path"`
49616    CYGWIN_VS_TOOLS_DIR="$unix_path"
49617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49619    CYGWIN_VS_TOOLS_DIR="$unix_path"
49620  fi
49621
49622      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49623        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49624	    | $GREP -i /x64/ | $HEAD --lines 1`
49625      else
49626        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49627	    | $GREP -i /x86/ | $HEAD --lines 1`
49628      fi
49629
49630  DLL_NAME="$DLL_NAME"
49631  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49632  METHOD="search of VS100COMNTOOLS"
49633  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49635$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49636
49637    # Need to check if the found msvcr is correct architecture
49638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49639$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49640    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49642      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49643      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49644      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49645        CORRECT_MSVCR_ARCH="PE32 executable"
49646      else
49647        CORRECT_MSVCR_ARCH="PE32+ executable"
49648      fi
49649    else
49650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49651        CORRECT_MSVCR_ARCH=386
49652      else
49653        CORRECT_MSVCR_ARCH=x86-64
49654      fi
49655    fi
49656    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49658$as_echo "ok" >&6; }
49659      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49660
49661  # Only process if variable expands to non-empty
49662
49663  if test "x$MSVC_DLL" != x; then
49664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49665
49666  # Input might be given as Windows format, start by converting to
49667  # unix format.
49668  path="$MSVC_DLL"
49669  new_path=`$CYGPATH -u "$path"`
49670
49671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49674  # "foo.exe" is OK but "foo" is an error.
49675  #
49676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49677  # It is also a way to make sure we got the proper file name for the real test later on.
49678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49679  if test "x$test_shortpath" = x; then
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49681$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49682    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49683  fi
49684
49685  # Call helper function which possibly converts this using DOS-style short mode.
49686  # If so, the updated path is stored in $new_path.
49687
49688  input_path="$new_path"
49689  # Check if we need to convert this using DOS-style short mode. If the path
49690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49691  # take no chances and rewrite it.
49692  # Note: m4 eats our [], so we need to use [ and ] instead.
49693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49694  if test "x$has_forbidden_chars" != x; then
49695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49699      # Going to short mode and back again did indeed matter. Since short mode is
49700      # case insensitive, let's make it lowercase to improve readability.
49701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49702      # Now convert it back to Unix-style (cygpath)
49703      input_path=`$CYGPATH -u "$shortmode_path"`
49704      new_path="$input_path"
49705    fi
49706  fi
49707
49708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49709  if test "x$test_cygdrive_prefix" = x; then
49710    # As a simple fix, exclude /usr/bin since it's not a real path.
49711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49713      # a path prefixed by /cygdrive for fixpath to work.
49714      new_path="$CYGWIN_ROOT_PATH$input_path"
49715    fi
49716  fi
49717
49718
49719  if test "x$path" != "x$new_path"; then
49720    MSVC_DLL="$new_path"
49721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49722$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49723  fi
49724
49725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49726
49727  path="$MSVC_DLL"
49728  has_colon=`$ECHO $path | $GREP ^.:`
49729  new_path="$path"
49730  if test "x$has_colon" = x; then
49731    # Not in mixed or Windows style, start by that.
49732    new_path=`cmd //c echo $path`
49733  fi
49734
49735
49736  input_path="$new_path"
49737  # Check if we need to convert this using DOS-style short mode. If the path
49738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49739  # take no chances and rewrite it.
49740  # Note: m4 eats our [], so we need to use [ and ] instead.
49741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49742  if test "x$has_forbidden_chars" != x; then
49743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49745  fi
49746
49747
49748  windows_path="$new_path"
49749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49750    unix_path=`$CYGPATH -u "$windows_path"`
49751    new_path="$unix_path"
49752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49754    new_path="$unix_path"
49755  fi
49756
49757  if test "x$path" != "x$new_path"; then
49758    MSVC_DLL="$new_path"
49759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49760$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49761  fi
49762
49763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49765
49766    else
49767      # We're on a unix platform. Hooray! :)
49768      path="$MSVC_DLL"
49769      has_space=`$ECHO "$path" | $GREP " "`
49770      if test "x$has_space" != x; then
49771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49772$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49774      fi
49775
49776      # Use eval to expand a potential ~
49777      eval path="$path"
49778      if test ! -f "$path" && test ! -d "$path"; then
49779        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49780      fi
49781
49782      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49783    fi
49784  fi
49785
49786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49787$as_echo_n "checking for $DLL_NAME... " >&6; }
49788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49789$as_echo "$MSVC_DLL" >&6; }
49790    else
49791      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49792$as_echo "incorrect, ignoring" >&6; }
49793      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49794$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49795    fi
49796  fi
49797
49798    fi
49799  fi
49800
49801  if test "x$MSVC_DLL" = x; then
49802    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49803    # (This was the original behaviour; kept since it might turn something up)
49804    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49805      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49806        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49807	    | $GREP x64 | $HEAD --lines 1`
49808      else
49809        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49810	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49811        if test "x$POSSIBLE_MSVC_DLL" = x; then
49812          # We're grasping at straws now...
49813          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49814	      | $HEAD --lines 1`
49815        fi
49816      fi
49817
49818
49819  DLL_NAME="$DLL_NAME"
49820  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49821  METHOD="search of VCINSTALLDIR"
49822  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49824$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49825
49826    # Need to check if the found msvcr is correct architecture
49827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49828$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49829    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49831      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49832      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49833      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49834        CORRECT_MSVCR_ARCH="PE32 executable"
49835      else
49836        CORRECT_MSVCR_ARCH="PE32+ executable"
49837      fi
49838    else
49839      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49840        CORRECT_MSVCR_ARCH=386
49841      else
49842        CORRECT_MSVCR_ARCH=x86-64
49843      fi
49844    fi
49845    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49847$as_echo "ok" >&6; }
49848      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49849
49850  # Only process if variable expands to non-empty
49851
49852  if test "x$MSVC_DLL" != x; then
49853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49854
49855  # Input might be given as Windows format, start by converting to
49856  # unix format.
49857  path="$MSVC_DLL"
49858  new_path=`$CYGPATH -u "$path"`
49859
49860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49863  # "foo.exe" is OK but "foo" is an error.
49864  #
49865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49866  # It is also a way to make sure we got the proper file name for the real test later on.
49867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49868  if test "x$test_shortpath" = x; then
49869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49870$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49871    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49872  fi
49873
49874  # Call helper function which possibly converts this using DOS-style short mode.
49875  # If so, the updated path is stored in $new_path.
49876
49877  input_path="$new_path"
49878  # Check if we need to convert this using DOS-style short mode. If the path
49879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49880  # take no chances and rewrite it.
49881  # Note: m4 eats our [], so we need to use [ and ] instead.
49882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49883  if test "x$has_forbidden_chars" != x; then
49884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49888      # Going to short mode and back again did indeed matter. Since short mode is
49889      # case insensitive, let's make it lowercase to improve readability.
49890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49891      # Now convert it back to Unix-style (cygpath)
49892      input_path=`$CYGPATH -u "$shortmode_path"`
49893      new_path="$input_path"
49894    fi
49895  fi
49896
49897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49898  if test "x$test_cygdrive_prefix" = x; then
49899    # As a simple fix, exclude /usr/bin since it's not a real path.
49900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49902      # a path prefixed by /cygdrive for fixpath to work.
49903      new_path="$CYGWIN_ROOT_PATH$input_path"
49904    fi
49905  fi
49906
49907
49908  if test "x$path" != "x$new_path"; then
49909    MSVC_DLL="$new_path"
49910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49912  fi
49913
49914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49915
49916  path="$MSVC_DLL"
49917  has_colon=`$ECHO $path | $GREP ^.:`
49918  new_path="$path"
49919  if test "x$has_colon" = x; then
49920    # Not in mixed or Windows style, start by that.
49921    new_path=`cmd //c echo $path`
49922  fi
49923
49924
49925  input_path="$new_path"
49926  # Check if we need to convert this using DOS-style short mode. If the path
49927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49928  # take no chances and rewrite it.
49929  # Note: m4 eats our [], so we need to use [ and ] instead.
49930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49931  if test "x$has_forbidden_chars" != x; then
49932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49934  fi
49935
49936
49937  windows_path="$new_path"
49938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49939    unix_path=`$CYGPATH -u "$windows_path"`
49940    new_path="$unix_path"
49941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49943    new_path="$unix_path"
49944  fi
49945
49946  if test "x$path" != "x$new_path"; then
49947    MSVC_DLL="$new_path"
49948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49949$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49950  fi
49951
49952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49954
49955    else
49956      # We're on a unix platform. Hooray! :)
49957      path="$MSVC_DLL"
49958      has_space=`$ECHO "$path" | $GREP " "`
49959      if test "x$has_space" != x; then
49960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49961$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49963      fi
49964
49965      # Use eval to expand a potential ~
49966      eval path="$path"
49967      if test ! -f "$path" && test ! -d "$path"; then
49968        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49969      fi
49970
49971      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49972    fi
49973  fi
49974
49975      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49976$as_echo_n "checking for $DLL_NAME... " >&6; }
49977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49978$as_echo "$MSVC_DLL" >&6; }
49979    else
49980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49981$as_echo "incorrect, ignoring" >&6; }
49982      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49983$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49984    fi
49985  fi
49986
49987    fi
49988  fi
49989
49990  if test "x$MSVC_DLL" = x; then
49991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49992$as_echo_n "checking for $DLL_NAME... " >&6; }
49993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49994$as_echo "no" >&6; }
49995    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49996  fi
49997
49998      MSVCP_DLL="$MSVC_DLL"
49999    fi
50000
50001  fi
50002
50003  fi
50004
50005
50006  if test "x$NEEDS_LIB_X11" = xfalse; then
50007    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50008      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50009$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50010    fi
50011    X_CFLAGS=
50012    X_LIBS=
50013  else
50014
50015    if test "x${with_x}" = xno; then
50016      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50017    fi
50018
50019    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50020      # The user has specified a X11 base directory. Use it for includes and
50021      # libraries, unless explicitely overridden.
50022      if test "x$x_includes" = xNONE; then
50023        x_includes="${with_x}/include"
50024      fi
50025      if test "x$x_libraries" = xNONE; then
50026        x_libraries="${with_x}/lib"
50027      fi
50028    else
50029      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50030      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50031      # --x-libraries for the sysroot, if that seems to be correct.
50032      if test "x$SYSROOT" != "x"; then
50033        if test "x$x_includes" = xNONE; then
50034          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50035            x_includes="$SYSROOT/usr/X11R6/include"
50036          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50037            x_includes="$SYSROOT/usr/include"
50038          fi
50039        fi
50040        if test "x$x_libraries" = xNONE; then
50041          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50042            x_libraries="$SYSROOT/usr/X11R6/lib"
50043          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50044            x_libraries="$SYSROOT/usr/lib64"
50045          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50046            x_libraries="$SYSROOT/usr/lib"
50047          fi
50048        fi
50049      fi
50050    fi
50051
50052    # Now let autoconf do it's magic
50053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50054$as_echo_n "checking for X... " >&6; }
50055
50056
50057# Check whether --with-x was given.
50058if test "${with_x+set}" = set; then :
50059  withval=$with_x;
50060fi
50061
50062# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50063if test "x$with_x" = xno; then
50064  # The user explicitly disabled X.
50065  have_x=disabled
50066else
50067  case $x_includes,$x_libraries in #(
50068    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50069    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50070  $as_echo_n "(cached) " >&6
50071else
50072  # One or both of the vars are not set, and there is no cached value.
50073ac_x_includes=no ac_x_libraries=no
50074rm -f -r conftest.dir
50075if mkdir conftest.dir; then
50076  cd conftest.dir
50077  cat >Imakefile <<'_ACEOF'
50078incroot:
50079	@echo incroot='${INCROOT}'
50080usrlibdir:
50081	@echo usrlibdir='${USRLIBDIR}'
50082libdir:
50083	@echo libdir='${LIBDIR}'
50084_ACEOF
50085  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50086    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50087    for ac_var in incroot usrlibdir libdir; do
50088      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50089    done
50090    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50091    for ac_extension in a so sl dylib la dll; do
50092      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50093	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50094	ac_im_usrlibdir=$ac_im_libdir; break
50095      fi
50096    done
50097    # Screen out bogus values from the imake configuration.  They are
50098    # bogus both because they are the default anyway, and because
50099    # using them would break gcc on systems where it needs fixed includes.
50100    case $ac_im_incroot in
50101	/usr/include) ac_x_includes= ;;
50102	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50103    esac
50104    case $ac_im_usrlibdir in
50105	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50106	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50107    esac
50108  fi
50109  cd ..
50110  rm -f -r conftest.dir
50111fi
50112
50113# Standard set of common directories for X headers.
50114# Check X11 before X11Rn because it is often a symlink to the current release.
50115ac_x_header_dirs='
50116/usr/X11/include
50117/usr/X11R7/include
50118/usr/X11R6/include
50119/usr/X11R5/include
50120/usr/X11R4/include
50121
50122/usr/include/X11
50123/usr/include/X11R7
50124/usr/include/X11R6
50125/usr/include/X11R5
50126/usr/include/X11R4
50127
50128/usr/local/X11/include
50129/usr/local/X11R7/include
50130/usr/local/X11R6/include
50131/usr/local/X11R5/include
50132/usr/local/X11R4/include
50133
50134/usr/local/include/X11
50135/usr/local/include/X11R7
50136/usr/local/include/X11R6
50137/usr/local/include/X11R5
50138/usr/local/include/X11R4
50139
50140/usr/X386/include
50141/usr/x386/include
50142/usr/XFree86/include/X11
50143
50144/usr/include
50145/usr/local/include
50146/usr/unsupported/include
50147/usr/athena/include
50148/usr/local/x11r5/include
50149/usr/lpp/Xamples/include
50150
50151/usr/openwin/include
50152/usr/openwin/share/include'
50153
50154if test "$ac_x_includes" = no; then
50155  # Guess where to find include files, by looking for Xlib.h.
50156  # First, try using that file with no special directory specified.
50157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50158/* end confdefs.h.  */
50159#include <X11/Xlib.h>
50160_ACEOF
50161if ac_fn_cxx_try_cpp "$LINENO"; then :
50162  # We can compile using X headers with no special include directory.
50163ac_x_includes=
50164else
50165  for ac_dir in $ac_x_header_dirs; do
50166  if test -r "$ac_dir/X11/Xlib.h"; then
50167    ac_x_includes=$ac_dir
50168    break
50169  fi
50170done
50171fi
50172rm -f conftest.err conftest.i conftest.$ac_ext
50173fi # $ac_x_includes = no
50174
50175if test "$ac_x_libraries" = no; then
50176  # Check for the libraries.
50177  # See if we find them without any special options.
50178  # Don't add to $LIBS permanently.
50179  ac_save_LIBS=$LIBS
50180  LIBS="-lX11 $LIBS"
50181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50182/* end confdefs.h.  */
50183#include <X11/Xlib.h>
50184int
50185main ()
50186{
50187XrmInitialize ()
50188  ;
50189  return 0;
50190}
50191_ACEOF
50192if ac_fn_cxx_try_link "$LINENO"; then :
50193  LIBS=$ac_save_LIBS
50194# We can link X programs with no special library path.
50195ac_x_libraries=
50196else
50197  LIBS=$ac_save_LIBS
50198for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50199do
50200  # Don't even attempt the hair of trying to link an X program!
50201  for ac_extension in a so sl dylib la dll; do
50202    if test -r "$ac_dir/libX11.$ac_extension"; then
50203      ac_x_libraries=$ac_dir
50204      break 2
50205    fi
50206  done
50207done
50208fi
50209rm -f core conftest.err conftest.$ac_objext \
50210    conftest$ac_exeext conftest.$ac_ext
50211fi # $ac_x_libraries = no
50212
50213case $ac_x_includes,$ac_x_libraries in #(
50214  no,* | *,no | *\'*)
50215    # Didn't find X, or a directory has "'" in its name.
50216    ac_cv_have_x="have_x=no";; #(
50217  *)
50218    # Record where we found X for the cache.
50219    ac_cv_have_x="have_x=yes\
50220	ac_x_includes='$ac_x_includes'\
50221	ac_x_libraries='$ac_x_libraries'"
50222esac
50223fi
50224;; #(
50225    *) have_x=yes;;
50226  esac
50227  eval "$ac_cv_have_x"
50228fi # $with_x != no
50229
50230if test "$have_x" != yes; then
50231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50232$as_echo "$have_x" >&6; }
50233  no_x=yes
50234else
50235  # If each of the values was on the command line, it overrides each guess.
50236  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50237  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50238  # Update the cache value to reflect the command line values.
50239  ac_cv_have_x="have_x=yes\
50240	ac_x_includes='$x_includes'\
50241	ac_x_libraries='$x_libraries'"
50242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50243$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50244fi
50245
50246    if test "$no_x" = yes; then
50247  # Not all programs may use this symbol, but it does not hurt to define it.
50248
50249$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50250
50251  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50252else
50253  if test -n "$x_includes"; then
50254    X_CFLAGS="$X_CFLAGS -I$x_includes"
50255  fi
50256
50257  # It would also be nice to do this for all -L options, not just this one.
50258  if test -n "$x_libraries"; then
50259    X_LIBS="$X_LIBS -L$x_libraries"
50260    # For Solaris; some versions of Sun CC require a space after -R and
50261    # others require no space.  Words are not sufficient . . . .
50262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50263$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50264    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50265    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50266    ac_cxx_werror_flag=yes
50267    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50268/* end confdefs.h.  */
50269
50270int
50271main ()
50272{
50273
50274  ;
50275  return 0;
50276}
50277_ACEOF
50278if ac_fn_cxx_try_link "$LINENO"; then :
50279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50280$as_echo "no" >&6; }
50281       X_LIBS="$X_LIBS -R$x_libraries"
50282else
50283  LIBS="$ac_xsave_LIBS -R $x_libraries"
50284       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50285/* end confdefs.h.  */
50286
50287int
50288main ()
50289{
50290
50291  ;
50292  return 0;
50293}
50294_ACEOF
50295if ac_fn_cxx_try_link "$LINENO"; then :
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50297$as_echo "yes" >&6; }
50298	  X_LIBS="$X_LIBS -R $x_libraries"
50299else
50300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
50301$as_echo "neither works" >&6; }
50302fi
50303rm -f core conftest.err conftest.$ac_objext \
50304    conftest$ac_exeext conftest.$ac_ext
50305fi
50306rm -f core conftest.err conftest.$ac_objext \
50307    conftest$ac_exeext conftest.$ac_ext
50308    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
50309    LIBS=$ac_xsave_LIBS
50310  fi
50311
50312  # Check for system-dependent libraries X programs must link with.
50313  # Do this before checking for the system-independent R6 libraries
50314  # (-lICE), since we may need -lsocket or whatever for X linking.
50315
50316  if test "$ISC" = yes; then
50317    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
50318  else
50319    # Martyn Johnson says this is needed for Ultrix, if the X
50320    # libraries were built with DECnet support.  And Karl Berry says
50321    # the Alpha needs dnet_stub (dnet does not exist).
50322    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
50323    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50324/* end confdefs.h.  */
50325
50326/* Override any GCC internal prototype to avoid an error.
50327   Use char because int might match the return type of a GCC
50328   builtin and then its argument prototype would still apply.  */
50329#ifdef __cplusplus
50330extern "C"
50331#endif
50332char XOpenDisplay ();
50333int
50334main ()
50335{
50336return XOpenDisplay ();
50337  ;
50338  return 0;
50339}
50340_ACEOF
50341if ac_fn_cxx_try_link "$LINENO"; then :
50342
50343else
50344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
50345$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
50346if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
50347  $as_echo_n "(cached) " >&6
50348else
50349  ac_check_lib_save_LIBS=$LIBS
50350LIBS="-ldnet  $LIBS"
50351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50352/* end confdefs.h.  */
50353
50354/* Override any GCC internal prototype to avoid an error.
50355   Use char because int might match the return type of a GCC
50356   builtin and then its argument prototype would still apply.  */
50357#ifdef __cplusplus
50358extern "C"
50359#endif
50360char dnet_ntoa ();
50361int
50362main ()
50363{
50364return dnet_ntoa ();
50365  ;
50366  return 0;
50367}
50368_ACEOF
50369if ac_fn_cxx_try_link "$LINENO"; then :
50370  ac_cv_lib_dnet_dnet_ntoa=yes
50371else
50372  ac_cv_lib_dnet_dnet_ntoa=no
50373fi
50374rm -f core conftest.err conftest.$ac_objext \
50375    conftest$ac_exeext conftest.$ac_ext
50376LIBS=$ac_check_lib_save_LIBS
50377fi
50378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
50379$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
50380if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
50381  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
50382fi
50383
50384    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
50385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
50386$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
50387if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
50388  $as_echo_n "(cached) " >&6
50389else
50390  ac_check_lib_save_LIBS=$LIBS
50391LIBS="-ldnet_stub  $LIBS"
50392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50393/* end confdefs.h.  */
50394
50395/* Override any GCC internal prototype to avoid an error.
50396   Use char because int might match the return type of a GCC
50397   builtin and then its argument prototype would still apply.  */
50398#ifdef __cplusplus
50399extern "C"
50400#endif
50401char dnet_ntoa ();
50402int
50403main ()
50404{
50405return dnet_ntoa ();
50406  ;
50407  return 0;
50408}
50409_ACEOF
50410if ac_fn_cxx_try_link "$LINENO"; then :
50411  ac_cv_lib_dnet_stub_dnet_ntoa=yes
50412else
50413  ac_cv_lib_dnet_stub_dnet_ntoa=no
50414fi
50415rm -f core conftest.err conftest.$ac_objext \
50416    conftest$ac_exeext conftest.$ac_ext
50417LIBS=$ac_check_lib_save_LIBS
50418fi
50419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
50420$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
50421if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
50422  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
50423fi
50424
50425    fi
50426fi
50427rm -f core conftest.err conftest.$ac_objext \
50428    conftest$ac_exeext conftest.$ac_ext
50429    LIBS="$ac_xsave_LIBS"
50430
50431    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
50432    # to get the SysV transport functions.
50433    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
50434    # needs -lnsl.
50435    # The nsl library prevents programs from opening the X display
50436    # on Irix 5.2, according to T.E. Dickey.
50437    # The functions gethostbyname, getservbyname, and inet_addr are
50438    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
50439    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
50440if test "x$ac_cv_func_gethostbyname" = xyes; then :
50441
50442fi
50443
50444    if test $ac_cv_func_gethostbyname = no; then
50445      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
50446$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
50447if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
50448  $as_echo_n "(cached) " >&6
50449else
50450  ac_check_lib_save_LIBS=$LIBS
50451LIBS="-lnsl  $LIBS"
50452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50453/* end confdefs.h.  */
50454
50455/* Override any GCC internal prototype to avoid an error.
50456   Use char because int might match the return type of a GCC
50457   builtin and then its argument prototype would still apply.  */
50458#ifdef __cplusplus
50459extern "C"
50460#endif
50461char gethostbyname ();
50462int
50463main ()
50464{
50465return gethostbyname ();
50466  ;
50467  return 0;
50468}
50469_ACEOF
50470if ac_fn_cxx_try_link "$LINENO"; then :
50471  ac_cv_lib_nsl_gethostbyname=yes
50472else
50473  ac_cv_lib_nsl_gethostbyname=no
50474fi
50475rm -f core conftest.err conftest.$ac_objext \
50476    conftest$ac_exeext conftest.$ac_ext
50477LIBS=$ac_check_lib_save_LIBS
50478fi
50479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
50480$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
50481if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
50482  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
50483fi
50484
50485      if test $ac_cv_lib_nsl_gethostbyname = no; then
50486	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
50487$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
50488if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
50489  $as_echo_n "(cached) " >&6
50490else
50491  ac_check_lib_save_LIBS=$LIBS
50492LIBS="-lbsd  $LIBS"
50493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50494/* end confdefs.h.  */
50495
50496/* Override any GCC internal prototype to avoid an error.
50497   Use char because int might match the return type of a GCC
50498   builtin and then its argument prototype would still apply.  */
50499#ifdef __cplusplus
50500extern "C"
50501#endif
50502char gethostbyname ();
50503int
50504main ()
50505{
50506return gethostbyname ();
50507  ;
50508  return 0;
50509}
50510_ACEOF
50511if ac_fn_cxx_try_link "$LINENO"; then :
50512  ac_cv_lib_bsd_gethostbyname=yes
50513else
50514  ac_cv_lib_bsd_gethostbyname=no
50515fi
50516rm -f core conftest.err conftest.$ac_objext \
50517    conftest$ac_exeext conftest.$ac_ext
50518LIBS=$ac_check_lib_save_LIBS
50519fi
50520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
50521$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
50522if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
50523  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
50524fi
50525
50526      fi
50527    fi
50528
50529    # lieder@skyler.mavd.honeywell.com says without -lsocket,
50530    # socket/setsockopt and other routines are undefined under SCO ODT
50531    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
50532    # on later versions), says Simon Leinen: it contains gethostby*
50533    # variants that don't use the name server (or something).  -lsocket
50534    # must be given before -lnsl if both are needed.  We assume that
50535    # if connect needs -lnsl, so does gethostbyname.
50536    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
50537if test "x$ac_cv_func_connect" = xyes; then :
50538
50539fi
50540
50541    if test $ac_cv_func_connect = no; then
50542      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
50543$as_echo_n "checking for connect in -lsocket... " >&6; }
50544if ${ac_cv_lib_socket_connect+:} false; then :
50545  $as_echo_n "(cached) " >&6
50546else
50547  ac_check_lib_save_LIBS=$LIBS
50548LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
50549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50550/* end confdefs.h.  */
50551
50552/* Override any GCC internal prototype to avoid an error.
50553   Use char because int might match the return type of a GCC
50554   builtin and then its argument prototype would still apply.  */
50555#ifdef __cplusplus
50556extern "C"
50557#endif
50558char connect ();
50559int
50560main ()
50561{
50562return connect ();
50563  ;
50564  return 0;
50565}
50566_ACEOF
50567if ac_fn_cxx_try_link "$LINENO"; then :
50568  ac_cv_lib_socket_connect=yes
50569else
50570  ac_cv_lib_socket_connect=no
50571fi
50572rm -f core conftest.err conftest.$ac_objext \
50573    conftest$ac_exeext conftest.$ac_ext
50574LIBS=$ac_check_lib_save_LIBS
50575fi
50576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
50577$as_echo "$ac_cv_lib_socket_connect" >&6; }
50578if test "x$ac_cv_lib_socket_connect" = xyes; then :
50579  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
50580fi
50581
50582    fi
50583
50584    # Guillermo Gomez says -lposix is necessary on A/UX.
50585    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
50586if test "x$ac_cv_func_remove" = xyes; then :
50587
50588fi
50589
50590    if test $ac_cv_func_remove = no; then
50591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
50592$as_echo_n "checking for remove in -lposix... " >&6; }
50593if ${ac_cv_lib_posix_remove+:} false; then :
50594  $as_echo_n "(cached) " >&6
50595else
50596  ac_check_lib_save_LIBS=$LIBS
50597LIBS="-lposix  $LIBS"
50598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50599/* end confdefs.h.  */
50600
50601/* Override any GCC internal prototype to avoid an error.
50602   Use char because int might match the return type of a GCC
50603   builtin and then its argument prototype would still apply.  */
50604#ifdef __cplusplus
50605extern "C"
50606#endif
50607char remove ();
50608int
50609main ()
50610{
50611return remove ();
50612  ;
50613  return 0;
50614}
50615_ACEOF
50616if ac_fn_cxx_try_link "$LINENO"; then :
50617  ac_cv_lib_posix_remove=yes
50618else
50619  ac_cv_lib_posix_remove=no
50620fi
50621rm -f core conftest.err conftest.$ac_objext \
50622    conftest$ac_exeext conftest.$ac_ext
50623LIBS=$ac_check_lib_save_LIBS
50624fi
50625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
50626$as_echo "$ac_cv_lib_posix_remove" >&6; }
50627if test "x$ac_cv_lib_posix_remove" = xyes; then :
50628  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
50629fi
50630
50631    fi
50632
50633    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
50634    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
50635if test "x$ac_cv_func_shmat" = xyes; then :
50636
50637fi
50638
50639    if test $ac_cv_func_shmat = no; then
50640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
50641$as_echo_n "checking for shmat in -lipc... " >&6; }
50642if ${ac_cv_lib_ipc_shmat+:} false; then :
50643  $as_echo_n "(cached) " >&6
50644else
50645  ac_check_lib_save_LIBS=$LIBS
50646LIBS="-lipc  $LIBS"
50647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50648/* end confdefs.h.  */
50649
50650/* Override any GCC internal prototype to avoid an error.
50651   Use char because int might match the return type of a GCC
50652   builtin and then its argument prototype would still apply.  */
50653#ifdef __cplusplus
50654extern "C"
50655#endif
50656char shmat ();
50657int
50658main ()
50659{
50660return shmat ();
50661  ;
50662  return 0;
50663}
50664_ACEOF
50665if ac_fn_cxx_try_link "$LINENO"; then :
50666  ac_cv_lib_ipc_shmat=yes
50667else
50668  ac_cv_lib_ipc_shmat=no
50669fi
50670rm -f core conftest.err conftest.$ac_objext \
50671    conftest$ac_exeext conftest.$ac_ext
50672LIBS=$ac_check_lib_save_LIBS
50673fi
50674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
50675$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
50676if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
50677  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
50678fi
50679
50680    fi
50681  fi
50682
50683  # Check for libraries that X11R6 Xt/Xaw programs need.
50684  ac_save_LDFLAGS=$LDFLAGS
50685  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
50686  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
50687  # check for ICE first), but we must link in the order -lSM -lICE or
50688  # we get undefined symbols.  So assume we have SM if we have ICE.
50689  # These have to be linked with before -lX11, unlike the other
50690  # libraries we check for below, so use a different variable.
50691  # John Interrante, Karl Berry
50692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
50693$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
50694if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
50695  $as_echo_n "(cached) " >&6
50696else
50697  ac_check_lib_save_LIBS=$LIBS
50698LIBS="-lICE $X_EXTRA_LIBS $LIBS"
50699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50700/* end confdefs.h.  */
50701
50702/* Override any GCC internal prototype to avoid an error.
50703   Use char because int might match the return type of a GCC
50704   builtin and then its argument prototype would still apply.  */
50705#ifdef __cplusplus
50706extern "C"
50707#endif
50708char IceConnectionNumber ();
50709int
50710main ()
50711{
50712return IceConnectionNumber ();
50713  ;
50714  return 0;
50715}
50716_ACEOF
50717if ac_fn_cxx_try_link "$LINENO"; then :
50718  ac_cv_lib_ICE_IceConnectionNumber=yes
50719else
50720  ac_cv_lib_ICE_IceConnectionNumber=no
50721fi
50722rm -f core conftest.err conftest.$ac_objext \
50723    conftest$ac_exeext conftest.$ac_ext
50724LIBS=$ac_check_lib_save_LIBS
50725fi
50726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
50727$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
50728if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
50729  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
50730fi
50731
50732  LDFLAGS=$ac_save_LDFLAGS
50733
50734fi
50735
50736
50737    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
50738    # this doesn't make sense so we remove it.
50739    if test "x$COMPILE_TYPE" = xcross; then
50740      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
50741    fi
50742
50743    if test "x$no_x" = xyes; then
50744
50745  # Print a helpful message on how to acquire the necessary build dependency.
50746  # x11 is the help tag: freetype, cups, alsa etc
50747  MISSING_DEPENDENCY=x11
50748
50749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50750    cygwin_help $MISSING_DEPENDENCY
50751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50752    msys_help $MISSING_DEPENDENCY
50753  else
50754    PKGHANDLER_COMMAND=
50755
50756    case $PKGHANDLER in
50757      apt-get)
50758        apt_help     $MISSING_DEPENDENCY ;;
50759      yum)
50760        yum_help     $MISSING_DEPENDENCY ;;
50761      port)
50762        port_help    $MISSING_DEPENDENCY ;;
50763      pkgutil)
50764        pkgutil_help $MISSING_DEPENDENCY ;;
50765      pkgadd)
50766        pkgadd_help  $MISSING_DEPENDENCY ;;
50767    esac
50768
50769    if test "x$PKGHANDLER_COMMAND" != x; then
50770      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50771    fi
50772  fi
50773
50774      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
50775    fi
50776
50777    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50778      OPENWIN_HOME="/usr/openwin"
50779      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
50780      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50781          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
50782          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
50783          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
50784    fi
50785
50786    ac_ext=c
50787ac_cpp='$CPP $CPPFLAGS'
50788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50790ac_compiler_gnu=$ac_cv_c_compiler_gnu
50791
50792    OLD_CFLAGS="$CFLAGS"
50793    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
50794
50795    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
50796    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
50797do :
50798  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50799ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
50800          # include <X11/Xlib.h>
50801          # include <X11/Xutil.h>
50802
50803
50804"
50805if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50806  cat >>confdefs.h <<_ACEOF
50807#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50808_ACEOF
50809 X11_HEADERS_OK=yes
50810else
50811  X11_HEADERS_OK=no; break
50812fi
50813
50814done
50815
50816
50817    if test "x$X11_HEADERS_OK" = xno; then
50818
50819  # Print a helpful message on how to acquire the necessary build dependency.
50820  # x11 is the help tag: freetype, cups, alsa etc
50821  MISSING_DEPENDENCY=x11
50822
50823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50824    cygwin_help $MISSING_DEPENDENCY
50825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50826    msys_help $MISSING_DEPENDENCY
50827  else
50828    PKGHANDLER_COMMAND=
50829
50830    case $PKGHANDLER in
50831      apt-get)
50832        apt_help     $MISSING_DEPENDENCY ;;
50833      yum)
50834        yum_help     $MISSING_DEPENDENCY ;;
50835      port)
50836        port_help    $MISSING_DEPENDENCY ;;
50837      pkgutil)
50838        pkgutil_help $MISSING_DEPENDENCY ;;
50839      pkgadd)
50840        pkgadd_help  $MISSING_DEPENDENCY ;;
50841    esac
50842
50843    if test "x$PKGHANDLER_COMMAND" != x; then
50844      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50845    fi
50846  fi
50847
50848      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
50849    fi
50850
50851    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
50852    # defined in libawt_xawt.
50853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
50854$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
50855    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50856/* end confdefs.h.  */
50857#include <X11/extensions/Xrender.h>
50858int
50859main ()
50860{
50861XLinearGradient x;
50862  ;
50863  return 0;
50864}
50865_ACEOF
50866if ac_fn_c_try_compile "$LINENO"; then :
50867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50868$as_echo "yes" >&6; }
50869else
50870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50871$as_echo "no" >&6; }
50872         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
50873fi
50874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50875
50876    CFLAGS="$OLD_CFLAGS"
50877    ac_ext=cpp
50878ac_cpp='$CXXCPP $CPPFLAGS'
50879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50882
50883  fi # NEEDS_LIB_X11
50884
50885
50886
50887
50888
50889
50890# Check whether --with-cups was given.
50891if test "${with_cups+set}" = set; then :
50892  withval=$with_cups;
50893fi
50894
50895
50896# Check whether --with-cups-include was given.
50897if test "${with_cups_include+set}" = set; then :
50898  withval=$with_cups_include;
50899fi
50900
50901
50902  if test "x$NEEDS_LIB_CUPS" = xfalse; then
50903    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
50904        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
50905      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
50906$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
50907    fi
50908    CUPS_CFLAGS=
50909  else
50910    CUPS_FOUND=no
50911
50912    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
50913      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
50914    fi
50915
50916    if test "x${with_cups}" != x; then
50917      CUPS_CFLAGS="-I${with_cups}/include"
50918      CUPS_FOUND=yes
50919    fi
50920    if test "x${with_cups_include}" != x; then
50921      CUPS_CFLAGS="-I${with_cups_include}"
50922      CUPS_FOUND=yes
50923    fi
50924    if test "x$CUPS_FOUND" = xno; then
50925      # Are the cups headers installed in the default /usr/include location?
50926      for ac_header in cups/cups.h cups/ppd.h
50927do :
50928  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50929ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
50930if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50931  cat >>confdefs.h <<_ACEOF
50932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50933_ACEOF
50934
50935          CUPS_FOUND=yes
50936          CUPS_CFLAGS=
50937          DEFAULT_CUPS=yes
50938
50939fi
50940
50941done
50942
50943    fi
50944    if test "x$CUPS_FOUND" = xno; then
50945      # Getting nervous now? Lets poke around for standard Solaris third-party
50946      # package installation locations.
50947      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
50948$as_echo_n "checking for cups headers... " >&6; }
50949      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
50950        # An SFW package seems to be installed!
50951        CUPS_FOUND=yes
50952        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
50953      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
50954        # A CSW package seems to be installed!
50955        CUPS_FOUND=yes
50956        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
50957      fi
50958      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
50959$as_echo "$CUPS_FOUND" >&6; }
50960    fi
50961    if test "x$CUPS_FOUND" = xno; then
50962
50963  # Print a helpful message on how to acquire the necessary build dependency.
50964  # cups is the help tag: freetype, cups, alsa etc
50965  MISSING_DEPENDENCY=cups
50966
50967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50968    cygwin_help $MISSING_DEPENDENCY
50969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50970    msys_help $MISSING_DEPENDENCY
50971  else
50972    PKGHANDLER_COMMAND=
50973
50974    case $PKGHANDLER in
50975      apt-get)
50976        apt_help     $MISSING_DEPENDENCY ;;
50977      yum)
50978        yum_help     $MISSING_DEPENDENCY ;;
50979      port)
50980        port_help    $MISSING_DEPENDENCY ;;
50981      pkgutil)
50982        pkgutil_help $MISSING_DEPENDENCY ;;
50983      pkgadd)
50984        pkgadd_help  $MISSING_DEPENDENCY ;;
50985    esac
50986
50987    if test "x$PKGHANDLER_COMMAND" != x; then
50988      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50989    fi
50990  fi
50991
50992      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
50993    fi
50994  fi
50995
50996
50997
50998
50999
51000# Check whether --with-freetype was given.
51001if test "${with_freetype+set}" = set; then :
51002  withval=$with_freetype;
51003fi
51004
51005
51006# Check whether --with-freetype-include was given.
51007if test "${with_freetype_include+set}" = set; then :
51008  withval=$with_freetype_include;
51009fi
51010
51011
51012# Check whether --with-freetype-lib was given.
51013if test "${with_freetype_lib+set}" = set; then :
51014  withval=$with_freetype_lib;
51015fi
51016
51017
51018# Check whether --with-freetype-src was given.
51019if test "${with_freetype_src+set}" = set; then :
51020  withval=$with_freetype_src;
51021fi
51022
51023  # Check whether --enable-freetype-bundling was given.
51024if test "${enable_freetype_bundling+set}" = set; then :
51025  enableval=$enable_freetype_bundling;
51026fi
51027
51028
51029  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51030  FREETYPE_BASE_NAME=freetype
51031  FREETYPE_CFLAGS=
51032  FREETYPE_LIBS=
51033  FREETYPE_BUNDLE_LIB_PATH=
51034
51035  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51036    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51037        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51038        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51039        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51040      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51041$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51042    fi
51043    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51044      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51045$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51046    fi
51047  else
51048    # freetype is needed to build; go get it!
51049
51050    BUNDLE_FREETYPE="$enable_freetype_bundling"
51051
51052    if  test "x$with_freetype_src" != x; then
51053      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51054        # Try to build freetype if --with-freetype-src was given on Windows
51055
51056  FREETYPE_SRC_PATH="$with_freetype_src"
51057  BUILD_FREETYPE=yes
51058
51059  # Check if the freetype sources are acessible..
51060  if ! test -d $FREETYPE_SRC_PATH; then
51061    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
51062$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51063    BUILD_FREETYPE=no
51064  fi
51065  # ..and contain a vc2010 project file
51066  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51067  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51068    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
51069$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51070    BUILD_FREETYPE=no
51071  fi
51072  # Now check if configure found a version of 'msbuild.exe'
51073  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51074    { $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
51075$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;}
51076    BUILD_FREETYPE=no
51077  fi
51078
51079  # Ready to go..
51080  if test "x$BUILD_FREETYPE" = xyes; then
51081    # msbuild requires trailing slashes for output directories
51082    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51083    freetype_lib_path_unix="$freetype_lib_path"
51084    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51085
51086  unix_path="$vcxproj_path"
51087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51088    windows_path=`$CYGPATH -m "$unix_path"`
51089    vcxproj_path="$windows_path"
51090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51091    windows_path=`cmd //c echo $unix_path`
51092    vcxproj_path="$windows_path"
51093  fi
51094
51095
51096  unix_path="$freetype_lib_path"
51097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51098    windows_path=`$CYGPATH -m "$unix_path"`
51099    freetype_lib_path="$windows_path"
51100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51101    windows_path=`cmd //c echo $unix_path`
51102    freetype_lib_path="$windows_path"
51103  fi
51104
51105
51106  unix_path="$freetype_obj_path"
51107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51108    windows_path=`$CYGPATH -m "$unix_path"`
51109    freetype_obj_path="$windows_path"
51110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51111    windows_path=`cmd //c echo $unix_path`
51112    freetype_obj_path="$windows_path"
51113  fi
51114
51115    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51116      freetype_platform=x64
51117    else
51118      freetype_platform=win32
51119    fi
51120
51121    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51122    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51123    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51124    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51125    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51126$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51127
51128    # First we try to build the freetype.dll
51129    $ECHO -e "@echo off\n"\
51130        "$MSBUILD $vcxproj_path "\
51131        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51132        "/p:Configuration=\"Release Multithreaded\" "\
51133        "/p:Platform=$freetype_platform "\
51134        "/p:ConfigurationType=DynamicLibrary "\
51135        "/p:TargetName=freetype "\
51136        "/p:OutDir=\"$freetype_lib_path\" "\
51137        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51138    cmd /c freetype.bat
51139
51140    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51141      # If that succeeds we also build freetype.lib
51142      $ECHO -e "@echo off\n"\
51143          "$MSBUILD $vcxproj_path "\
51144          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51145          "/p:Configuration=\"Release Multithreaded\" "\
51146          "/p:Platform=$freetype_platform "\
51147          "/p:ConfigurationType=StaticLibrary "\
51148          "/p:TargetName=freetype "\
51149          "/p:OutDir=\"$freetype_lib_path\" "\
51150          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51151      cmd /c freetype.bat
51152
51153      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51154        # Once we build both, lib and dll, set freetype lib and include path appropriately
51155        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51156        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51157        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51158$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51159      else
51160        BUILD_FREETYPE=no
51161      fi
51162    else
51163      BUILD_FREETYPE=no
51164    fi
51165  fi
51166
51167        if test "x$BUILD_FREETYPE" = xyes; then
51168          # Okay, we built it. Check that it works.
51169
51170  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51171  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51172  METHOD="--with-freetype-src"
51173
51174  # Let's start with an optimistic view of the world :-)
51175  FOUND_FREETYPE=yes
51176
51177  # First look for the canonical freetype main include file ft2build.h.
51178  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51179    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51180    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51181    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51182      # Fail.
51183      FOUND_FREETYPE=no
51184    fi
51185  fi
51186
51187  if test "x$FOUND_FREETYPE" = xyes; then
51188    # Include file found, let's continue the sanity check.
51189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51190$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51191
51192    # Reset to default value
51193    FREETYPE_BASE_NAME=freetype
51194    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51195    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51196      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51198        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51199        # for the .6 version explicitly.
51200        FREETYPE_BASE_NAME=freetype.6
51201        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51202        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51203$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51204      else
51205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51206$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51207        FOUND_FREETYPE=no
51208      fi
51209    else
51210      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51211        # On Windows, we will need both .lib and .dll file.
51212        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51213          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51215          FOUND_FREETYPE=no
51216        fi
51217      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51218          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51219        # Found lib in isa dir, use that instead.
51220        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51221        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51222$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51223      fi
51224    fi
51225  fi
51226
51227  if test "x$FOUND_FREETYPE" = xyes; then
51228
51229  # Only process if variable expands to non-empty
51230
51231  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51233
51234  # Input might be given as Windows format, start by converting to
51235  # unix format.
51236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51237  new_path=`$CYGPATH -u "$path"`
51238
51239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51242  # "foo.exe" is OK but "foo" is an error.
51243  #
51244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51245  # It is also a way to make sure we got the proper file name for the real test later on.
51246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51247  if test "x$test_shortpath" = x; then
51248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51250    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51251  fi
51252
51253  # Call helper function which possibly converts this using DOS-style short mode.
51254  # If so, the updated path is stored in $new_path.
51255
51256  input_path="$new_path"
51257  # Check if we need to convert this using DOS-style short mode. If the path
51258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51259  # take no chances and rewrite it.
51260  # Note: m4 eats our [], so we need to use [ and ] instead.
51261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51262  if test "x$has_forbidden_chars" != x; then
51263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51267      # Going to short mode and back again did indeed matter. Since short mode is
51268      # case insensitive, let's make it lowercase to improve readability.
51269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51270      # Now convert it back to Unix-style (cygpath)
51271      input_path=`$CYGPATH -u "$shortmode_path"`
51272      new_path="$input_path"
51273    fi
51274  fi
51275
51276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51277  if test "x$test_cygdrive_prefix" = x; then
51278    # As a simple fix, exclude /usr/bin since it's not a real path.
51279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51281      # a path prefixed by /cygdrive for fixpath to work.
51282      new_path="$CYGWIN_ROOT_PATH$input_path"
51283    fi
51284  fi
51285
51286
51287  if test "x$path" != "x$new_path"; then
51288    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51291  fi
51292
51293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51294
51295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51296  has_colon=`$ECHO $path | $GREP ^.:`
51297  new_path="$path"
51298  if test "x$has_colon" = x; then
51299    # Not in mixed or Windows style, start by that.
51300    new_path=`cmd //c echo $path`
51301  fi
51302
51303
51304  input_path="$new_path"
51305  # Check if we need to convert this using DOS-style short mode. If the path
51306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51307  # take no chances and rewrite it.
51308  # Note: m4 eats our [], so we need to use [ and ] instead.
51309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51310  if test "x$has_forbidden_chars" != x; then
51311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51313  fi
51314
51315
51316  windows_path="$new_path"
51317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51318    unix_path=`$CYGPATH -u "$windows_path"`
51319    new_path="$unix_path"
51320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51322    new_path="$unix_path"
51323  fi
51324
51325  if test "x$path" != "x$new_path"; then
51326    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51329  fi
51330
51331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51333
51334    else
51335      # We're on a unix platform. Hooray! :)
51336      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51337      has_space=`$ECHO "$path" | $GREP " "`
51338      if test "x$has_space" != x; then
51339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51342      fi
51343
51344      # Use eval to expand a potential ~
51345      eval path="$path"
51346      if test ! -f "$path" && test ! -d "$path"; then
51347        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51348      fi
51349
51350      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51351    fi
51352  fi
51353
51354
51355  # Only process if variable expands to non-empty
51356
51357  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51359
51360  # Input might be given as Windows format, start by converting to
51361  # unix format.
51362  path="$POTENTIAL_FREETYPE_LIB_PATH"
51363  new_path=`$CYGPATH -u "$path"`
51364
51365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51368  # "foo.exe" is OK but "foo" is an error.
51369  #
51370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51371  # It is also a way to make sure we got the proper file name for the real test later on.
51372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51373  if test "x$test_shortpath" = x; then
51374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51376    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51377  fi
51378
51379  # Call helper function which possibly converts this using DOS-style short mode.
51380  # If so, the updated path is stored in $new_path.
51381
51382  input_path="$new_path"
51383  # Check if we need to convert this using DOS-style short mode. If the path
51384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51385  # take no chances and rewrite it.
51386  # Note: m4 eats our [], so we need to use [ and ] instead.
51387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51388  if test "x$has_forbidden_chars" != x; then
51389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51393      # Going to short mode and back again did indeed matter. Since short mode is
51394      # case insensitive, let's make it lowercase to improve readability.
51395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51396      # Now convert it back to Unix-style (cygpath)
51397      input_path=`$CYGPATH -u "$shortmode_path"`
51398      new_path="$input_path"
51399    fi
51400  fi
51401
51402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51403  if test "x$test_cygdrive_prefix" = x; then
51404    # As a simple fix, exclude /usr/bin since it's not a real path.
51405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51407      # a path prefixed by /cygdrive for fixpath to work.
51408      new_path="$CYGWIN_ROOT_PATH$input_path"
51409    fi
51410  fi
51411
51412
51413  if test "x$path" != "x$new_path"; then
51414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51417  fi
51418
51419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51420
51421  path="$POTENTIAL_FREETYPE_LIB_PATH"
51422  has_colon=`$ECHO $path | $GREP ^.:`
51423  new_path="$path"
51424  if test "x$has_colon" = x; then
51425    # Not in mixed or Windows style, start by that.
51426    new_path=`cmd //c echo $path`
51427  fi
51428
51429
51430  input_path="$new_path"
51431  # Check if we need to convert this using DOS-style short mode. If the path
51432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51433  # take no chances and rewrite it.
51434  # Note: m4 eats our [], so we need to use [ and ] instead.
51435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51436  if test "x$has_forbidden_chars" != x; then
51437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51439  fi
51440
51441
51442  windows_path="$new_path"
51443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51444    unix_path=`$CYGPATH -u "$windows_path"`
51445    new_path="$unix_path"
51446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51448    new_path="$unix_path"
51449  fi
51450
51451  if test "x$path" != "x$new_path"; then
51452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51455  fi
51456
51457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51459
51460    else
51461      # We're on a unix platform. Hooray! :)
51462      path="$POTENTIAL_FREETYPE_LIB_PATH"
51463      has_space=`$ECHO "$path" | $GREP " "`
51464      if test "x$has_space" != x; then
51465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51468      fi
51469
51470      # Use eval to expand a potential ~
51471      eval path="$path"
51472      if test ! -f "$path" && test ! -d "$path"; then
51473        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51474      fi
51475
51476      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51477    fi
51478  fi
51479
51480
51481    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51483$as_echo_n "checking for freetype includes... " >&6; }
51484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51485$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51486    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51488$as_echo_n "checking for freetype libraries... " >&6; }
51489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51490$as_echo "$FREETYPE_LIB_PATH" >&6; }
51491  fi
51492
51493          if test "x$FOUND_FREETYPE" != xyes; then
51494            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
51495          fi
51496        else
51497          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
51498$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
51499          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
51500        fi
51501      else
51502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
51503$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
51504      fi
51505    fi
51506
51507    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
51508      # User has specified settings
51509
51510      if test "x$BUNDLE_FREETYPE" = x; then
51511        # If not specified, default is to bundle freetype
51512        BUNDLE_FREETYPE=yes
51513      fi
51514
51515      if test "x$with_freetype" != x; then
51516        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
51517        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
51518      fi
51519
51520      # Allow --with-freetype-lib and --with-freetype-include to override
51521      if test "x$with_freetype_include" != x; then
51522        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
51523      fi
51524      if test "x$with_freetype_lib" != x; then
51525        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
51526      fi
51527
51528      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51529        # Okay, we got it. Check that it works.
51530
51531  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51532  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51533  METHOD="--with-freetype"
51534
51535  # Let's start with an optimistic view of the world :-)
51536  FOUND_FREETYPE=yes
51537
51538  # First look for the canonical freetype main include file ft2build.h.
51539  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51540    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51541    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51542    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51543      # Fail.
51544      FOUND_FREETYPE=no
51545    fi
51546  fi
51547
51548  if test "x$FOUND_FREETYPE" = xyes; then
51549    # Include file found, let's continue the sanity check.
51550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51551$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51552
51553    # Reset to default value
51554    FREETYPE_BASE_NAME=freetype
51555    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51556    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51557      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51558          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51559        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51560        # for the .6 version explicitly.
51561        FREETYPE_BASE_NAME=freetype.6
51562        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51563        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51564$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51565      else
51566        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51567$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51568        FOUND_FREETYPE=no
51569      fi
51570    else
51571      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51572        # On Windows, we will need both .lib and .dll file.
51573        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51574          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51575$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51576          FOUND_FREETYPE=no
51577        fi
51578      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51579          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51580        # Found lib in isa dir, use that instead.
51581        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51582        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51583$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51584      fi
51585    fi
51586  fi
51587
51588  if test "x$FOUND_FREETYPE" = xyes; then
51589
51590  # Only process if variable expands to non-empty
51591
51592  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51593    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51594
51595  # Input might be given as Windows format, start by converting to
51596  # unix format.
51597  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51598  new_path=`$CYGPATH -u "$path"`
51599
51600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51603  # "foo.exe" is OK but "foo" is an error.
51604  #
51605  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51606  # It is also a way to make sure we got the proper file name for the real test later on.
51607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51608  if test "x$test_shortpath" = x; then
51609    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51611    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51612  fi
51613
51614  # Call helper function which possibly converts this using DOS-style short mode.
51615  # If so, the updated path is stored in $new_path.
51616
51617  input_path="$new_path"
51618  # Check if we need to convert this using DOS-style short mode. If the path
51619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51620  # take no chances and rewrite it.
51621  # Note: m4 eats our [], so we need to use [ and ] instead.
51622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51623  if test "x$has_forbidden_chars" != x; then
51624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51625    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51626    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51627    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51628      # Going to short mode and back again did indeed matter. Since short mode is
51629      # case insensitive, let's make it lowercase to improve readability.
51630      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51631      # Now convert it back to Unix-style (cygpath)
51632      input_path=`$CYGPATH -u "$shortmode_path"`
51633      new_path="$input_path"
51634    fi
51635  fi
51636
51637  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51638  if test "x$test_cygdrive_prefix" = x; then
51639    # As a simple fix, exclude /usr/bin since it's not a real path.
51640    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51641      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51642      # a path prefixed by /cygdrive for fixpath to work.
51643      new_path="$CYGWIN_ROOT_PATH$input_path"
51644    fi
51645  fi
51646
51647
51648  if test "x$path" != "x$new_path"; then
51649    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51651$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51652  fi
51653
51654    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51655
51656  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51657  has_colon=`$ECHO $path | $GREP ^.:`
51658  new_path="$path"
51659  if test "x$has_colon" = x; then
51660    # Not in mixed or Windows style, start by that.
51661    new_path=`cmd //c echo $path`
51662  fi
51663
51664
51665  input_path="$new_path"
51666  # Check if we need to convert this using DOS-style short mode. If the path
51667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51668  # take no chances and rewrite it.
51669  # Note: m4 eats our [], so we need to use [ and ] instead.
51670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51671  if test "x$has_forbidden_chars" != x; then
51672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51673    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51674  fi
51675
51676
51677  windows_path="$new_path"
51678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51679    unix_path=`$CYGPATH -u "$windows_path"`
51680    new_path="$unix_path"
51681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51683    new_path="$unix_path"
51684  fi
51685
51686  if test "x$path" != "x$new_path"; then
51687    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
51688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
51689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
51690  fi
51691
51692  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51693  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51694
51695    else
51696      # We're on a unix platform. Hooray! :)
51697      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51698      has_space=`$ECHO "$path" | $GREP " "`
51699      if test "x$has_space" != x; then
51700        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51701$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51702        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51703      fi
51704
51705      # Use eval to expand a potential ~
51706      eval path="$path"
51707      if test ! -f "$path" && test ! -d "$path"; then
51708        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51709      fi
51710
51711      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
51712    fi
51713  fi
51714
51715
51716  # Only process if variable expands to non-empty
51717
51718  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
51719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51720
51721  # Input might be given as Windows format, start by converting to
51722  # unix format.
51723  path="$POTENTIAL_FREETYPE_LIB_PATH"
51724  new_path=`$CYGPATH -u "$path"`
51725
51726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51729  # "foo.exe" is OK but "foo" is an error.
51730  #
51731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51732  # It is also a way to make sure we got the proper file name for the real test later on.
51733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51734  if test "x$test_shortpath" = x; then
51735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51737    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
51738  fi
51739
51740  # Call helper function which possibly converts this using DOS-style short mode.
51741  # If so, the updated path is stored in $new_path.
51742
51743  input_path="$new_path"
51744  # Check if we need to convert this using DOS-style short mode. If the path
51745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51746  # take no chances and rewrite it.
51747  # Note: m4 eats our [], so we need to use [ and ] instead.
51748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51749  if test "x$has_forbidden_chars" != x; then
51750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51754      # Going to short mode and back again did indeed matter. Since short mode is
51755      # case insensitive, let's make it lowercase to improve readability.
51756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51757      # Now convert it back to Unix-style (cygpath)
51758      input_path=`$CYGPATH -u "$shortmode_path"`
51759      new_path="$input_path"
51760    fi
51761  fi
51762
51763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51764  if test "x$test_cygdrive_prefix" = x; then
51765    # As a simple fix, exclude /usr/bin since it's not a real path.
51766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51768      # a path prefixed by /cygdrive for fixpath to work.
51769      new_path="$CYGWIN_ROOT_PATH$input_path"
51770    fi
51771  fi
51772
51773
51774  if test "x$path" != "x$new_path"; then
51775    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51778  fi
51779
51780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51781
51782  path="$POTENTIAL_FREETYPE_LIB_PATH"
51783  has_colon=`$ECHO $path | $GREP ^.:`
51784  new_path="$path"
51785  if test "x$has_colon" = x; then
51786    # Not in mixed or Windows style, start by that.
51787    new_path=`cmd //c echo $path`
51788  fi
51789
51790
51791  input_path="$new_path"
51792  # Check if we need to convert this using DOS-style short mode. If the path
51793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51794  # take no chances and rewrite it.
51795  # Note: m4 eats our [], so we need to use [ and ] instead.
51796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51797  if test "x$has_forbidden_chars" != x; then
51798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51800  fi
51801
51802
51803  windows_path="$new_path"
51804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51805    unix_path=`$CYGPATH -u "$windows_path"`
51806    new_path="$unix_path"
51807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51809    new_path="$unix_path"
51810  fi
51811
51812  if test "x$path" != "x$new_path"; then
51813    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
51814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
51815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
51816  fi
51817
51818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51820
51821    else
51822      # We're on a unix platform. Hooray! :)
51823      path="$POTENTIAL_FREETYPE_LIB_PATH"
51824      has_space=`$ECHO "$path" | $GREP " "`
51825      if test "x$has_space" != x; then
51826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
51827$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
51828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51829      fi
51830
51831      # Use eval to expand a potential ~
51832      eval path="$path"
51833      if test ! -f "$path" && test ! -d "$path"; then
51834        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
51835      fi
51836
51837      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
51838    fi
51839  fi
51840
51841
51842    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
51844$as_echo_n "checking for freetype includes... " >&6; }
51845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
51846$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
51847    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
51849$as_echo_n "checking for freetype libraries... " >&6; }
51850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
51851$as_echo "$FREETYPE_LIB_PATH" >&6; }
51852  fi
51853
51854        if test "x$FOUND_FREETYPE" != xyes; then
51855          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
51856        fi
51857      else
51858        # User specified only one of lib or include. This is an error.
51859        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
51860          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
51861$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
51862          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51863        else
51864          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
51865$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
51866          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
51867        fi
51868      fi
51869    else
51870      # User did not specify settings, but we need freetype. Try to locate it.
51871
51872      if test "x$BUNDLE_FREETYPE" = x; then
51873        # If not specified, default is to bundle freetype only on windows
51874        if test "x$OPENJDK_TARGET_OS" = xwindows; then
51875          BUNDLE_FREETYPE=yes
51876        else
51877          BUNDLE_FREETYPE=no
51878        fi
51879      fi
51880
51881      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
51882      if test "x$SYSROOT" = x; then
51883        if test "x$FOUND_FREETYPE" != xyes; then
51884          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
51885          if test "x$PKG_CONFIG" != x; then
51886
51887pkg_failed=no
51888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
51889$as_echo_n "checking for FREETYPE... " >&6; }
51890
51891if test -n "$FREETYPE_CFLAGS"; then
51892    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
51893 elif test -n "$PKG_CONFIG"; then
51894    if test -n "$PKG_CONFIG" && \
51895    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51896  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51897  ac_status=$?
51898  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51899  test $ac_status = 0; }; then
51900  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
51901else
51902  pkg_failed=yes
51903fi
51904 else
51905    pkg_failed=untried
51906fi
51907if test -n "$FREETYPE_LIBS"; then
51908    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
51909 elif test -n "$PKG_CONFIG"; then
51910    if test -n "$PKG_CONFIG" && \
51911    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
51912  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
51913  ac_status=$?
51914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
51915  test $ac_status = 0; }; then
51916  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
51917else
51918  pkg_failed=yes
51919fi
51920 else
51921    pkg_failed=untried
51922fi
51923
51924
51925
51926if test $pkg_failed = yes; then
51927
51928if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
51929        _pkg_short_errors_supported=yes
51930else
51931        _pkg_short_errors_supported=no
51932fi
51933        if test $_pkg_short_errors_supported = yes; then
51934	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
51935        else
51936	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
51937        fi
51938	# Put the nasty error message in config.log where it belongs
51939	echo "$FREETYPE_PKG_ERRORS" >&5
51940
51941	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51942$as_echo "no" >&6; }
51943                FOUND_FREETYPE=no
51944elif test $pkg_failed = untried; then
51945	FOUND_FREETYPE=no
51946else
51947	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
51948	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
51949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51950$as_echo "yes" >&6; }
51951	FOUND_FREETYPE=yes
51952fi
51953            if test "x$FOUND_FREETYPE" = xyes; then
51954              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
51955              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
51956              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
51957              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51958                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
51959              fi
51960              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
51961              if test "x$BUNDLE_FREETYPE" = xyes; then
51962                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
51963$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
51964                FOUND_FREETYPE=no
51965              else
51966                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
51967$as_echo_n "checking for freetype... " >&6; }
51968                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
51969$as_echo "yes (using pkg-config)" >&6; }
51970              fi
51971            fi
51972          fi
51973        fi
51974      fi
51975
51976      if test "x$FOUND_FREETYPE" != xyes; then
51977        # Check in well-known locations
51978        if test "x$OPENJDK_TARGET_OS" = xwindows; then
51979          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
51980
51981  windows_path="$FREETYPE_BASE_DIR"
51982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51983    unix_path=`$CYGPATH -u "$windows_path"`
51984    FREETYPE_BASE_DIR="$unix_path"
51985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51987    FREETYPE_BASE_DIR="$unix_path"
51988  fi
51989
51990
51991  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
51992  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
51993  METHOD="well-known location"
51994
51995  # Let's start with an optimistic view of the world :-)
51996  FOUND_FREETYPE=yes
51997
51998  # First look for the canonical freetype main include file ft2build.h.
51999  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52000    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52001    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52002    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52003      # Fail.
52004      FOUND_FREETYPE=no
52005    fi
52006  fi
52007
52008  if test "x$FOUND_FREETYPE" = xyes; then
52009    # Include file found, let's continue the sanity check.
52010    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52011$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52012
52013    # Reset to default value
52014    FREETYPE_BASE_NAME=freetype
52015    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52016    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52017      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52018          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52019        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52020        # for the .6 version explicitly.
52021        FREETYPE_BASE_NAME=freetype.6
52022        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52023        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52024$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52025      else
52026        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52027$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52028        FOUND_FREETYPE=no
52029      fi
52030    else
52031      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52032        # On Windows, we will need both .lib and .dll file.
52033        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52034          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52035$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52036          FOUND_FREETYPE=no
52037        fi
52038      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52039          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52040        # Found lib in isa dir, use that instead.
52041        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52042        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52043$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52044      fi
52045    fi
52046  fi
52047
52048  if test "x$FOUND_FREETYPE" = xyes; then
52049
52050  # Only process if variable expands to non-empty
52051
52052  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52054
52055  # Input might be given as Windows format, start by converting to
52056  # unix format.
52057  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52058  new_path=`$CYGPATH -u "$path"`
52059
52060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52063  # "foo.exe" is OK but "foo" is an error.
52064  #
52065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52066  # It is also a way to make sure we got the proper file name for the real test later on.
52067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52068  if test "x$test_shortpath" = x; then
52069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52071    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52072  fi
52073
52074  # Call helper function which possibly converts this using DOS-style short mode.
52075  # If so, the updated path is stored in $new_path.
52076
52077  input_path="$new_path"
52078  # Check if we need to convert this using DOS-style short mode. If the path
52079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52080  # take no chances and rewrite it.
52081  # Note: m4 eats our [], so we need to use [ and ] instead.
52082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52083  if test "x$has_forbidden_chars" != x; then
52084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52088      # Going to short mode and back again did indeed matter. Since short mode is
52089      # case insensitive, let's make it lowercase to improve readability.
52090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52091      # Now convert it back to Unix-style (cygpath)
52092      input_path=`$CYGPATH -u "$shortmode_path"`
52093      new_path="$input_path"
52094    fi
52095  fi
52096
52097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52098  if test "x$test_cygdrive_prefix" = x; then
52099    # As a simple fix, exclude /usr/bin since it's not a real path.
52100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52102      # a path prefixed by /cygdrive for fixpath to work.
52103      new_path="$CYGWIN_ROOT_PATH$input_path"
52104    fi
52105  fi
52106
52107
52108  if test "x$path" != "x$new_path"; then
52109    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52111$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52112  fi
52113
52114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52115
52116  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52117  has_colon=`$ECHO $path | $GREP ^.:`
52118  new_path="$path"
52119  if test "x$has_colon" = x; then
52120    # Not in mixed or Windows style, start by that.
52121    new_path=`cmd //c echo $path`
52122  fi
52123
52124
52125  input_path="$new_path"
52126  # Check if we need to convert this using DOS-style short mode. If the path
52127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52128  # take no chances and rewrite it.
52129  # Note: m4 eats our [], so we need to use [ and ] instead.
52130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52131  if test "x$has_forbidden_chars" != x; then
52132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52134  fi
52135
52136
52137  windows_path="$new_path"
52138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52139    unix_path=`$CYGPATH -u "$windows_path"`
52140    new_path="$unix_path"
52141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52143    new_path="$unix_path"
52144  fi
52145
52146  if test "x$path" != "x$new_path"; then
52147    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52149$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52150  fi
52151
52152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52154
52155    else
52156      # We're on a unix platform. Hooray! :)
52157      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52158      has_space=`$ECHO "$path" | $GREP " "`
52159      if test "x$has_space" != x; then
52160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52163      fi
52164
52165      # Use eval to expand a potential ~
52166      eval path="$path"
52167      if test ! -f "$path" && test ! -d "$path"; then
52168        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52169      fi
52170
52171      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52172    fi
52173  fi
52174
52175
52176  # Only process if variable expands to non-empty
52177
52178  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52180
52181  # Input might be given as Windows format, start by converting to
52182  # unix format.
52183  path="$POTENTIAL_FREETYPE_LIB_PATH"
52184  new_path=`$CYGPATH -u "$path"`
52185
52186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52189  # "foo.exe" is OK but "foo" is an error.
52190  #
52191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52192  # It is also a way to make sure we got the proper file name for the real test later on.
52193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52194  if test "x$test_shortpath" = x; then
52195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52196$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52197    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52198  fi
52199
52200  # Call helper function which possibly converts this using DOS-style short mode.
52201  # If so, the updated path is stored in $new_path.
52202
52203  input_path="$new_path"
52204  # Check if we need to convert this using DOS-style short mode. If the path
52205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52206  # take no chances and rewrite it.
52207  # Note: m4 eats our [], so we need to use [ and ] instead.
52208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52209  if test "x$has_forbidden_chars" != x; then
52210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52214      # Going to short mode and back again did indeed matter. Since short mode is
52215      # case insensitive, let's make it lowercase to improve readability.
52216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52217      # Now convert it back to Unix-style (cygpath)
52218      input_path=`$CYGPATH -u "$shortmode_path"`
52219      new_path="$input_path"
52220    fi
52221  fi
52222
52223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52224  if test "x$test_cygdrive_prefix" = x; then
52225    # As a simple fix, exclude /usr/bin since it's not a real path.
52226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52228      # a path prefixed by /cygdrive for fixpath to work.
52229      new_path="$CYGWIN_ROOT_PATH$input_path"
52230    fi
52231  fi
52232
52233
52234  if test "x$path" != "x$new_path"; then
52235    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52237$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52238  fi
52239
52240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52241
52242  path="$POTENTIAL_FREETYPE_LIB_PATH"
52243  has_colon=`$ECHO $path | $GREP ^.:`
52244  new_path="$path"
52245  if test "x$has_colon" = x; then
52246    # Not in mixed or Windows style, start by that.
52247    new_path=`cmd //c echo $path`
52248  fi
52249
52250
52251  input_path="$new_path"
52252  # Check if we need to convert this using DOS-style short mode. If the path
52253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52254  # take no chances and rewrite it.
52255  # Note: m4 eats our [], so we need to use [ and ] instead.
52256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52257  if test "x$has_forbidden_chars" != x; then
52258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52260  fi
52261
52262
52263  windows_path="$new_path"
52264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52265    unix_path=`$CYGPATH -u "$windows_path"`
52266    new_path="$unix_path"
52267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52269    new_path="$unix_path"
52270  fi
52271
52272  if test "x$path" != "x$new_path"; then
52273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52276  fi
52277
52278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52280
52281    else
52282      # We're on a unix platform. Hooray! :)
52283      path="$POTENTIAL_FREETYPE_LIB_PATH"
52284      has_space=`$ECHO "$path" | $GREP " "`
52285      if test "x$has_space" != x; then
52286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52287$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52289      fi
52290
52291      # Use eval to expand a potential ~
52292      eval path="$path"
52293      if test ! -f "$path" && test ! -d "$path"; then
52294        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52295      fi
52296
52297      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52298    fi
52299  fi
52300
52301
52302    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52304$as_echo_n "checking for freetype includes... " >&6; }
52305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52306$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52307    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52309$as_echo_n "checking for freetype libraries... " >&6; }
52310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52311$as_echo "$FREETYPE_LIB_PATH" >&6; }
52312  fi
52313
52314          if test "x$FOUND_FREETYPE" != xyes; then
52315            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
52316
52317  windows_path="$FREETYPE_BASE_DIR"
52318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52319    unix_path=`$CYGPATH -u "$windows_path"`
52320    FREETYPE_BASE_DIR="$unix_path"
52321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52323    FREETYPE_BASE_DIR="$unix_path"
52324  fi
52325
52326
52327  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52328  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52329  METHOD="well-known location"
52330
52331  # Let's start with an optimistic view of the world :-)
52332  FOUND_FREETYPE=yes
52333
52334  # First look for the canonical freetype main include file ft2build.h.
52335  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52336    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52337    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52338    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52339      # Fail.
52340      FOUND_FREETYPE=no
52341    fi
52342  fi
52343
52344  if test "x$FOUND_FREETYPE" = xyes; then
52345    # Include file found, let's continue the sanity check.
52346    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52347$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52348
52349    # Reset to default value
52350    FREETYPE_BASE_NAME=freetype
52351    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52352    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52353      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52354          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52355        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52356        # for the .6 version explicitly.
52357        FREETYPE_BASE_NAME=freetype.6
52358        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52359        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52360$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52361      else
52362        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52363$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52364        FOUND_FREETYPE=no
52365      fi
52366    else
52367      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52368        # On Windows, we will need both .lib and .dll file.
52369        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52370          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52371$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52372          FOUND_FREETYPE=no
52373        fi
52374      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52375          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52376        # Found lib in isa dir, use that instead.
52377        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52378        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52379$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52380      fi
52381    fi
52382  fi
52383
52384  if test "x$FOUND_FREETYPE" = xyes; then
52385
52386  # Only process if variable expands to non-empty
52387
52388  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52390
52391  # Input might be given as Windows format, start by converting to
52392  # unix format.
52393  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52394  new_path=`$CYGPATH -u "$path"`
52395
52396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52399  # "foo.exe" is OK but "foo" is an error.
52400  #
52401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52402  # It is also a way to make sure we got the proper file name for the real test later on.
52403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52404  if test "x$test_shortpath" = x; then
52405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52407    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52408  fi
52409
52410  # Call helper function which possibly converts this using DOS-style short mode.
52411  # If so, the updated path is stored in $new_path.
52412
52413  input_path="$new_path"
52414  # Check if we need to convert this using DOS-style short mode. If the path
52415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52416  # take no chances and rewrite it.
52417  # Note: m4 eats our [], so we need to use [ and ] instead.
52418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52419  if test "x$has_forbidden_chars" != x; then
52420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52424      # Going to short mode and back again did indeed matter. Since short mode is
52425      # case insensitive, let's make it lowercase to improve readability.
52426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52427      # Now convert it back to Unix-style (cygpath)
52428      input_path=`$CYGPATH -u "$shortmode_path"`
52429      new_path="$input_path"
52430    fi
52431  fi
52432
52433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52434  if test "x$test_cygdrive_prefix" = x; then
52435    # As a simple fix, exclude /usr/bin since it's not a real path.
52436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52438      # a path prefixed by /cygdrive for fixpath to work.
52439      new_path="$CYGWIN_ROOT_PATH$input_path"
52440    fi
52441  fi
52442
52443
52444  if test "x$path" != "x$new_path"; then
52445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52448  fi
52449
52450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52451
52452  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52453  has_colon=`$ECHO $path | $GREP ^.:`
52454  new_path="$path"
52455  if test "x$has_colon" = x; then
52456    # Not in mixed or Windows style, start by that.
52457    new_path=`cmd //c echo $path`
52458  fi
52459
52460
52461  input_path="$new_path"
52462  # Check if we need to convert this using DOS-style short mode. If the path
52463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52464  # take no chances and rewrite it.
52465  # Note: m4 eats our [], so we need to use [ and ] instead.
52466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52467  if test "x$has_forbidden_chars" != x; then
52468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52470  fi
52471
52472
52473  windows_path="$new_path"
52474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52475    unix_path=`$CYGPATH -u "$windows_path"`
52476    new_path="$unix_path"
52477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52479    new_path="$unix_path"
52480  fi
52481
52482  if test "x$path" != "x$new_path"; then
52483    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52486  fi
52487
52488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52490
52491    else
52492      # We're on a unix platform. Hooray! :)
52493      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52494      has_space=`$ECHO "$path" | $GREP " "`
52495      if test "x$has_space" != x; then
52496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52497$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52499      fi
52500
52501      # Use eval to expand a potential ~
52502      eval path="$path"
52503      if test ! -f "$path" && test ! -d "$path"; then
52504        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52505      fi
52506
52507      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52508    fi
52509  fi
52510
52511
52512  # Only process if variable expands to non-empty
52513
52514  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52516
52517  # Input might be given as Windows format, start by converting to
52518  # unix format.
52519  path="$POTENTIAL_FREETYPE_LIB_PATH"
52520  new_path=`$CYGPATH -u "$path"`
52521
52522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52525  # "foo.exe" is OK but "foo" is an error.
52526  #
52527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52528  # It is also a way to make sure we got the proper file name for the real test later on.
52529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52530  if test "x$test_shortpath" = x; then
52531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52532$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52533    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52534  fi
52535
52536  # Call helper function which possibly converts this using DOS-style short mode.
52537  # If so, the updated path is stored in $new_path.
52538
52539  input_path="$new_path"
52540  # Check if we need to convert this using DOS-style short mode. If the path
52541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52542  # take no chances and rewrite it.
52543  # Note: m4 eats our [], so we need to use [ and ] instead.
52544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52545  if test "x$has_forbidden_chars" != x; then
52546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52550      # Going to short mode and back again did indeed matter. Since short mode is
52551      # case insensitive, let's make it lowercase to improve readability.
52552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52553      # Now convert it back to Unix-style (cygpath)
52554      input_path=`$CYGPATH -u "$shortmode_path"`
52555      new_path="$input_path"
52556    fi
52557  fi
52558
52559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52560  if test "x$test_cygdrive_prefix" = x; then
52561    # As a simple fix, exclude /usr/bin since it's not a real path.
52562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52564      # a path prefixed by /cygdrive for fixpath to work.
52565      new_path="$CYGWIN_ROOT_PATH$input_path"
52566    fi
52567  fi
52568
52569
52570  if test "x$path" != "x$new_path"; then
52571    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52573$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52574  fi
52575
52576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52577
52578  path="$POTENTIAL_FREETYPE_LIB_PATH"
52579  has_colon=`$ECHO $path | $GREP ^.:`
52580  new_path="$path"
52581  if test "x$has_colon" = x; then
52582    # Not in mixed or Windows style, start by that.
52583    new_path=`cmd //c echo $path`
52584  fi
52585
52586
52587  input_path="$new_path"
52588  # Check if we need to convert this using DOS-style short mode. If the path
52589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52590  # take no chances and rewrite it.
52591  # Note: m4 eats our [], so we need to use [ and ] instead.
52592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52593  if test "x$has_forbidden_chars" != x; then
52594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52596  fi
52597
52598
52599  windows_path="$new_path"
52600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52601    unix_path=`$CYGPATH -u "$windows_path"`
52602    new_path="$unix_path"
52603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52605    new_path="$unix_path"
52606  fi
52607
52608  if test "x$path" != "x$new_path"; then
52609    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52611$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52612  fi
52613
52614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52616
52617    else
52618      # We're on a unix platform. Hooray! :)
52619      path="$POTENTIAL_FREETYPE_LIB_PATH"
52620      has_space=`$ECHO "$path" | $GREP " "`
52621      if test "x$has_space" != x; then
52622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52623$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52625      fi
52626
52627      # Use eval to expand a potential ~
52628      eval path="$path"
52629      if test ! -f "$path" && test ! -d "$path"; then
52630        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52631      fi
52632
52633      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52634    fi
52635  fi
52636
52637
52638    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52639    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52640$as_echo_n "checking for freetype includes... " >&6; }
52641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52642$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52643    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52645$as_echo_n "checking for freetype libraries... " >&6; }
52646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52647$as_echo "$FREETYPE_LIB_PATH" >&6; }
52648  fi
52649
52650          fi
52651        else
52652          FREETYPE_BASE_DIR="$SYSROOT/usr"
52653
52654  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52655  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52656  METHOD="well-known location"
52657
52658  # Let's start with an optimistic view of the world :-)
52659  FOUND_FREETYPE=yes
52660
52661  # First look for the canonical freetype main include file ft2build.h.
52662  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52663    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52664    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52665    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52666      # Fail.
52667      FOUND_FREETYPE=no
52668    fi
52669  fi
52670
52671  if test "x$FOUND_FREETYPE" = xyes; then
52672    # Include file found, let's continue the sanity check.
52673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52674$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52675
52676    # Reset to default value
52677    FREETYPE_BASE_NAME=freetype
52678    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52679    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52680      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52681          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52682        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52683        # for the .6 version explicitly.
52684        FREETYPE_BASE_NAME=freetype.6
52685        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52686        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52687$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52688      else
52689        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52690$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52691        FOUND_FREETYPE=no
52692      fi
52693    else
52694      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52695        # On Windows, we will need both .lib and .dll file.
52696        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52697          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52699          FOUND_FREETYPE=no
52700        fi
52701      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52702          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52703        # Found lib in isa dir, use that instead.
52704        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52705        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52706$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52707      fi
52708    fi
52709  fi
52710
52711  if test "x$FOUND_FREETYPE" = xyes; then
52712
52713  # Only process if variable expands to non-empty
52714
52715  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52717
52718  # Input might be given as Windows format, start by converting to
52719  # unix format.
52720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52721  new_path=`$CYGPATH -u "$path"`
52722
52723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52726  # "foo.exe" is OK but "foo" is an error.
52727  #
52728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52729  # It is also a way to make sure we got the proper file name for the real test later on.
52730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52731  if test "x$test_shortpath" = x; then
52732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52735  fi
52736
52737  # Call helper function which possibly converts this using DOS-style short mode.
52738  # If so, the updated path is stored in $new_path.
52739
52740  input_path="$new_path"
52741  # Check if we need to convert this using DOS-style short mode. If the path
52742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52743  # take no chances and rewrite it.
52744  # Note: m4 eats our [], so we need to use [ and ] instead.
52745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52746  if test "x$has_forbidden_chars" != x; then
52747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52751      # Going to short mode and back again did indeed matter. Since short mode is
52752      # case insensitive, let's make it lowercase to improve readability.
52753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52754      # Now convert it back to Unix-style (cygpath)
52755      input_path=`$CYGPATH -u "$shortmode_path"`
52756      new_path="$input_path"
52757    fi
52758  fi
52759
52760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52761  if test "x$test_cygdrive_prefix" = x; then
52762    # As a simple fix, exclude /usr/bin since it's not a real path.
52763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52765      # a path prefixed by /cygdrive for fixpath to work.
52766      new_path="$CYGWIN_ROOT_PATH$input_path"
52767    fi
52768  fi
52769
52770
52771  if test "x$path" != "x$new_path"; then
52772    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52775  fi
52776
52777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52778
52779  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52780  has_colon=`$ECHO $path | $GREP ^.:`
52781  new_path="$path"
52782  if test "x$has_colon" = x; then
52783    # Not in mixed or Windows style, start by that.
52784    new_path=`cmd //c echo $path`
52785  fi
52786
52787
52788  input_path="$new_path"
52789  # Check if we need to convert this using DOS-style short mode. If the path
52790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52791  # take no chances and rewrite it.
52792  # Note: m4 eats our [], so we need to use [ and ] instead.
52793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52794  if test "x$has_forbidden_chars" != x; then
52795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52797  fi
52798
52799
52800  windows_path="$new_path"
52801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52802    unix_path=`$CYGPATH -u "$windows_path"`
52803    new_path="$unix_path"
52804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52806    new_path="$unix_path"
52807  fi
52808
52809  if test "x$path" != "x$new_path"; then
52810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52813  fi
52814
52815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52817
52818    else
52819      # We're on a unix platform. Hooray! :)
52820      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52821      has_space=`$ECHO "$path" | $GREP " "`
52822      if test "x$has_space" != x; then
52823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52826      fi
52827
52828      # Use eval to expand a potential ~
52829      eval path="$path"
52830      if test ! -f "$path" && test ! -d "$path"; then
52831        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52832      fi
52833
52834      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52835    fi
52836  fi
52837
52838
52839  # Only process if variable expands to non-empty
52840
52841  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52843
52844  # Input might be given as Windows format, start by converting to
52845  # unix format.
52846  path="$POTENTIAL_FREETYPE_LIB_PATH"
52847  new_path=`$CYGPATH -u "$path"`
52848
52849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52852  # "foo.exe" is OK but "foo" is an error.
52853  #
52854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52855  # It is also a way to make sure we got the proper file name for the real test later on.
52856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52857  if test "x$test_shortpath" = x; then
52858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52859$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52860    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52861  fi
52862
52863  # Call helper function which possibly converts this using DOS-style short mode.
52864  # If so, the updated path is stored in $new_path.
52865
52866  input_path="$new_path"
52867  # Check if we need to convert this using DOS-style short mode. If the path
52868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52869  # take no chances and rewrite it.
52870  # Note: m4 eats our [], so we need to use [ and ] instead.
52871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52872  if test "x$has_forbidden_chars" != x; then
52873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52877      # Going to short mode and back again did indeed matter. Since short mode is
52878      # case insensitive, let's make it lowercase to improve readability.
52879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52880      # Now convert it back to Unix-style (cygpath)
52881      input_path=`$CYGPATH -u "$shortmode_path"`
52882      new_path="$input_path"
52883    fi
52884  fi
52885
52886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52887  if test "x$test_cygdrive_prefix" = x; then
52888    # As a simple fix, exclude /usr/bin since it's not a real path.
52889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52891      # a path prefixed by /cygdrive for fixpath to work.
52892      new_path="$CYGWIN_ROOT_PATH$input_path"
52893    fi
52894  fi
52895
52896
52897  if test "x$path" != "x$new_path"; then
52898    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52901  fi
52902
52903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52904
52905  path="$POTENTIAL_FREETYPE_LIB_PATH"
52906  has_colon=`$ECHO $path | $GREP ^.:`
52907  new_path="$path"
52908  if test "x$has_colon" = x; then
52909    # Not in mixed or Windows style, start by that.
52910    new_path=`cmd //c echo $path`
52911  fi
52912
52913
52914  input_path="$new_path"
52915  # Check if we need to convert this using DOS-style short mode. If the path
52916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52917  # take no chances and rewrite it.
52918  # Note: m4 eats our [], so we need to use [ and ] instead.
52919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52920  if test "x$has_forbidden_chars" != x; then
52921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52923  fi
52924
52925
52926  windows_path="$new_path"
52927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52928    unix_path=`$CYGPATH -u "$windows_path"`
52929    new_path="$unix_path"
52930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52932    new_path="$unix_path"
52933  fi
52934
52935  if test "x$path" != "x$new_path"; then
52936    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52939  fi
52940
52941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52943
52944    else
52945      # We're on a unix platform. Hooray! :)
52946      path="$POTENTIAL_FREETYPE_LIB_PATH"
52947      has_space=`$ECHO "$path" | $GREP " "`
52948      if test "x$has_space" != x; then
52949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52950$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52952      fi
52953
52954      # Use eval to expand a potential ~
52955      eval path="$path"
52956      if test ! -f "$path" && test ! -d "$path"; then
52957        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52958      fi
52959
52960      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52961    fi
52962  fi
52963
52964
52965    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52967$as_echo_n "checking for freetype includes... " >&6; }
52968    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52969$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52970    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52972$as_echo_n "checking for freetype libraries... " >&6; }
52973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52974$as_echo "$FREETYPE_LIB_PATH" >&6; }
52975  fi
52976
52977
52978          if test "x$FOUND_FREETYPE" != xyes; then
52979            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
52980
52981  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52982  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52983  METHOD="well-known location"
52984
52985  # Let's start with an optimistic view of the world :-)
52986  FOUND_FREETYPE=yes
52987
52988  # First look for the canonical freetype main include file ft2build.h.
52989  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52990    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52991    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52992    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52993      # Fail.
52994      FOUND_FREETYPE=no
52995    fi
52996  fi
52997
52998  if test "x$FOUND_FREETYPE" = xyes; then
52999    # Include file found, let's continue the sanity check.
53000    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53001$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53002
53003    # Reset to default value
53004    FREETYPE_BASE_NAME=freetype
53005    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53006    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53007      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53008          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53009        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53010        # for the .6 version explicitly.
53011        FREETYPE_BASE_NAME=freetype.6
53012        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53013        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53014$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53015      else
53016        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53017$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53018        FOUND_FREETYPE=no
53019      fi
53020    else
53021      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53022        # On Windows, we will need both .lib and .dll file.
53023        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53024          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53025$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53026          FOUND_FREETYPE=no
53027        fi
53028      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53029          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53030        # Found lib in isa dir, use that instead.
53031        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53032        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53033$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53034      fi
53035    fi
53036  fi
53037
53038  if test "x$FOUND_FREETYPE" = xyes; then
53039
53040  # Only process if variable expands to non-empty
53041
53042  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53044
53045  # Input might be given as Windows format, start by converting to
53046  # unix format.
53047  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53048  new_path=`$CYGPATH -u "$path"`
53049
53050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53053  # "foo.exe" is OK but "foo" is an error.
53054  #
53055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53056  # It is also a way to make sure we got the proper file name for the real test later on.
53057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53058  if test "x$test_shortpath" = x; then
53059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53062  fi
53063
53064  # Call helper function which possibly converts this using DOS-style short mode.
53065  # If so, the updated path is stored in $new_path.
53066
53067  input_path="$new_path"
53068  # Check if we need to convert this using DOS-style short mode. If the path
53069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53070  # take no chances and rewrite it.
53071  # Note: m4 eats our [], so we need to use [ and ] instead.
53072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53073  if test "x$has_forbidden_chars" != x; then
53074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53078      # Going to short mode and back again did indeed matter. Since short mode is
53079      # case insensitive, let's make it lowercase to improve readability.
53080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53081      # Now convert it back to Unix-style (cygpath)
53082      input_path=`$CYGPATH -u "$shortmode_path"`
53083      new_path="$input_path"
53084    fi
53085  fi
53086
53087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53088  if test "x$test_cygdrive_prefix" = x; then
53089    # As a simple fix, exclude /usr/bin since it's not a real path.
53090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53092      # a path prefixed by /cygdrive for fixpath to work.
53093      new_path="$CYGWIN_ROOT_PATH$input_path"
53094    fi
53095  fi
53096
53097
53098  if test "x$path" != "x$new_path"; then
53099    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53102  fi
53103
53104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53105
53106  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53107  has_colon=`$ECHO $path | $GREP ^.:`
53108  new_path="$path"
53109  if test "x$has_colon" = x; then
53110    # Not in mixed or Windows style, start by that.
53111    new_path=`cmd //c echo $path`
53112  fi
53113
53114
53115  input_path="$new_path"
53116  # Check if we need to convert this using DOS-style short mode. If the path
53117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53118  # take no chances and rewrite it.
53119  # Note: m4 eats our [], so we need to use [ and ] instead.
53120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53121  if test "x$has_forbidden_chars" != x; then
53122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53124  fi
53125
53126
53127  windows_path="$new_path"
53128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53129    unix_path=`$CYGPATH -u "$windows_path"`
53130    new_path="$unix_path"
53131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53133    new_path="$unix_path"
53134  fi
53135
53136  if test "x$path" != "x$new_path"; then
53137    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53140  fi
53141
53142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53144
53145    else
53146      # We're on a unix platform. Hooray! :)
53147      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53148      has_space=`$ECHO "$path" | $GREP " "`
53149      if test "x$has_space" != x; then
53150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53153      fi
53154
53155      # Use eval to expand a potential ~
53156      eval path="$path"
53157      if test ! -f "$path" && test ! -d "$path"; then
53158        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53159      fi
53160
53161      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53162    fi
53163  fi
53164
53165
53166  # Only process if variable expands to non-empty
53167
53168  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53170
53171  # Input might be given as Windows format, start by converting to
53172  # unix format.
53173  path="$POTENTIAL_FREETYPE_LIB_PATH"
53174  new_path=`$CYGPATH -u "$path"`
53175
53176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53179  # "foo.exe" is OK but "foo" is an error.
53180  #
53181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53182  # It is also a way to make sure we got the proper file name for the real test later on.
53183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53184  if test "x$test_shortpath" = x; then
53185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53188  fi
53189
53190  # Call helper function which possibly converts this using DOS-style short mode.
53191  # If so, the updated path is stored in $new_path.
53192
53193  input_path="$new_path"
53194  # Check if we need to convert this using DOS-style short mode. If the path
53195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53196  # take no chances and rewrite it.
53197  # Note: m4 eats our [], so we need to use [ and ] instead.
53198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53199  if test "x$has_forbidden_chars" != x; then
53200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53204      # Going to short mode and back again did indeed matter. Since short mode is
53205      # case insensitive, let's make it lowercase to improve readability.
53206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53207      # Now convert it back to Unix-style (cygpath)
53208      input_path=`$CYGPATH -u "$shortmode_path"`
53209      new_path="$input_path"
53210    fi
53211  fi
53212
53213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53214  if test "x$test_cygdrive_prefix" = x; then
53215    # As a simple fix, exclude /usr/bin since it's not a real path.
53216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53218      # a path prefixed by /cygdrive for fixpath to work.
53219      new_path="$CYGWIN_ROOT_PATH$input_path"
53220    fi
53221  fi
53222
53223
53224  if test "x$path" != "x$new_path"; then
53225    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53228  fi
53229
53230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53231
53232  path="$POTENTIAL_FREETYPE_LIB_PATH"
53233  has_colon=`$ECHO $path | $GREP ^.:`
53234  new_path="$path"
53235  if test "x$has_colon" = x; then
53236    # Not in mixed or Windows style, start by that.
53237    new_path=`cmd //c echo $path`
53238  fi
53239
53240
53241  input_path="$new_path"
53242  # Check if we need to convert this using DOS-style short mode. If the path
53243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53244  # take no chances and rewrite it.
53245  # Note: m4 eats our [], so we need to use [ and ] instead.
53246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53247  if test "x$has_forbidden_chars" != x; then
53248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53250  fi
53251
53252
53253  windows_path="$new_path"
53254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53255    unix_path=`$CYGPATH -u "$windows_path"`
53256    new_path="$unix_path"
53257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53259    new_path="$unix_path"
53260  fi
53261
53262  if test "x$path" != "x$new_path"; then
53263    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53266  fi
53267
53268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53270
53271    else
53272      # We're on a unix platform. Hooray! :)
53273      path="$POTENTIAL_FREETYPE_LIB_PATH"
53274      has_space=`$ECHO "$path" | $GREP " "`
53275      if test "x$has_space" != x; then
53276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53279      fi
53280
53281      # Use eval to expand a potential ~
53282      eval path="$path"
53283      if test ! -f "$path" && test ! -d "$path"; then
53284        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53285      fi
53286
53287      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53288    fi
53289  fi
53290
53291
53292    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53294$as_echo_n "checking for freetype includes... " >&6; }
53295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53296$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53297    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53299$as_echo_n "checking for freetype libraries... " >&6; }
53300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53301$as_echo "$FREETYPE_LIB_PATH" >&6; }
53302  fi
53303
53304          fi
53305
53306          if test "x$FOUND_FREETYPE" != xyes; then
53307            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
53308
53309  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53310  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53311  METHOD="well-known location"
53312
53313  # Let's start with an optimistic view of the world :-)
53314  FOUND_FREETYPE=yes
53315
53316  # First look for the canonical freetype main include file ft2build.h.
53317  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53318    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53319    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53320    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53321      # Fail.
53322      FOUND_FREETYPE=no
53323    fi
53324  fi
53325
53326  if test "x$FOUND_FREETYPE" = xyes; then
53327    # Include file found, let's continue the sanity check.
53328    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53329$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53330
53331    # Reset to default value
53332    FREETYPE_BASE_NAME=freetype
53333    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53334    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53335      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53336          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53337        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53338        # for the .6 version explicitly.
53339        FREETYPE_BASE_NAME=freetype.6
53340        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53341        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53342$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53343      else
53344        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53345$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53346        FOUND_FREETYPE=no
53347      fi
53348    else
53349      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53350        # On Windows, we will need both .lib and .dll file.
53351        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53352          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53354          FOUND_FREETYPE=no
53355        fi
53356      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53357          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53358        # Found lib in isa dir, use that instead.
53359        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53360        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53361$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53362      fi
53363    fi
53364  fi
53365
53366  if test "x$FOUND_FREETYPE" = xyes; then
53367
53368  # Only process if variable expands to non-empty
53369
53370  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53372
53373  # Input might be given as Windows format, start by converting to
53374  # unix format.
53375  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53376  new_path=`$CYGPATH -u "$path"`
53377
53378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53381  # "foo.exe" is OK but "foo" is an error.
53382  #
53383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53384  # It is also a way to make sure we got the proper file name for the real test later on.
53385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53386  if test "x$test_shortpath" = x; then
53387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53389    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53390  fi
53391
53392  # Call helper function which possibly converts this using DOS-style short mode.
53393  # If so, the updated path is stored in $new_path.
53394
53395  input_path="$new_path"
53396  # Check if we need to convert this using DOS-style short mode. If the path
53397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53398  # take no chances and rewrite it.
53399  # Note: m4 eats our [], so we need to use [ and ] instead.
53400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53401  if test "x$has_forbidden_chars" != x; then
53402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53406      # Going to short mode and back again did indeed matter. Since short mode is
53407      # case insensitive, let's make it lowercase to improve readability.
53408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53409      # Now convert it back to Unix-style (cygpath)
53410      input_path=`$CYGPATH -u "$shortmode_path"`
53411      new_path="$input_path"
53412    fi
53413  fi
53414
53415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53416  if test "x$test_cygdrive_prefix" = x; then
53417    # As a simple fix, exclude /usr/bin since it's not a real path.
53418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53420      # a path prefixed by /cygdrive for fixpath to work.
53421      new_path="$CYGWIN_ROOT_PATH$input_path"
53422    fi
53423  fi
53424
53425
53426  if test "x$path" != "x$new_path"; then
53427    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53430  fi
53431
53432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53433
53434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53435  has_colon=`$ECHO $path | $GREP ^.:`
53436  new_path="$path"
53437  if test "x$has_colon" = x; then
53438    # Not in mixed or Windows style, start by that.
53439    new_path=`cmd //c echo $path`
53440  fi
53441
53442
53443  input_path="$new_path"
53444  # Check if we need to convert this using DOS-style short mode. If the path
53445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53446  # take no chances and rewrite it.
53447  # Note: m4 eats our [], so we need to use [ and ] instead.
53448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53449  if test "x$has_forbidden_chars" != x; then
53450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53452  fi
53453
53454
53455  windows_path="$new_path"
53456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53457    unix_path=`$CYGPATH -u "$windows_path"`
53458    new_path="$unix_path"
53459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53461    new_path="$unix_path"
53462  fi
53463
53464  if test "x$path" != "x$new_path"; then
53465    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53468  fi
53469
53470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53472
53473    else
53474      # We're on a unix platform. Hooray! :)
53475      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53476      has_space=`$ECHO "$path" | $GREP " "`
53477      if test "x$has_space" != x; then
53478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53481      fi
53482
53483      # Use eval to expand a potential ~
53484      eval path="$path"
53485      if test ! -f "$path" && test ! -d "$path"; then
53486        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53487      fi
53488
53489      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53490    fi
53491  fi
53492
53493
53494  # Only process if variable expands to non-empty
53495
53496  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53498
53499  # Input might be given as Windows format, start by converting to
53500  # unix format.
53501  path="$POTENTIAL_FREETYPE_LIB_PATH"
53502  new_path=`$CYGPATH -u "$path"`
53503
53504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53507  # "foo.exe" is OK but "foo" is an error.
53508  #
53509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53510  # It is also a way to make sure we got the proper file name for the real test later on.
53511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53512  if test "x$test_shortpath" = x; then
53513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53515    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53516  fi
53517
53518  # Call helper function which possibly converts this using DOS-style short mode.
53519  # If so, the updated path is stored in $new_path.
53520
53521  input_path="$new_path"
53522  # Check if we need to convert this using DOS-style short mode. If the path
53523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53524  # take no chances and rewrite it.
53525  # Note: m4 eats our [], so we need to use [ and ] instead.
53526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53527  if test "x$has_forbidden_chars" != x; then
53528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53532      # Going to short mode and back again did indeed matter. Since short mode is
53533      # case insensitive, let's make it lowercase to improve readability.
53534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53535      # Now convert it back to Unix-style (cygpath)
53536      input_path=`$CYGPATH -u "$shortmode_path"`
53537      new_path="$input_path"
53538    fi
53539  fi
53540
53541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53542  if test "x$test_cygdrive_prefix" = x; then
53543    # As a simple fix, exclude /usr/bin since it's not a real path.
53544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53546      # a path prefixed by /cygdrive for fixpath to work.
53547      new_path="$CYGWIN_ROOT_PATH$input_path"
53548    fi
53549  fi
53550
53551
53552  if test "x$path" != "x$new_path"; then
53553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53556  fi
53557
53558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53559
53560  path="$POTENTIAL_FREETYPE_LIB_PATH"
53561  has_colon=`$ECHO $path | $GREP ^.:`
53562  new_path="$path"
53563  if test "x$has_colon" = x; then
53564    # Not in mixed or Windows style, start by that.
53565    new_path=`cmd //c echo $path`
53566  fi
53567
53568
53569  input_path="$new_path"
53570  # Check if we need to convert this using DOS-style short mode. If the path
53571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53572  # take no chances and rewrite it.
53573  # Note: m4 eats our [], so we need to use [ and ] instead.
53574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53575  if test "x$has_forbidden_chars" != x; then
53576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53578  fi
53579
53580
53581  windows_path="$new_path"
53582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53583    unix_path=`$CYGPATH -u "$windows_path"`
53584    new_path="$unix_path"
53585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53587    new_path="$unix_path"
53588  fi
53589
53590  if test "x$path" != "x$new_path"; then
53591    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53594  fi
53595
53596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53598
53599    else
53600      # We're on a unix platform. Hooray! :)
53601      path="$POTENTIAL_FREETYPE_LIB_PATH"
53602      has_space=`$ECHO "$path" | $GREP " "`
53603      if test "x$has_space" != x; then
53604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53607      fi
53608
53609      # Use eval to expand a potential ~
53610      eval path="$path"
53611      if test ! -f "$path" && test ! -d "$path"; then
53612        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53613      fi
53614
53615      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53616    fi
53617  fi
53618
53619
53620    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53622$as_echo_n "checking for freetype includes... " >&6; }
53623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53624$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53625    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53627$as_echo_n "checking for freetype libraries... " >&6; }
53628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53629$as_echo "$FREETYPE_LIB_PATH" >&6; }
53630  fi
53631
53632          fi
53633
53634          if test "x$FOUND_FREETYPE" != xyes; then
53635            FREETYPE_BASE_DIR="$SYSROOT/usr"
53636            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53637
53638  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53639  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
53640  METHOD="well-known location"
53641
53642  # Let's start with an optimistic view of the world :-)
53643  FOUND_FREETYPE=yes
53644
53645  # First look for the canonical freetype main include file ft2build.h.
53646  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53647    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53648    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53649    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53650      # Fail.
53651      FOUND_FREETYPE=no
53652    fi
53653  fi
53654
53655  if test "x$FOUND_FREETYPE" = xyes; then
53656    # Include file found, let's continue the sanity check.
53657    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53658$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53659
53660    # Reset to default value
53661    FREETYPE_BASE_NAME=freetype
53662    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53663    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53664      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53665          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53666        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53667        # for the .6 version explicitly.
53668        FREETYPE_BASE_NAME=freetype.6
53669        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53670        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53671$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53672      else
53673        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53674$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53675        FOUND_FREETYPE=no
53676      fi
53677    else
53678      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53679        # On Windows, we will need both .lib and .dll file.
53680        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53681          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53682$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53683          FOUND_FREETYPE=no
53684        fi
53685      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53686          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53687        # Found lib in isa dir, use that instead.
53688        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53689        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53690$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53691      fi
53692    fi
53693  fi
53694
53695  if test "x$FOUND_FREETYPE" = xyes; then
53696
53697  # Only process if variable expands to non-empty
53698
53699  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53700    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53701
53702  # Input might be given as Windows format, start by converting to
53703  # unix format.
53704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53705  new_path=`$CYGPATH -u "$path"`
53706
53707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53710  # "foo.exe" is OK but "foo" is an error.
53711  #
53712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53713  # It is also a way to make sure we got the proper file name for the real test later on.
53714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53715  if test "x$test_shortpath" = x; then
53716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53718    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53719  fi
53720
53721  # Call helper function which possibly converts this using DOS-style short mode.
53722  # If so, the updated path is stored in $new_path.
53723
53724  input_path="$new_path"
53725  # Check if we need to convert this using DOS-style short mode. If the path
53726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53727  # take no chances and rewrite it.
53728  # Note: m4 eats our [], so we need to use [ and ] instead.
53729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53730  if test "x$has_forbidden_chars" != x; then
53731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53735      # Going to short mode and back again did indeed matter. Since short mode is
53736      # case insensitive, let's make it lowercase to improve readability.
53737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53738      # Now convert it back to Unix-style (cygpath)
53739      input_path=`$CYGPATH -u "$shortmode_path"`
53740      new_path="$input_path"
53741    fi
53742  fi
53743
53744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53745  if test "x$test_cygdrive_prefix" = x; then
53746    # As a simple fix, exclude /usr/bin since it's not a real path.
53747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53749      # a path prefixed by /cygdrive for fixpath to work.
53750      new_path="$CYGWIN_ROOT_PATH$input_path"
53751    fi
53752  fi
53753
53754
53755  if test "x$path" != "x$new_path"; then
53756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53759  fi
53760
53761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53762
53763  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53764  has_colon=`$ECHO $path | $GREP ^.:`
53765  new_path="$path"
53766  if test "x$has_colon" = x; then
53767    # Not in mixed or Windows style, start by that.
53768    new_path=`cmd //c echo $path`
53769  fi
53770
53771
53772  input_path="$new_path"
53773  # Check if we need to convert this using DOS-style short mode. If the path
53774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53775  # take no chances and rewrite it.
53776  # Note: m4 eats our [], so we need to use [ and ] instead.
53777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53778  if test "x$has_forbidden_chars" != x; then
53779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53781  fi
53782
53783
53784  windows_path="$new_path"
53785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53786    unix_path=`$CYGPATH -u "$windows_path"`
53787    new_path="$unix_path"
53788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53790    new_path="$unix_path"
53791  fi
53792
53793  if test "x$path" != "x$new_path"; then
53794    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53797  fi
53798
53799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53801
53802    else
53803      # We're on a unix platform. Hooray! :)
53804      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53805      has_space=`$ECHO "$path" | $GREP " "`
53806      if test "x$has_space" != x; then
53807        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53809        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53810      fi
53811
53812      # Use eval to expand a potential ~
53813      eval path="$path"
53814      if test ! -f "$path" && test ! -d "$path"; then
53815        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53816      fi
53817
53818      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53819    fi
53820  fi
53821
53822
53823  # Only process if variable expands to non-empty
53824
53825  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53827
53828  # Input might be given as Windows format, start by converting to
53829  # unix format.
53830  path="$POTENTIAL_FREETYPE_LIB_PATH"
53831  new_path=`$CYGPATH -u "$path"`
53832
53833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53836  # "foo.exe" is OK but "foo" is an error.
53837  #
53838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53839  # It is also a way to make sure we got the proper file name for the real test later on.
53840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53841  if test "x$test_shortpath" = x; then
53842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53843$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53844    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53845  fi
53846
53847  # Call helper function which possibly converts this using DOS-style short mode.
53848  # If so, the updated path is stored in $new_path.
53849
53850  input_path="$new_path"
53851  # Check if we need to convert this using DOS-style short mode. If the path
53852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53853  # take no chances and rewrite it.
53854  # Note: m4 eats our [], so we need to use [ and ] instead.
53855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53856  if test "x$has_forbidden_chars" != x; then
53857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53861      # Going to short mode and back again did indeed matter. Since short mode is
53862      # case insensitive, let's make it lowercase to improve readability.
53863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53864      # Now convert it back to Unix-style (cygpath)
53865      input_path=`$CYGPATH -u "$shortmode_path"`
53866      new_path="$input_path"
53867    fi
53868  fi
53869
53870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53871  if test "x$test_cygdrive_prefix" = x; then
53872    # As a simple fix, exclude /usr/bin since it's not a real path.
53873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53875      # a path prefixed by /cygdrive for fixpath to work.
53876      new_path="$CYGWIN_ROOT_PATH$input_path"
53877    fi
53878  fi
53879
53880
53881  if test "x$path" != "x$new_path"; then
53882    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53884$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53885  fi
53886
53887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53888
53889  path="$POTENTIAL_FREETYPE_LIB_PATH"
53890  has_colon=`$ECHO $path | $GREP ^.:`
53891  new_path="$path"
53892  if test "x$has_colon" = x; then
53893    # Not in mixed or Windows style, start by that.
53894    new_path=`cmd //c echo $path`
53895  fi
53896
53897
53898  input_path="$new_path"
53899  # Check if we need to convert this using DOS-style short mode. If the path
53900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53901  # take no chances and rewrite it.
53902  # Note: m4 eats our [], so we need to use [ and ] instead.
53903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53904  if test "x$has_forbidden_chars" != x; then
53905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53907  fi
53908
53909
53910  windows_path="$new_path"
53911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53912    unix_path=`$CYGPATH -u "$windows_path"`
53913    new_path="$unix_path"
53914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53916    new_path="$unix_path"
53917  fi
53918
53919  if test "x$path" != "x$new_path"; then
53920    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53922$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53923  fi
53924
53925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53927
53928    else
53929      # We're on a unix platform. Hooray! :)
53930      path="$POTENTIAL_FREETYPE_LIB_PATH"
53931      has_space=`$ECHO "$path" | $GREP " "`
53932      if test "x$has_space" != x; then
53933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53934$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53936      fi
53937
53938      # Use eval to expand a potential ~
53939      eval path="$path"
53940      if test ! -f "$path" && test ! -d "$path"; then
53941        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53942      fi
53943
53944      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53945    fi
53946  fi
53947
53948
53949    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53951$as_echo_n "checking for freetype includes... " >&6; }
53952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53953$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53954    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53956$as_echo_n "checking for freetype libraries... " >&6; }
53957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53958$as_echo "$FREETYPE_LIB_PATH" >&6; }
53959  fi
53960
53961            else
53962
53963  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53964  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
53965  METHOD="well-known location"
53966
53967  # Let's start with an optimistic view of the world :-)
53968  FOUND_FREETYPE=yes
53969
53970  # First look for the canonical freetype main include file ft2build.h.
53971  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53972    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53973    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53974    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53975      # Fail.
53976      FOUND_FREETYPE=no
53977    fi
53978  fi
53979
53980  if test "x$FOUND_FREETYPE" = xyes; then
53981    # Include file found, let's continue the sanity check.
53982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53983$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53984
53985    # Reset to default value
53986    FREETYPE_BASE_NAME=freetype
53987    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53988    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53989      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53990          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53991        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53992        # for the .6 version explicitly.
53993        FREETYPE_BASE_NAME=freetype.6
53994        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53995        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53996$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53997      else
53998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54000        FOUND_FREETYPE=no
54001      fi
54002    else
54003      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54004        # On Windows, we will need both .lib and .dll file.
54005        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54006          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54008          FOUND_FREETYPE=no
54009        fi
54010      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54011          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54012        # Found lib in isa dir, use that instead.
54013        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54014        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54015$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54016      fi
54017    fi
54018  fi
54019
54020  if test "x$FOUND_FREETYPE" = xyes; then
54021
54022  # Only process if variable expands to non-empty
54023
54024  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54026
54027  # Input might be given as Windows format, start by converting to
54028  # unix format.
54029  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54030  new_path=`$CYGPATH -u "$path"`
54031
54032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54035  # "foo.exe" is OK but "foo" is an error.
54036  #
54037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54038  # It is also a way to make sure we got the proper file name for the real test later on.
54039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54040  if test "x$test_shortpath" = x; then
54041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54044  fi
54045
54046  # Call helper function which possibly converts this using DOS-style short mode.
54047  # If so, the updated path is stored in $new_path.
54048
54049  input_path="$new_path"
54050  # Check if we need to convert this using DOS-style short mode. If the path
54051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54052  # take no chances and rewrite it.
54053  # Note: m4 eats our [], so we need to use [ and ] instead.
54054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54055  if test "x$has_forbidden_chars" != x; then
54056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54060      # Going to short mode and back again did indeed matter. Since short mode is
54061      # case insensitive, let's make it lowercase to improve readability.
54062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54063      # Now convert it back to Unix-style (cygpath)
54064      input_path=`$CYGPATH -u "$shortmode_path"`
54065      new_path="$input_path"
54066    fi
54067  fi
54068
54069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54070  if test "x$test_cygdrive_prefix" = x; then
54071    # As a simple fix, exclude /usr/bin since it's not a real path.
54072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54074      # a path prefixed by /cygdrive for fixpath to work.
54075      new_path="$CYGWIN_ROOT_PATH$input_path"
54076    fi
54077  fi
54078
54079
54080  if test "x$path" != "x$new_path"; then
54081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54084  fi
54085
54086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54087
54088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54089  has_colon=`$ECHO $path | $GREP ^.:`
54090  new_path="$path"
54091  if test "x$has_colon" = x; then
54092    # Not in mixed or Windows style, start by that.
54093    new_path=`cmd //c echo $path`
54094  fi
54095
54096
54097  input_path="$new_path"
54098  # Check if we need to convert this using DOS-style short mode. If the path
54099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54100  # take no chances and rewrite it.
54101  # Note: m4 eats our [], so we need to use [ and ] instead.
54102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54103  if test "x$has_forbidden_chars" != x; then
54104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54106  fi
54107
54108
54109  windows_path="$new_path"
54110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54111    unix_path=`$CYGPATH -u "$windows_path"`
54112    new_path="$unix_path"
54113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54115    new_path="$unix_path"
54116  fi
54117
54118  if test "x$path" != "x$new_path"; then
54119    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54122  fi
54123
54124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54126
54127    else
54128      # We're on a unix platform. Hooray! :)
54129      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54130      has_space=`$ECHO "$path" | $GREP " "`
54131      if test "x$has_space" != x; then
54132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54135      fi
54136
54137      # Use eval to expand a potential ~
54138      eval path="$path"
54139      if test ! -f "$path" && test ! -d "$path"; then
54140        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54141      fi
54142
54143      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54144    fi
54145  fi
54146
54147
54148  # Only process if variable expands to non-empty
54149
54150  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54152
54153  # Input might be given as Windows format, start by converting to
54154  # unix format.
54155  path="$POTENTIAL_FREETYPE_LIB_PATH"
54156  new_path=`$CYGPATH -u "$path"`
54157
54158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54161  # "foo.exe" is OK but "foo" is an error.
54162  #
54163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54164  # It is also a way to make sure we got the proper file name for the real test later on.
54165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54166  if test "x$test_shortpath" = x; then
54167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54170  fi
54171
54172  # Call helper function which possibly converts this using DOS-style short mode.
54173  # If so, the updated path is stored in $new_path.
54174
54175  input_path="$new_path"
54176  # Check if we need to convert this using DOS-style short mode. If the path
54177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54178  # take no chances and rewrite it.
54179  # Note: m4 eats our [], so we need to use [ and ] instead.
54180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54181  if test "x$has_forbidden_chars" != x; then
54182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54186      # Going to short mode and back again did indeed matter. Since short mode is
54187      # case insensitive, let's make it lowercase to improve readability.
54188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54189      # Now convert it back to Unix-style (cygpath)
54190      input_path=`$CYGPATH -u "$shortmode_path"`
54191      new_path="$input_path"
54192    fi
54193  fi
54194
54195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54196  if test "x$test_cygdrive_prefix" = x; then
54197    # As a simple fix, exclude /usr/bin since it's not a real path.
54198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54200      # a path prefixed by /cygdrive for fixpath to work.
54201      new_path="$CYGWIN_ROOT_PATH$input_path"
54202    fi
54203  fi
54204
54205
54206  if test "x$path" != "x$new_path"; then
54207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54210  fi
54211
54212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54213
54214  path="$POTENTIAL_FREETYPE_LIB_PATH"
54215  has_colon=`$ECHO $path | $GREP ^.:`
54216  new_path="$path"
54217  if test "x$has_colon" = x; then
54218    # Not in mixed or Windows style, start by that.
54219    new_path=`cmd //c echo $path`
54220  fi
54221
54222
54223  input_path="$new_path"
54224  # Check if we need to convert this using DOS-style short mode. If the path
54225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54226  # take no chances and rewrite it.
54227  # Note: m4 eats our [], so we need to use [ and ] instead.
54228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54229  if test "x$has_forbidden_chars" != x; then
54230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54232  fi
54233
54234
54235  windows_path="$new_path"
54236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54237    unix_path=`$CYGPATH -u "$windows_path"`
54238    new_path="$unix_path"
54239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54241    new_path="$unix_path"
54242  fi
54243
54244  if test "x$path" != "x$new_path"; then
54245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54248  fi
54249
54250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54252
54253    else
54254      # We're on a unix platform. Hooray! :)
54255      path="$POTENTIAL_FREETYPE_LIB_PATH"
54256      has_space=`$ECHO "$path" | $GREP " "`
54257      if test "x$has_space" != x; then
54258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54261      fi
54262
54263      # Use eval to expand a potential ~
54264      eval path="$path"
54265      if test ! -f "$path" && test ! -d "$path"; then
54266        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54267      fi
54268
54269      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54270    fi
54271  fi
54272
54273
54274    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54275    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54276$as_echo_n "checking for freetype includes... " >&6; }
54277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54278$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54279    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54281$as_echo_n "checking for freetype libraries... " >&6; }
54282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54283$as_echo "$FREETYPE_LIB_PATH" >&6; }
54284  fi
54285
54286              if test "x$FOUND_FREETYPE" != xyes; then
54287
54288  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54289  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
54290  METHOD="well-known location"
54291
54292  # Let's start with an optimistic view of the world :-)
54293  FOUND_FREETYPE=yes
54294
54295  # First look for the canonical freetype main include file ft2build.h.
54296  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54297    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54298    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54299    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54300      # Fail.
54301      FOUND_FREETYPE=no
54302    fi
54303  fi
54304
54305  if test "x$FOUND_FREETYPE" = xyes; then
54306    # Include file found, let's continue the sanity check.
54307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54308$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54309
54310    # Reset to default value
54311    FREETYPE_BASE_NAME=freetype
54312    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54313    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54314      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54315          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54316        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54317        # for the .6 version explicitly.
54318        FREETYPE_BASE_NAME=freetype.6
54319        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54320        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54321$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54322      else
54323        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54324$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54325        FOUND_FREETYPE=no
54326      fi
54327    else
54328      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54329        # On Windows, we will need both .lib and .dll file.
54330        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54331          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54332$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54333          FOUND_FREETYPE=no
54334        fi
54335      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54336          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54337        # Found lib in isa dir, use that instead.
54338        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54339        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54340$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54341      fi
54342    fi
54343  fi
54344
54345  if test "x$FOUND_FREETYPE" = xyes; then
54346
54347  # Only process if variable expands to non-empty
54348
54349  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54351
54352  # Input might be given as Windows format, start by converting to
54353  # unix format.
54354  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54355  new_path=`$CYGPATH -u "$path"`
54356
54357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54360  # "foo.exe" is OK but "foo" is an error.
54361  #
54362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54363  # It is also a way to make sure we got the proper file name for the real test later on.
54364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54365  if test "x$test_shortpath" = x; then
54366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54368    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54369  fi
54370
54371  # Call helper function which possibly converts this using DOS-style short mode.
54372  # If so, the updated path is stored in $new_path.
54373
54374  input_path="$new_path"
54375  # Check if we need to convert this using DOS-style short mode. If the path
54376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54377  # take no chances and rewrite it.
54378  # Note: m4 eats our [], so we need to use [ and ] instead.
54379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54380  if test "x$has_forbidden_chars" != x; then
54381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54385      # Going to short mode and back again did indeed matter. Since short mode is
54386      # case insensitive, let's make it lowercase to improve readability.
54387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54388      # Now convert it back to Unix-style (cygpath)
54389      input_path=`$CYGPATH -u "$shortmode_path"`
54390      new_path="$input_path"
54391    fi
54392  fi
54393
54394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54395  if test "x$test_cygdrive_prefix" = x; then
54396    # As a simple fix, exclude /usr/bin since it's not a real path.
54397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54399      # a path prefixed by /cygdrive for fixpath to work.
54400      new_path="$CYGWIN_ROOT_PATH$input_path"
54401    fi
54402  fi
54403
54404
54405  if test "x$path" != "x$new_path"; then
54406    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54409  fi
54410
54411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54412
54413  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54414  has_colon=`$ECHO $path | $GREP ^.:`
54415  new_path="$path"
54416  if test "x$has_colon" = x; then
54417    # Not in mixed or Windows style, start by that.
54418    new_path=`cmd //c echo $path`
54419  fi
54420
54421
54422  input_path="$new_path"
54423  # Check if we need to convert this using DOS-style short mode. If the path
54424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54425  # take no chances and rewrite it.
54426  # Note: m4 eats our [], so we need to use [ and ] instead.
54427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54428  if test "x$has_forbidden_chars" != x; then
54429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54431  fi
54432
54433
54434  windows_path="$new_path"
54435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54436    unix_path=`$CYGPATH -u "$windows_path"`
54437    new_path="$unix_path"
54438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54440    new_path="$unix_path"
54441  fi
54442
54443  if test "x$path" != "x$new_path"; then
54444    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54447  fi
54448
54449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54451
54452    else
54453      # We're on a unix platform. Hooray! :)
54454      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54455      has_space=`$ECHO "$path" | $GREP " "`
54456      if test "x$has_space" != x; then
54457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54460      fi
54461
54462      # Use eval to expand a potential ~
54463      eval path="$path"
54464      if test ! -f "$path" && test ! -d "$path"; then
54465        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54466      fi
54467
54468      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54469    fi
54470  fi
54471
54472
54473  # Only process if variable expands to non-empty
54474
54475  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54477
54478  # Input might be given as Windows format, start by converting to
54479  # unix format.
54480  path="$POTENTIAL_FREETYPE_LIB_PATH"
54481  new_path=`$CYGPATH -u "$path"`
54482
54483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54486  # "foo.exe" is OK but "foo" is an error.
54487  #
54488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54489  # It is also a way to make sure we got the proper file name for the real test later on.
54490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54491  if test "x$test_shortpath" = x; then
54492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54493$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54494    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54495  fi
54496
54497  # Call helper function which possibly converts this using DOS-style short mode.
54498  # If so, the updated path is stored in $new_path.
54499
54500  input_path="$new_path"
54501  # Check if we need to convert this using DOS-style short mode. If the path
54502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54503  # take no chances and rewrite it.
54504  # Note: m4 eats our [], so we need to use [ and ] instead.
54505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54506  if test "x$has_forbidden_chars" != x; then
54507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54511      # Going to short mode and back again did indeed matter. Since short mode is
54512      # case insensitive, let's make it lowercase to improve readability.
54513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54514      # Now convert it back to Unix-style (cygpath)
54515      input_path=`$CYGPATH -u "$shortmode_path"`
54516      new_path="$input_path"
54517    fi
54518  fi
54519
54520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54521  if test "x$test_cygdrive_prefix" = x; then
54522    # As a simple fix, exclude /usr/bin since it's not a real path.
54523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54525      # a path prefixed by /cygdrive for fixpath to work.
54526      new_path="$CYGWIN_ROOT_PATH$input_path"
54527    fi
54528  fi
54529
54530
54531  if test "x$path" != "x$new_path"; then
54532    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54534$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54535  fi
54536
54537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54538
54539  path="$POTENTIAL_FREETYPE_LIB_PATH"
54540  has_colon=`$ECHO $path | $GREP ^.:`
54541  new_path="$path"
54542  if test "x$has_colon" = x; then
54543    # Not in mixed or Windows style, start by that.
54544    new_path=`cmd //c echo $path`
54545  fi
54546
54547
54548  input_path="$new_path"
54549  # Check if we need to convert this using DOS-style short mode. If the path
54550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54551  # take no chances and rewrite it.
54552  # Note: m4 eats our [], so we need to use [ and ] instead.
54553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54554  if test "x$has_forbidden_chars" != x; then
54555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54557  fi
54558
54559
54560  windows_path="$new_path"
54561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54562    unix_path=`$CYGPATH -u "$windows_path"`
54563    new_path="$unix_path"
54564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54566    new_path="$unix_path"
54567  fi
54568
54569  if test "x$path" != "x$new_path"; then
54570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54573  fi
54574
54575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54577
54578    else
54579      # We're on a unix platform. Hooray! :)
54580      path="$POTENTIAL_FREETYPE_LIB_PATH"
54581      has_space=`$ECHO "$path" | $GREP " "`
54582      if test "x$has_space" != x; then
54583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54584$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54586      fi
54587
54588      # Use eval to expand a potential ~
54589      eval path="$path"
54590      if test ! -f "$path" && test ! -d "$path"; then
54591        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54592      fi
54593
54594      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54595    fi
54596  fi
54597
54598
54599    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54601$as_echo_n "checking for freetype includes... " >&6; }
54602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54603$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54604    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54606$as_echo_n "checking for freetype libraries... " >&6; }
54607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54608$as_echo "$FREETYPE_LIB_PATH" >&6; }
54609  fi
54610
54611              fi
54612            fi
54613          fi
54614        fi
54615      fi # end check in well-known locations
54616
54617      if test "x$FOUND_FREETYPE" != xyes; then
54618
54619  # Print a helpful message on how to acquire the necessary build dependency.
54620  # freetype is the help tag: freetype, cups, alsa etc
54621  MISSING_DEPENDENCY=freetype
54622
54623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54624    cygwin_help $MISSING_DEPENDENCY
54625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54626    msys_help $MISSING_DEPENDENCY
54627  else
54628    PKGHANDLER_COMMAND=
54629
54630    case $PKGHANDLER in
54631      apt-get)
54632        apt_help     $MISSING_DEPENDENCY ;;
54633      yum)
54634        yum_help     $MISSING_DEPENDENCY ;;
54635      port)
54636        port_help    $MISSING_DEPENDENCY ;;
54637      pkgutil)
54638        pkgutil_help $MISSING_DEPENDENCY ;;
54639      pkgadd)
54640        pkgadd_help  $MISSING_DEPENDENCY ;;
54641    esac
54642
54643    if test "x$PKGHANDLER_COMMAND" != x; then
54644      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54645    fi
54646  fi
54647
54648        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
54649      fi
54650    fi # end user specified settings
54651
54652    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
54653    if test "x$FREETYPE_CFLAGS" = x; then
54654
54655  # Only process if variable expands to non-empty
54656
54657  if test "x$FREETYPE_INCLUDE_PATH" != x; then
54658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54659
54660  # Input might be given as Windows format, start by converting to
54661  # unix format.
54662  path="$FREETYPE_INCLUDE_PATH"
54663  new_path=`$CYGPATH -u "$path"`
54664
54665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54668  # "foo.exe" is OK but "foo" is an error.
54669  #
54670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54671  # It is also a way to make sure we got the proper file name for the real test later on.
54672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54673  if test "x$test_shortpath" = x; then
54674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54675$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54676    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
54677  fi
54678
54679  # Call helper function which possibly converts this using DOS-style short mode.
54680  # If so, the updated path is stored in $new_path.
54681
54682  input_path="$new_path"
54683  # Check if we need to convert this using DOS-style short mode. If the path
54684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54685  # take no chances and rewrite it.
54686  # Note: m4 eats our [], so we need to use [ and ] instead.
54687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54688  if test "x$has_forbidden_chars" != x; then
54689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54693      # Going to short mode and back again did indeed matter. Since short mode is
54694      # case insensitive, let's make it lowercase to improve readability.
54695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54696      # Now convert it back to Unix-style (cygpath)
54697      input_path=`$CYGPATH -u "$shortmode_path"`
54698      new_path="$input_path"
54699    fi
54700  fi
54701
54702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54703  if test "x$test_cygdrive_prefix" = x; then
54704    # As a simple fix, exclude /usr/bin since it's not a real path.
54705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54707      # a path prefixed by /cygdrive for fixpath to work.
54708      new_path="$CYGWIN_ROOT_PATH$input_path"
54709    fi
54710  fi
54711
54712
54713  if test "x$path" != "x$new_path"; then
54714    FREETYPE_INCLUDE_PATH="$new_path"
54715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54716$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54717  fi
54718
54719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54720
54721  path="$FREETYPE_INCLUDE_PATH"
54722  has_colon=`$ECHO $path | $GREP ^.:`
54723  new_path="$path"
54724  if test "x$has_colon" = x; then
54725    # Not in mixed or Windows style, start by that.
54726    new_path=`cmd //c echo $path`
54727  fi
54728
54729
54730  input_path="$new_path"
54731  # Check if we need to convert this using DOS-style short mode. If the path
54732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54733  # take no chances and rewrite it.
54734  # Note: m4 eats our [], so we need to use [ and ] instead.
54735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54736  if test "x$has_forbidden_chars" != x; then
54737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54739  fi
54740
54741
54742  windows_path="$new_path"
54743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54744    unix_path=`$CYGPATH -u "$windows_path"`
54745    new_path="$unix_path"
54746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54748    new_path="$unix_path"
54749  fi
54750
54751  if test "x$path" != "x$new_path"; then
54752    FREETYPE_INCLUDE_PATH="$new_path"
54753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54754$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54755  fi
54756
54757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54759
54760    else
54761      # We're on a unix platform. Hooray! :)
54762      path="$FREETYPE_INCLUDE_PATH"
54763      has_space=`$ECHO "$path" | $GREP " "`
54764      if test "x$has_space" != x; then
54765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54766$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54768      fi
54769
54770      # Use eval to expand a potential ~
54771      eval path="$path"
54772      if test ! -f "$path" && test ! -d "$path"; then
54773        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54774      fi
54775
54776      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54777    fi
54778  fi
54779
54780      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
54781        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
54782      else
54783        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
54784      fi
54785    fi
54786
54787    if test "x$FREETYPE_LIBS" = x; then
54788
54789  # Only process if variable expands to non-empty
54790
54791  if test "x$FREETYPE_LIB_PATH" != x; then
54792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54793
54794  # Input might be given as Windows format, start by converting to
54795  # unix format.
54796  path="$FREETYPE_LIB_PATH"
54797  new_path=`$CYGPATH -u "$path"`
54798
54799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54802  # "foo.exe" is OK but "foo" is an error.
54803  #
54804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54805  # It is also a way to make sure we got the proper file name for the real test later on.
54806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54807  if test "x$test_shortpath" = x; then
54808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54809$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54810    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
54811  fi
54812
54813  # Call helper function which possibly converts this using DOS-style short mode.
54814  # If so, the updated path is stored in $new_path.
54815
54816  input_path="$new_path"
54817  # Check if we need to convert this using DOS-style short mode. If the path
54818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54819  # take no chances and rewrite it.
54820  # Note: m4 eats our [], so we need to use [ and ] instead.
54821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54822  if test "x$has_forbidden_chars" != x; then
54823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54827      # Going to short mode and back again did indeed matter. Since short mode is
54828      # case insensitive, let's make it lowercase to improve readability.
54829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54830      # Now convert it back to Unix-style (cygpath)
54831      input_path=`$CYGPATH -u "$shortmode_path"`
54832      new_path="$input_path"
54833    fi
54834  fi
54835
54836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54837  if test "x$test_cygdrive_prefix" = x; then
54838    # As a simple fix, exclude /usr/bin since it's not a real path.
54839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54841      # a path prefixed by /cygdrive for fixpath to work.
54842      new_path="$CYGWIN_ROOT_PATH$input_path"
54843    fi
54844  fi
54845
54846
54847  if test "x$path" != "x$new_path"; then
54848    FREETYPE_LIB_PATH="$new_path"
54849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54850$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54851  fi
54852
54853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54854
54855  path="$FREETYPE_LIB_PATH"
54856  has_colon=`$ECHO $path | $GREP ^.:`
54857  new_path="$path"
54858  if test "x$has_colon" = x; then
54859    # Not in mixed or Windows style, start by that.
54860    new_path=`cmd //c echo $path`
54861  fi
54862
54863
54864  input_path="$new_path"
54865  # Check if we need to convert this using DOS-style short mode. If the path
54866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54867  # take no chances and rewrite it.
54868  # Note: m4 eats our [], so we need to use [ and ] instead.
54869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54870  if test "x$has_forbidden_chars" != x; then
54871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54873  fi
54874
54875
54876  windows_path="$new_path"
54877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54878    unix_path=`$CYGPATH -u "$windows_path"`
54879    new_path="$unix_path"
54880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54882    new_path="$unix_path"
54883  fi
54884
54885  if test "x$path" != "x$new_path"; then
54886    FREETYPE_LIB_PATH="$new_path"
54887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
54888$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54889  fi
54890
54891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54893
54894    else
54895      # We're on a unix platform. Hooray! :)
54896      path="$FREETYPE_LIB_PATH"
54897      has_space=`$ECHO "$path" | $GREP " "`
54898      if test "x$has_space" != x; then
54899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54900$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54902      fi
54903
54904      # Use eval to expand a potential ~
54905      eval path="$path"
54906      if test ! -f "$path" && test ! -d "$path"; then
54907        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54908      fi
54909
54910      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54911    fi
54912  fi
54913
54914      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54915        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
54916      else
54917        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
54918      fi
54919    fi
54920
54921    # Try to compile it
54922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
54923$as_echo_n "checking if we can compile and link with freetype... " >&6; }
54924    ac_ext=cpp
54925ac_cpp='$CXXCPP $CPPFLAGS'
54926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54929
54930    PREV_CXXCFLAGS="$CXXFLAGS"
54931    PREV_LIBS="$LIBS"
54932    PREV_CXX="$CXX"
54933    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
54934    LIBS="$LIBS $FREETYPE_LIBS"
54935    CXX="$FIXPATH $CXX"
54936    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54937/* end confdefs.h.  */
54938
54939          #include<ft2build.h>
54940          #include FT_FREETYPE_H
54941          int main () {
54942            FT_Init_FreeType(NULL);
54943            return 0;
54944          }
54945
54946_ACEOF
54947if ac_fn_cxx_try_link "$LINENO"; then :
54948
54949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54950$as_echo "yes" >&6; }
54951
54952else
54953
54954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54955$as_echo "no" >&6; }
54956          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
54957$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
54958          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
54959$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
54960
54961
54962  # Print a helpful message on how to acquire the necessary build dependency.
54963  # freetype is the help tag: freetype, cups, alsa etc
54964  MISSING_DEPENDENCY=freetype
54965
54966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54967    cygwin_help $MISSING_DEPENDENCY
54968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54969    msys_help $MISSING_DEPENDENCY
54970  else
54971    PKGHANDLER_COMMAND=
54972
54973    case $PKGHANDLER in
54974      apt-get)
54975        apt_help     $MISSING_DEPENDENCY ;;
54976      yum)
54977        yum_help     $MISSING_DEPENDENCY ;;
54978      port)
54979        port_help    $MISSING_DEPENDENCY ;;
54980      pkgutil)
54981        pkgutil_help $MISSING_DEPENDENCY ;;
54982      pkgadd)
54983        pkgadd_help  $MISSING_DEPENDENCY ;;
54984    esac
54985
54986    if test "x$PKGHANDLER_COMMAND" != x; then
54987      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54988    fi
54989  fi
54990
54991
54992          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
54993
54994
54995fi
54996rm -f core conftest.err conftest.$ac_objext \
54997    conftest$ac_exeext conftest.$ac_ext
54998    CXXCFLAGS="$PREV_CXXFLAGS"
54999    LIBS="$PREV_LIBS"
55000    CXX="$PREV_CXX"
55001    ac_ext=cpp
55002ac_cpp='$CXXCPP $CPPFLAGS'
55003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55006
55007
55008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55009$as_echo_n "checking if we should bundle freetype... " >&6; }
55010    if test "x$BUNDLE_FREETYPE" = xyes; then
55011      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55012    fi
55013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55014$as_echo "$BUNDLE_FREETYPE" >&6; }
55015
55016  fi # end freetype needed
55017
55018
55019
55020
55021
55022
55023
55024# Check whether --with-alsa was given.
55025if test "${with_alsa+set}" = set; then :
55026  withval=$with_alsa;
55027fi
55028
55029
55030# Check whether --with-alsa-include was given.
55031if test "${with_alsa_include+set}" = set; then :
55032  withval=$with_alsa_include;
55033fi
55034
55035
55036# Check whether --with-alsa-lib was given.
55037if test "${with_alsa_lib+set}" = set; then :
55038  withval=$with_alsa_lib;
55039fi
55040
55041
55042  if test "x$NEEDS_LIB_ALSA" = xfalse; then
55043    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55044        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55045        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55046      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55047$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55048    fi
55049    ALSA_CFLAGS=
55050    ALSA_LIBS=
55051  else
55052    ALSA_FOUND=no
55053
55054    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55055      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55056    fi
55057
55058    if test "x${with_alsa}" != x; then
55059      ALSA_LIBS="-L${with_alsa}/lib -lasound"
55060      ALSA_CFLAGS="-I${with_alsa}/include"
55061      ALSA_FOUND=yes
55062    fi
55063    if test "x${with_alsa_include}" != x; then
55064      ALSA_CFLAGS="-I${with_alsa_include}"
55065      ALSA_FOUND=yes
55066    fi
55067    if test "x${with_alsa_lib}" != x; then
55068      ALSA_LIBS="-L${with_alsa_lib} -lasound"
55069      ALSA_FOUND=yes
55070    fi
55071    # Do not try pkg-config if we have a sysroot set.
55072    if test "x$SYSROOT" = x; then
55073      if test "x$ALSA_FOUND" = xno; then
55074
55075pkg_failed=no
55076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55077$as_echo_n "checking for ALSA... " >&6; }
55078
55079if test -n "$ALSA_CFLAGS"; then
55080    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55081 elif test -n "$PKG_CONFIG"; then
55082    if test -n "$PKG_CONFIG" && \
55083    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55084  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55085  ac_status=$?
55086  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55087  test $ac_status = 0; }; then
55088  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55089else
55090  pkg_failed=yes
55091fi
55092 else
55093    pkg_failed=untried
55094fi
55095if test -n "$ALSA_LIBS"; then
55096    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55097 elif test -n "$PKG_CONFIG"; then
55098    if test -n "$PKG_CONFIG" && \
55099    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55100  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55101  ac_status=$?
55102  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55103  test $ac_status = 0; }; then
55104  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55105else
55106  pkg_failed=yes
55107fi
55108 else
55109    pkg_failed=untried
55110fi
55111
55112
55113
55114if test $pkg_failed = yes; then
55115
55116if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55117        _pkg_short_errors_supported=yes
55118else
55119        _pkg_short_errors_supported=no
55120fi
55121        if test $_pkg_short_errors_supported = yes; then
55122	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55123        else
55124	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55125        fi
55126	# Put the nasty error message in config.log where it belongs
55127	echo "$ALSA_PKG_ERRORS" >&5
55128
55129	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55130$as_echo "no" >&6; }
55131                ALSA_FOUND=no
55132elif test $pkg_failed = untried; then
55133	ALSA_FOUND=no
55134else
55135	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55136	ALSA_LIBS=$pkg_cv_ALSA_LIBS
55137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55138$as_echo "yes" >&6; }
55139	ALSA_FOUND=yes
55140fi
55141      fi
55142    fi
55143    if test "x$ALSA_FOUND" = xno; then
55144      for ac_header in alsa/asoundlib.h
55145do :
55146  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55147if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55148  cat >>confdefs.h <<_ACEOF
55149#define HAVE_ALSA_ASOUNDLIB_H 1
55150_ACEOF
55151
55152            ALSA_FOUND=yes
55153            ALSA_CFLAGS=-Iignoreme
55154            ALSA_LIBS=-lasound
55155            DEFAULT_ALSA=yes
55156
55157else
55158  ALSA_FOUND=no
55159
55160fi
55161
55162done
55163
55164    fi
55165    if test "x$ALSA_FOUND" = xno; then
55166
55167  # Print a helpful message on how to acquire the necessary build dependency.
55168  # alsa is the help tag: freetype, cups, alsa etc
55169  MISSING_DEPENDENCY=alsa
55170
55171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55172    cygwin_help $MISSING_DEPENDENCY
55173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55174    msys_help $MISSING_DEPENDENCY
55175  else
55176    PKGHANDLER_COMMAND=
55177
55178    case $PKGHANDLER in
55179      apt-get)
55180        apt_help     $MISSING_DEPENDENCY ;;
55181      yum)
55182        yum_help     $MISSING_DEPENDENCY ;;
55183      port)
55184        port_help    $MISSING_DEPENDENCY ;;
55185      pkgutil)
55186        pkgutil_help $MISSING_DEPENDENCY ;;
55187      pkgadd)
55188        pkgadd_help  $MISSING_DEPENDENCY ;;
55189    esac
55190
55191    if test "x$PKGHANDLER_COMMAND" != x; then
55192      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55193    fi
55194  fi
55195
55196      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
55197    fi
55198  fi
55199
55200
55201
55202
55203
55204
55205# Check whether --with-libffi was given.
55206if test "${with_libffi+set}" = set; then :
55207  withval=$with_libffi;
55208fi
55209
55210
55211# Check whether --with-libffi-include was given.
55212if test "${with_libffi_include+set}" = set; then :
55213  withval=$with_libffi_include;
55214fi
55215
55216
55217# Check whether --with-libffi-lib was given.
55218if test "${with_libffi_lib+set}" = set; then :
55219  withval=$with_libffi_lib;
55220fi
55221
55222
55223  if test "x$NEEDS_LIB_FFI" = xfalse; then
55224    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
55225        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
55226        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
55227      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
55228$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
55229    fi
55230    LIBFFI_CFLAGS=
55231    LIBFFI_LIBS=
55232  else
55233    LIBFFI_FOUND=no
55234
55235    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
55236      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
55237    fi
55238
55239    if test "x${with_libffi}" != x; then
55240      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
55241      LIBFFI_CFLAGS="-I${with_libffi}/include"
55242      LIBFFI_FOUND=yes
55243    fi
55244    if test "x${with_libffi_include}" != x; then
55245      LIBFFI_CFLAGS="-I${with_libffi_include}"
55246      LIBFFI_FOUND=yes
55247    fi
55248    if test "x${with_libffi_lib}" != x; then
55249      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
55250      LIBFFI_FOUND=yes
55251    fi
55252    # Do not try pkg-config if we have a sysroot set.
55253    if test "x$SYSROOT" = x; then
55254      if test "x$LIBFFI_FOUND" = xno; then
55255        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
55256
55257pkg_failed=no
55258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
55259$as_echo_n "checking for LIBFFI... " >&6; }
55260
55261if test -n "$LIBFFI_CFLAGS"; then
55262    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
55263 elif test -n "$PKG_CONFIG"; then
55264    if test -n "$PKG_CONFIG" && \
55265    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55266  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55267  ac_status=$?
55268  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55269  test $ac_status = 0; }; then
55270  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
55271else
55272  pkg_failed=yes
55273fi
55274 else
55275    pkg_failed=untried
55276fi
55277if test -n "$LIBFFI_LIBS"; then
55278    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
55279 elif test -n "$PKG_CONFIG"; then
55280    if test -n "$PKG_CONFIG" && \
55281    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
55282  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
55283  ac_status=$?
55284  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55285  test $ac_status = 0; }; then
55286  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
55287else
55288  pkg_failed=yes
55289fi
55290 else
55291    pkg_failed=untried
55292fi
55293
55294
55295
55296if test $pkg_failed = yes; then
55297
55298if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55299        _pkg_short_errors_supported=yes
55300else
55301        _pkg_short_errors_supported=no
55302fi
55303        if test $_pkg_short_errors_supported = yes; then
55304	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
55305        else
55306	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
55307        fi
55308	# Put the nasty error message in config.log where it belongs
55309	echo "$LIBFFI_PKG_ERRORS" >&5
55310
55311	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55312$as_echo "no" >&6; }
55313                LIBFFI_FOUND=no
55314elif test $pkg_failed = untried; then
55315	LIBFFI_FOUND=no
55316else
55317	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
55318	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
55319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55320$as_echo "yes" >&6; }
55321	LIBFFI_FOUND=yes
55322fi
55323      fi
55324    fi
55325    if test "x$LIBFFI_FOUND" = xno; then
55326      for ac_header in ffi.h
55327do :
55328  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
55329if test "x$ac_cv_header_ffi_h" = xyes; then :
55330  cat >>confdefs.h <<_ACEOF
55331#define HAVE_FFI_H 1
55332_ACEOF
55333
55334            LIBFFI_FOUND=yes
55335            LIBFFI_CFLAGS=
55336            LIBFFI_LIBS=-lffi
55337
55338else
55339  LIBFFI_FOUND=no
55340
55341fi
55342
55343done
55344
55345    fi
55346    if test "x$LIBFFI_FOUND" = xno; then
55347
55348  # Print a helpful message on how to acquire the necessary build dependency.
55349  # ffi is the help tag: freetype, cups, alsa etc
55350  MISSING_DEPENDENCY=ffi
55351
55352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55353    cygwin_help $MISSING_DEPENDENCY
55354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55355    msys_help $MISSING_DEPENDENCY
55356  else
55357    PKGHANDLER_COMMAND=
55358
55359    case $PKGHANDLER in
55360      apt-get)
55361        apt_help     $MISSING_DEPENDENCY ;;
55362      yum)
55363        yum_help     $MISSING_DEPENDENCY ;;
55364      port)
55365        port_help    $MISSING_DEPENDENCY ;;
55366      pkgutil)
55367        pkgutil_help $MISSING_DEPENDENCY ;;
55368      pkgadd)
55369        pkgadd_help  $MISSING_DEPENDENCY ;;
55370    esac
55371
55372    if test "x$PKGHANDLER_COMMAND" != x; then
55373      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55374    fi
55375  fi
55376
55377      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
55378    fi
55379
55380    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
55381$as_echo_n "checking if libffi works... " >&6; }
55382    ac_ext=c
55383ac_cpp='$CPP $CPPFLAGS'
55384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55386ac_compiler_gnu=$ac_cv_c_compiler_gnu
55387
55388    OLD_CFLAGS="$CFLAGS"
55389    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
55390    OLD_LIBS="$LIBS"
55391    LIBS="$LIBS $LIBFFI_LIBS"
55392    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55393/* end confdefs.h.  */
55394#include <ffi.h>
55395int
55396main ()
55397{
55398
55399          ffi_call(NULL, NULL, NULL, NULL);
55400          return 0;
55401
55402  ;
55403  return 0;
55404}
55405_ACEOF
55406if ac_fn_c_try_link "$LINENO"; then :
55407  LIBFFI_WORKS=yes
55408else
55409  LIBFFI_WORKS=no
55410
55411fi
55412rm -f core conftest.err conftest.$ac_objext \
55413    conftest$ac_exeext conftest.$ac_ext
55414    CFLAGS="$OLD_CFLAGS"
55415    LIBS="$OLD_LIBS"
55416    ac_ext=cpp
55417ac_cpp='$CXXCPP $CPPFLAGS'
55418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55421
55422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
55423$as_echo "$LIBFFI_WORKS" >&6; }
55424
55425    if test "x$LIBFFI_WORKS" = xno; then
55426
55427  # Print a helpful message on how to acquire the necessary build dependency.
55428  # ffi is the help tag: freetype, cups, alsa etc
55429  MISSING_DEPENDENCY=ffi
55430
55431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55432    cygwin_help $MISSING_DEPENDENCY
55433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55434    msys_help $MISSING_DEPENDENCY
55435  else
55436    PKGHANDLER_COMMAND=
55437
55438    case $PKGHANDLER in
55439      apt-get)
55440        apt_help     $MISSING_DEPENDENCY ;;
55441      yum)
55442        yum_help     $MISSING_DEPENDENCY ;;
55443      port)
55444        port_help    $MISSING_DEPENDENCY ;;
55445      pkgutil)
55446        pkgutil_help $MISSING_DEPENDENCY ;;
55447      pkgadd)
55448        pkgadd_help  $MISSING_DEPENDENCY ;;
55449    esac
55450
55451    if test "x$PKGHANDLER_COMMAND" != x; then
55452      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55453    fi
55454  fi
55455
55456      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
55457    fi
55458  fi
55459
55460
55461
55462
55463
55464  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
55465    # Extract the first word of "llvm-config", so it can be a program name with args.
55466set dummy llvm-config; ac_word=$2
55467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
55468$as_echo_n "checking for $ac_word... " >&6; }
55469if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
55470  $as_echo_n "(cached) " >&6
55471else
55472  if test -n "$LLVM_CONFIG"; then
55473  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
55474else
55475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
55476for as_dir in $PATH
55477do
55478  IFS=$as_save_IFS
55479  test -z "$as_dir" && as_dir=.
55480    for ac_exec_ext in '' $ac_executable_extensions; do
55481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
55482    ac_cv_prog_LLVM_CONFIG="llvm-config"
55483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
55484    break 2
55485  fi
55486done
55487  done
55488IFS=$as_save_IFS
55489
55490fi
55491fi
55492LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
55493if test -n "$LLVM_CONFIG"; then
55494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
55495$as_echo "$LLVM_CONFIG" >&6; }
55496else
55497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55498$as_echo "no" >&6; }
55499fi
55500
55501
55502
55503    if test "x$LLVM_CONFIG" != xllvm-config; then
55504      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
55505    fi
55506
55507    llvm_components="jit mcjit engine nativecodegen native"
55508    unset LLVM_CFLAGS
55509    for flag in $("$LLVM_CONFIG" --cxxflags); do
55510      if echo "${flag}" | grep -q '^-[ID]'; then
55511        if test "${flag}" != "-D_DEBUG" ; then
55512          if test "${LLVM_CFLAGS}" != "" ; then
55513            LLVM_CFLAGS="${LLVM_CFLAGS} "
55514          fi
55515          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
55516        fi
55517      fi
55518    done
55519    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
55520    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
55521
55522    unset LLVM_LDFLAGS
55523    for flag in $("${LLVM_CONFIG}" --ldflags); do
55524      if echo "${flag}" | grep -q '^-L'; then
55525        if test "${LLVM_LDFLAGS}" != ""; then
55526          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
55527        fi
55528        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
55529      fi
55530    done
55531
55532    unset LLVM_LIBS
55533    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
55534      if echo "${flag}" | grep -q '^-l'; then
55535        if test "${LLVM_LIBS}" != ""; then
55536          LLVM_LIBS="${LLVM_LIBS} "
55537        fi
55538        LLVM_LIBS="${LLVM_LIBS}${flag}"
55539      fi
55540    done
55541
55542
55543
55544
55545  fi
55546
55547
55548
55549# Check whether --with-libjpeg was given.
55550if test "${with_libjpeg+set}" = set; then :
55551  withval=$with_libjpeg;
55552fi
55553
55554
55555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
55556$as_echo_n "checking for which libjpeg to use... " >&6; }
55557  # default is bundled
55558  DEFAULT_LIBJPEG=bundled
55559  # if user didn't specify, use DEFAULT_LIBJPEG
55560  if test "x${with_libjpeg}" = "x"; then
55561    with_libjpeg=${DEFAULT_LIBJPEG}
55562  fi
55563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
55564$as_echo "${with_libjpeg}" >&6; }
55565
55566  if test "x${with_libjpeg}" = "xbundled"; then
55567    USE_EXTERNAL_LIBJPEG=false
55568  elif test "x${with_libjpeg}" = "xsystem"; then
55569    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
55570if test "x$ac_cv_header_jpeglib_h" = xyes; then :
55571
55572else
55573   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
55574fi
55575
55576
55577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
55578$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
55579if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
55580  $as_echo_n "(cached) " >&6
55581else
55582  ac_check_lib_save_LIBS=$LIBS
55583LIBS="-ljpeg  $LIBS"
55584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55585/* end confdefs.h.  */
55586
55587/* Override any GCC internal prototype to avoid an error.
55588   Use char because int might match the return type of a GCC
55589   builtin and then its argument prototype would still apply.  */
55590#ifdef __cplusplus
55591extern "C"
55592#endif
55593char jpeg_CreateDecompress ();
55594int
55595main ()
55596{
55597return jpeg_CreateDecompress ();
55598  ;
55599  return 0;
55600}
55601_ACEOF
55602if ac_fn_cxx_try_link "$LINENO"; then :
55603  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
55604else
55605  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
55606fi
55607rm -f core conftest.err conftest.$ac_objext \
55608    conftest$ac_exeext conftest.$ac_ext
55609LIBS=$ac_check_lib_save_LIBS
55610fi
55611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
55612$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
55613if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
55614  cat >>confdefs.h <<_ACEOF
55615#define HAVE_LIBJPEG 1
55616_ACEOF
55617
55618  LIBS="-ljpeg $LIBS"
55619
55620else
55621   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
55622fi
55623
55624
55625    USE_EXTERNAL_LIBJPEG=true
55626  else
55627    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
55628  fi
55629
55630
55631
55632
55633
55634# Check whether --with-giflib was given.
55635if test "${with_giflib+set}" = set; then :
55636  withval=$with_giflib;
55637fi
55638
55639
55640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
55641$as_echo_n "checking for which giflib to use... " >&6; }
55642  # default is bundled
55643  DEFAULT_GIFLIB=bundled
55644  # if user didn't specify, use DEFAULT_GIFLIB
55645  if test "x${with_giflib}" = "x"; then
55646    with_giflib=${DEFAULT_GIFLIB}
55647  fi
55648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
55649$as_echo "${with_giflib}" >&6; }
55650
55651  if test "x${with_giflib}" = "xbundled"; then
55652    USE_EXTERNAL_LIBGIF=false
55653  elif test "x${with_giflib}" = "xsystem"; then
55654    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
55655if test "x$ac_cv_header_gif_lib_h" = xyes; then :
55656
55657else
55658   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
55659fi
55660
55661
55662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
55663$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
55664if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
55665  $as_echo_n "(cached) " >&6
55666else
55667  ac_check_lib_save_LIBS=$LIBS
55668LIBS="-lgif  $LIBS"
55669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55670/* end confdefs.h.  */
55671
55672/* Override any GCC internal prototype to avoid an error.
55673   Use char because int might match the return type of a GCC
55674   builtin and then its argument prototype would still apply.  */
55675#ifdef __cplusplus
55676extern "C"
55677#endif
55678char DGifGetCode ();
55679int
55680main ()
55681{
55682return DGifGetCode ();
55683  ;
55684  return 0;
55685}
55686_ACEOF
55687if ac_fn_cxx_try_link "$LINENO"; then :
55688  ac_cv_lib_gif_DGifGetCode=yes
55689else
55690  ac_cv_lib_gif_DGifGetCode=no
55691fi
55692rm -f core conftest.err conftest.$ac_objext \
55693    conftest$ac_exeext conftest.$ac_ext
55694LIBS=$ac_check_lib_save_LIBS
55695fi
55696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
55697$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
55698if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
55699  cat >>confdefs.h <<_ACEOF
55700#define HAVE_LIBGIF 1
55701_ACEOF
55702
55703  LIBS="-lgif $LIBS"
55704
55705else
55706   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
55707fi
55708
55709
55710    USE_EXTERNAL_LIBGIF=true
55711  else
55712    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
55713  fi
55714
55715
55716
55717
55718
55719# Check whether --with-libpng was given.
55720if test "${with_libpng+set}" = set; then :
55721  withval=$with_libpng;
55722fi
55723
55724
55725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
55726$as_echo_n "checking for which libpng to use... " >&6; }
55727
55728  # default is bundled
55729  DEFAULT_LIBPNG=bundled
55730  # if user didn't specify, use DEFAULT_LIBPNG
55731  if test "x${with_libpng}" = "x"; then
55732      with_libpng=${DEFAULT_LIBPNG}
55733  fi
55734
55735  if test "x${with_libpng}" = "xbundled"; then
55736      USE_EXTERNAL_LIBPNG=false
55737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55738$as_echo "bundled" >&6; }
55739  elif test "x${with_libpng}" = "xsystem"; then
55740
55741pkg_failed=no
55742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
55743$as_echo_n "checking for PNG... " >&6; }
55744
55745if test -n "$PNG_CFLAGS"; then
55746    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
55747 elif test -n "$PKG_CONFIG"; then
55748    if test -n "$PKG_CONFIG" && \
55749    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55750  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55751  ac_status=$?
55752  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55753  test $ac_status = 0; }; then
55754  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
55755else
55756  pkg_failed=yes
55757fi
55758 else
55759    pkg_failed=untried
55760fi
55761if test -n "$PNG_LIBS"; then
55762    pkg_cv_PNG_LIBS="$PNG_LIBS"
55763 elif test -n "$PKG_CONFIG"; then
55764    if test -n "$PKG_CONFIG" && \
55765    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
55766  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
55767  ac_status=$?
55768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55769  test $ac_status = 0; }; then
55770  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
55771else
55772  pkg_failed=yes
55773fi
55774 else
55775    pkg_failed=untried
55776fi
55777
55778
55779
55780if test $pkg_failed = yes; then
55781
55782if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55783        _pkg_short_errors_supported=yes
55784else
55785        _pkg_short_errors_supported=no
55786fi
55787        if test $_pkg_short_errors_supported = yes; then
55788	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
55789        else
55790	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
55791        fi
55792	# Put the nasty error message in config.log where it belongs
55793	echo "$PNG_PKG_ERRORS" >&5
55794
55795	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55796$as_echo "no" >&6; }
55797                 LIBPNG_FOUND=no
55798elif test $pkg_failed = untried; then
55799	 LIBPNG_FOUND=no
55800else
55801	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
55802	PNG_LIBS=$pkg_cv_PNG_LIBS
55803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55804$as_echo "yes" >&6; }
55805	 LIBPNG_FOUND=yes
55806fi
55807      if test "x${LIBPNG_FOUND}" = "xyes"; then
55808          USE_EXTERNAL_LIBPNG=true
55809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55810$as_echo "system" >&6; }
55811      else
55812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55813$as_echo "system not found" >&6; }
55814          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
55815      fi
55816  else
55817      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
55818  fi
55819
55820
55821
55822
55823
55824# Check whether --with-zlib was given.
55825if test "${with_zlib+set}" = set; then :
55826  withval=$with_zlib;
55827fi
55828
55829
55830  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
55831$as_echo_n "checking for compress in -lz... " >&6; }
55832if ${ac_cv_lib_z_compress+:} false; then :
55833  $as_echo_n "(cached) " >&6
55834else
55835  ac_check_lib_save_LIBS=$LIBS
55836LIBS="-lz  $LIBS"
55837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55838/* end confdefs.h.  */
55839
55840/* Override any GCC internal prototype to avoid an error.
55841   Use char because int might match the return type of a GCC
55842   builtin and then its argument prototype would still apply.  */
55843#ifdef __cplusplus
55844extern "C"
55845#endif
55846char compress ();
55847int
55848main ()
55849{
55850return compress ();
55851  ;
55852  return 0;
55853}
55854_ACEOF
55855if ac_fn_cxx_try_link "$LINENO"; then :
55856  ac_cv_lib_z_compress=yes
55857else
55858  ac_cv_lib_z_compress=no
55859fi
55860rm -f core conftest.err conftest.$ac_objext \
55861    conftest$ac_exeext conftest.$ac_ext
55862LIBS=$ac_check_lib_save_LIBS
55863fi
55864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
55865$as_echo "$ac_cv_lib_z_compress" >&6; }
55866if test "x$ac_cv_lib_z_compress" = xyes; then :
55867   ZLIB_FOUND=yes
55868else
55869   ZLIB_FOUND=no
55870fi
55871
55872
55873  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
55874$as_echo_n "checking for which zlib to use... " >&6; }
55875
55876  DEFAULT_ZLIB=bundled
55877  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
55878    # On macosx default is system...on others default is bundled
55879    DEFAULT_ZLIB=system
55880  fi
55881
55882  if test "x${ZLIB_FOUND}" != "xyes"; then
55883    # If we don't find any system...set default to bundled
55884    DEFAULT_ZLIB=bundled
55885  fi
55886
55887  # If user didn't specify, use DEFAULT_ZLIB
55888  if test "x${with_zlib}" = "x"; then
55889    with_zlib=${DEFAULT_ZLIB}
55890  fi
55891
55892  if test "x${with_zlib}" = "xbundled"; then
55893    USE_EXTERNAL_LIBZ=false
55894    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55895$as_echo "bundled" >&6; }
55896  elif test "x${with_zlib}" = "xsystem"; then
55897    if test "x${ZLIB_FOUND}" = "xyes"; then
55898      USE_EXTERNAL_LIBZ=true
55899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55900$as_echo "system" >&6; }
55901    else
55902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
55903$as_echo "system not found" >&6; }
55904      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
55905    fi
55906  else
55907    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
55908  fi
55909
55910
55911
55912
55913
55914# Check whether --with-lcms was given.
55915if test "${with_lcms+set}" = set; then :
55916  withval=$with_lcms;
55917fi
55918
55919
55920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
55921$as_echo_n "checking for which lcms to use... " >&6; }
55922
55923  DEFAULT_LCMS=bundled
55924  # If user didn't specify, use DEFAULT_LCMS
55925  if test "x${with_lcms}" = "x"; then
55926      with_lcms=${DEFAULT_LCMS}
55927  fi
55928
55929  if test "x${with_lcms}" = "xbundled"; then
55930    USE_EXTERNAL_LCMS=false
55931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
55932$as_echo "bundled" >&6; }
55933  elif test "x${with_lcms}" = "xsystem"; then
55934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
55935$as_echo "system" >&6; }
55936
55937pkg_failed=no
55938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
55939$as_echo_n "checking for LCMS... " >&6; }
55940
55941if test -n "$LCMS_CFLAGS"; then
55942    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
55943 elif test -n "$PKG_CONFIG"; then
55944    if test -n "$PKG_CONFIG" && \
55945    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55946  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55947  ac_status=$?
55948  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55949  test $ac_status = 0; }; then
55950  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
55951else
55952  pkg_failed=yes
55953fi
55954 else
55955    pkg_failed=untried
55956fi
55957if test -n "$LCMS_LIBS"; then
55958    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
55959 elif test -n "$PKG_CONFIG"; then
55960    if test -n "$PKG_CONFIG" && \
55961    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
55962  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
55963  ac_status=$?
55964  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55965  test $ac_status = 0; }; then
55966  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
55967else
55968  pkg_failed=yes
55969fi
55970 else
55971    pkg_failed=untried
55972fi
55973
55974
55975
55976if test $pkg_failed = yes; then
55977
55978if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55979        _pkg_short_errors_supported=yes
55980else
55981        _pkg_short_errors_supported=no
55982fi
55983        if test $_pkg_short_errors_supported = yes; then
55984	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
55985        else
55986	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
55987        fi
55988	# Put the nasty error message in config.log where it belongs
55989	echo "$LCMS_PKG_ERRORS" >&5
55990
55991	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55992$as_echo "no" >&6; }
55993                LCMS_FOUND=no
55994elif test $pkg_failed = untried; then
55995	LCMS_FOUND=no
55996else
55997	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
55998	LCMS_LIBS=$pkg_cv_LCMS_LIBS
55999        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56000$as_echo "yes" >&6; }
56001	LCMS_FOUND=yes
56002fi
56003    if test "x${LCMS_FOUND}" = "xyes"; then
56004      USE_EXTERNAL_LCMS=true
56005    else
56006      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56007    fi
56008  else
56009    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56010  fi
56011
56012
56013
56014
56015
56016
56017
56018
56019
56020
56021
56022  # Setup libm (the maths library)
56023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56024$as_echo_n "checking for cos in -lm... " >&6; }
56025if ${ac_cv_lib_m_cos+:} false; then :
56026  $as_echo_n "(cached) " >&6
56027else
56028  ac_check_lib_save_LIBS=$LIBS
56029LIBS="-lm  $LIBS"
56030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56031/* end confdefs.h.  */
56032
56033/* Override any GCC internal prototype to avoid an error.
56034   Use char because int might match the return type of a GCC
56035   builtin and then its argument prototype would still apply.  */
56036#ifdef __cplusplus
56037extern "C"
56038#endif
56039char cos ();
56040int
56041main ()
56042{
56043return cos ();
56044  ;
56045  return 0;
56046}
56047_ACEOF
56048if ac_fn_cxx_try_link "$LINENO"; then :
56049  ac_cv_lib_m_cos=yes
56050else
56051  ac_cv_lib_m_cos=no
56052fi
56053rm -f core conftest.err conftest.$ac_objext \
56054    conftest$ac_exeext conftest.$ac_ext
56055LIBS=$ac_check_lib_save_LIBS
56056fi
56057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56058$as_echo "$ac_cv_lib_m_cos" >&6; }
56059if test "x$ac_cv_lib_m_cos" = xyes; then :
56060  cat >>confdefs.h <<_ACEOF
56061#define HAVE_LIBM 1
56062_ACEOF
56063
56064  LIBS="-lm $LIBS"
56065
56066else
56067
56068      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56069$as_echo "$as_me: Maths library was not found" >&6;}
56070
56071fi
56072
56073  LIBM=-lm
56074
56075
56076  # Setup libdl (for dynamic library loading)
56077  save_LIBS="$LIBS"
56078  LIBS=""
56079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56080$as_echo_n "checking for dlopen in -ldl... " >&6; }
56081if ${ac_cv_lib_dl_dlopen+:} false; then :
56082  $as_echo_n "(cached) " >&6
56083else
56084  ac_check_lib_save_LIBS=$LIBS
56085LIBS="-ldl  $LIBS"
56086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56087/* end confdefs.h.  */
56088
56089/* Override any GCC internal prototype to avoid an error.
56090   Use char because int might match the return type of a GCC
56091   builtin and then its argument prototype would still apply.  */
56092#ifdef __cplusplus
56093extern "C"
56094#endif
56095char dlopen ();
56096int
56097main ()
56098{
56099return dlopen ();
56100  ;
56101  return 0;
56102}
56103_ACEOF
56104if ac_fn_cxx_try_link "$LINENO"; then :
56105  ac_cv_lib_dl_dlopen=yes
56106else
56107  ac_cv_lib_dl_dlopen=no
56108fi
56109rm -f core conftest.err conftest.$ac_objext \
56110    conftest$ac_exeext conftest.$ac_ext
56111LIBS=$ac_check_lib_save_LIBS
56112fi
56113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56114$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56115if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56116  cat >>confdefs.h <<_ACEOF
56117#define HAVE_LIBDL 1
56118_ACEOF
56119
56120  LIBS="-ldl $LIBS"
56121
56122fi
56123
56124  LIBDL="$LIBS"
56125
56126  LIBS="$save_LIBS"
56127
56128  # Deprecated libraries, keep the flags for backwards compatibility
56129  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56130
56131
56132# Check whether --with-dxsdk was given.
56133if test "${with_dxsdk+set}" = set; then :
56134  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56135$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56136fi
56137
56138
56139
56140
56141# Check whether --with-dxsdk-lib was given.
56142if test "${with_dxsdk_lib+set}" = set; then :
56143  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56144$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56145fi
56146
56147
56148
56149
56150# Check whether --with-dxsdk-include was given.
56151if test "${with_dxsdk_include+set}" = set; then :
56152  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
56153$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
56154fi
56155
56156
56157  fi
56158
56159  # Control if libzip can use mmap. Available for purposes of overriding.
56160  LIBZIP_CAN_USE_MMAP=true
56161
56162
56163
56164
56165
56166
56167
56168
56169
56170
56171
56172
56173
56174
56175###############################################################################
56176#
56177# We need to do some final tweaking, when everything else is done.
56178#
56179###############################################################################
56180
56181
56182  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
56183
56184
56185  # The name of the Service Agent jar.
56186  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
56187  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56188    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
56189  fi
56190
56191
56192
56193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
56194$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
56195
56196    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
56197      ENABLE_INTREE_EC=yes
56198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56199$as_echo "yes" >&6; }
56200    else
56201      ENABLE_INTREE_EC=no
56202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56203$as_echo "no" >&6; }
56204    fi
56205
56206
56207
56208
56209###############################################################################
56210#
56211# Configure parts of the build that only affect the build performance,
56212# not the result.
56213#
56214###############################################################################
56215
56216
56217  # How many cores do we have on this build system?
56218
56219# Check whether --with-num-cores was given.
56220if test "${with_num_cores+set}" = set; then :
56221  withval=$with_num_cores;
56222fi
56223
56224  if test "x$with_num_cores" = x; then
56225    # The number of cores were not specified, try to probe them.
56226
56227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
56228$as_echo_n "checking for number of cores... " >&6; }
56229  NUM_CORES=1
56230  FOUND_CORES=no
56231
56232  if test -f /proc/cpuinfo; then
56233    # Looks like a Linux (or cygwin) system
56234    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
56235    FOUND_CORES=yes
56236  elif test -x /usr/sbin/psrinfo; then
56237    # Looks like a Solaris system
56238    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
56239    FOUND_CORES=yes
56240  elif test -x /usr/sbin/system_profiler; then
56241    # Looks like a MacOSX system
56242    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
56243    FOUND_CORES=yes
56244  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
56245    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
56246    FOUND_CORES=yes
56247  elif test -n "$NUMBER_OF_PROCESSORS"; then
56248    # On windows, look in the env
56249    NUM_CORES=$NUMBER_OF_PROCESSORS
56250    FOUND_CORES=yes
56251  fi
56252
56253  if test "x$FOUND_CORES" = xyes; then
56254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
56255$as_echo "$NUM_CORES" >&6; }
56256  else
56257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
56258$as_echo "could not detect number of cores, defaulting to 1" >&6; }
56259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
56260$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
56261  fi
56262
56263  else
56264    NUM_CORES=$with_num_cores
56265  fi
56266
56267
56268
56269  # How much memory do we have on this build system?
56270
56271# Check whether --with-memory-size was given.
56272if test "${with_memory_size+set}" = set; then :
56273  withval=$with_memory_size;
56274fi
56275
56276  if test "x$with_memory_size" = x; then
56277    # The memory size was not specified, try to probe it.
56278
56279  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
56280$as_echo_n "checking for memory size... " >&6; }
56281  # Default to 1024 MB
56282  MEMORY_SIZE=1024
56283  FOUND_MEM=no
56284
56285  if test -f /proc/meminfo; then
56286    # Looks like a Linux (or cygwin) system
56287    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
56288    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
56289    FOUND_MEM=yes
56290  elif test -x /usr/sbin/prtconf; then
56291    # Looks like a Solaris or AIX system
56292    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
56293    FOUND_MEM=yes
56294  elif test -x /usr/sbin/system_profiler; then
56295    # Looks like a MacOSX system
56296    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
56297    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
56298    FOUND_MEM=yes
56299  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
56300    # Windows, but without cygwin
56301    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
56302    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
56303    FOUND_MEM=yes
56304  fi
56305
56306  if test "x$FOUND_MEM" = xyes; then
56307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
56308$as_echo "$MEMORY_SIZE MB" >&6; }
56309  else
56310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
56311$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
56312    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
56313$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
56314  fi
56315
56316  else
56317    MEMORY_SIZE=$with_memory_size
56318  fi
56319
56320
56321
56322  # Provide a decent default number of parallel jobs for make depending on
56323  # number of cores, amount of memory and machine architecture.
56324
56325# Check whether --with-jobs was given.
56326if test "${with_jobs+set}" = set; then :
56327  withval=$with_jobs;
56328fi
56329
56330  if test "x$with_jobs" = x; then
56331    # Number of jobs was not specified, calculate.
56332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
56333$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
56334    # Approximate memory in GB.
56335    memory_gb=`expr $MEMORY_SIZE / 1024`
56336    # Pick the lowest of memory in gb and number of cores.
56337    if test "$memory_gb" -lt "$NUM_CORES"; then
56338      JOBS="$memory_gb"
56339    else
56340      JOBS="$NUM_CORES"
56341      # On bigger machines, leave some room for other processes to run
56342      if test "$JOBS" -gt "4"; then
56343        JOBS=`expr $JOBS '*' 90 / 100`
56344      fi
56345    fi
56346    # Cap number of jobs to 16
56347    if test "$JOBS" -gt "16"; then
56348      JOBS=16
56349    fi
56350    if test "$JOBS" -eq "0"; then
56351      JOBS=1
56352    fi
56353    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
56354$as_echo "$JOBS" >&6; }
56355  else
56356    JOBS=$with_jobs
56357  fi
56358
56359
56360
56361# Setup arguments for the boot jdk (after cores and memory have been setup)
56362
56363  ##############################################################################
56364  #
56365  # Specify jvm options for anything that is run with the Boot JDK.
56366  # Not all JVM:s accept the same arguments on the command line.
56367  #
56368
56369# Check whether --with-boot-jdk-jvmargs was given.
56370if test "${with_boot_jdk_jvmargs+set}" = set; then :
56371  withval=$with_boot_jdk_jvmargs;
56372fi
56373
56374
56375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
56376$as_echo_n "checking flags for boot jdk java command ... " >&6; }
56377
56378  # Disable special log output when a debug build is used as Boot JDK...
56379
56380  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
56381  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
56382  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
56383  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56384  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56385  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56386    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
56387    JVM_ARG_OK=true
56388  else
56389    $ECHO "Arg failed:" >&5
56390    $ECHO "$OUTPUT" >&5
56391    JVM_ARG_OK=false
56392  fi
56393
56394
56395  # Apply user provided options.
56396
56397  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
56398  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
56399  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
56400  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56401  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56402  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56403    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
56404    JVM_ARG_OK=true
56405  else
56406    $ECHO "Arg failed:" >&5
56407    $ECHO "$OUTPUT" >&5
56408    JVM_ARG_OK=false
56409  fi
56410
56411
56412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
56413$as_echo "$boot_jdk_jvmargs" >&6; }
56414
56415  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
56416  JAVA_FLAGS=$boot_jdk_jvmargs
56417
56418
56419
56420  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
56421$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
56422
56423  # Starting amount of heap memory.
56424
56425  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
56426  $ECHO "Command: $JAVA -Xms64M -version" >&5
56427  OUTPUT=`$JAVA -Xms64M -version 2>&1`
56428  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56429  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56430  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56431    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
56432    JVM_ARG_OK=true
56433  else
56434    $ECHO "Arg failed:" >&5
56435    $ECHO "$OUTPUT" >&5
56436    JVM_ARG_OK=false
56437  fi
56438
56439
56440  # Maximum amount of heap memory.
56441  # Maximum stack size.
56442  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
56443  if test "x$BOOT_JDK_BITS" = "x32"; then
56444    if test "$JVM_MAX_HEAP" -gt "1100"; then
56445      JVM_MAX_HEAP=1100
56446    elif test "$JVM_MAX_HEAP" -lt "512"; then
56447      JVM_MAX_HEAP=512
56448    fi
56449    STACK_SIZE=768
56450  else
56451    # Running a 64 bit JVM allows for and requires a bigger heap
56452    if test "$JVM_MAX_HEAP" -gt "1600"; then
56453      JVM_MAX_HEAP=1600
56454    elif test "$JVM_MAX_HEAP" -lt "512"; then
56455      JVM_MAX_HEAP=512
56456    fi
56457    STACK_SIZE=1536
56458  fi
56459
56460  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
56461  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
56462  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
56463  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56464  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56465  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56466    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
56467    JVM_ARG_OK=true
56468  else
56469    $ECHO "Arg failed:" >&5
56470    $ECHO "$OUTPUT" >&5
56471    JVM_ARG_OK=false
56472  fi
56473
56474
56475  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
56476  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
56477  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
56478  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56479  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56480  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56481    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
56482    JVM_ARG_OK=true
56483  else
56484    $ECHO "Arg failed:" >&5
56485    $ECHO "$OUTPUT" >&5
56486    JVM_ARG_OK=false
56487  fi
56488
56489
56490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
56491$as_echo "$boot_jdk_jvmargs_big" >&6; }
56492
56493  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
56494
56495
56496  # By default, the main javac compilations use big
56497  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
56498
56499
56500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
56501$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
56502
56503  # Use serial gc for small short lived tools if possible
56504
56505  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
56506  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
56507  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
56508  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56509  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56510  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56511    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
56512    JVM_ARG_OK=true
56513  else
56514    $ECHO "Arg failed:" >&5
56515    $ECHO "$OUTPUT" >&5
56516    JVM_ARG_OK=false
56517  fi
56518
56519
56520  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
56521  $ECHO "Command: $JAVA -Xms32M -version" >&5
56522  OUTPUT=`$JAVA -Xms32M -version 2>&1`
56523  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56524  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56525  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56526    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
56527    JVM_ARG_OK=true
56528  else
56529    $ECHO "Arg failed:" >&5
56530    $ECHO "$OUTPUT" >&5
56531    JVM_ARG_OK=false
56532  fi
56533
56534
56535  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
56536  $ECHO "Command: $JAVA -Xmx512M -version" >&5
56537  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
56538  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56539  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56540  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56541    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
56542    JVM_ARG_OK=true
56543  else
56544    $ECHO "Arg failed:" >&5
56545    $ECHO "$OUTPUT" >&5
56546    JVM_ARG_OK=false
56547  fi
56548
56549
56550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
56551$as_echo "$boot_jdk_jvmargs_small" >&6; }
56552
56553  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
56554
56555
56556  JAVA_TOOL_FLAGS_SMALL=""
56557  for f in $JAVA_FLAGS_SMALL; do
56558    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
56559  done
56560
56561
56562
56563# Setup smart javac (after cores and memory have been setup)
56564
56565
56566# Check whether --with-sjavac-server-java was given.
56567if test "${with_sjavac_server_java+set}" = set; then :
56568  withval=$with_sjavac_server_java;
56569fi
56570
56571
56572  if test "x$with_sjavac_server_java" != x; then
56573    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
56574    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
56575    if test "x$FOUND_VERSION" = x; then
56576      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
56577    fi
56578  else
56579    SJAVAC_SERVER_JAVA="$JAVA"
56580  fi
56581
56582
56583  if test "$MEMORY_SIZE" -gt "3000"; then
56584
56585  $ECHO "Check if jvm arg is ok: -d64" >&5
56586  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
56587  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
56588  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56589  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56590  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56591    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
56592    JVM_ARG_OK=true
56593  else
56594    $ECHO "Arg failed:" >&5
56595    $ECHO "$OUTPUT" >&5
56596    JVM_ARG_OK=false
56597  fi
56598
56599    if test "$JVM_ARG_OK" = true; then
56600      JVM_64BIT=true
56601      JVM_ARG_OK=false
56602    fi
56603  fi
56604
56605  MX_VALUE=`expr $MEMORY_SIZE / 2`
56606  if test "$JVM_64BIT" = true; then
56607    # Set ms lower than mx since more than one instance of the server might
56608    # get launched at the same time before they figure out which instance won.
56609    MS_VALUE=512
56610    if test "$MX_VALUE" -gt "2048"; then
56611      MX_VALUE=2048
56612    fi
56613  else
56614    MS_VALUE=256
56615    if test "$MX_VALUE" -gt "1500"; then
56616      MX_VALUE=1500
56617    fi
56618  fi
56619  if test "$MX_VALUE" -lt "512"; then
56620    MX_VALUE=512
56621  fi
56622
56623  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
56624  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
56625  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
56626  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
56627  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
56628  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
56629    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
56630    JVM_ARG_OK=true
56631  else
56632    $ECHO "Arg failed:" >&5
56633    $ECHO "$OUTPUT" >&5
56634    JVM_ARG_OK=false
56635  fi
56636
56637
56638
56639  # Check whether --enable-sjavac was given.
56640if test "${enable_sjavac+set}" = set; then :
56641  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
56642else
56643  ENABLE_SJAVAC="no"
56644fi
56645
56646  if test "x$JVM_ARG_OK" = "xfalse"; then
56647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
56648$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
56649    ENABLE_SJAVAC="no"
56650  fi
56651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
56652$as_echo_n "checking whether to use sjavac... " >&6; }
56653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
56654$as_echo "$ENABLE_SJAVAC" >&6; }
56655
56656
56657  # Check whether --enable-javac-server was given.
56658if test "${enable_javac_server+set}" = set; then :
56659  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
56660else
56661  ENABLE_JAVAC_SERVER="no"
56662fi
56663
56664  if test "x$JVM_ARG_OK" = "xfalse"; then
56665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
56666$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
56667    ENABLE_JAVAC_SERVER="no"
56668  fi
56669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
56670$as_echo_n "checking whether to use javac server... " >&6; }
56671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
56672$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
56673
56674
56675  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
56676    # When using a server javac, the small client instances do not need much
56677    # resources.
56678    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
56679  fi
56680
56681
56682# Setup use of icecc if requested
56683
56684  # Check whether --enable-icecc was given.
56685if test "${enable_icecc+set}" = set; then :
56686  enableval=$enable_icecc;
56687fi
56688
56689
56690  if test "x${enable_icecc}" = "xyes"; then
56691
56692
56693
56694  # Publish this variable in the help.
56695
56696
56697  if [ -z "${ICECC_CMD+x}" ]; then
56698    # The variable is not set by user, try to locate tool using the code snippet
56699    for ac_prog in icecc
56700do
56701  # Extract the first word of "$ac_prog", so it can be a program name with args.
56702set dummy $ac_prog; ac_word=$2
56703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56704$as_echo_n "checking for $ac_word... " >&6; }
56705if ${ac_cv_path_ICECC_CMD+:} false; then :
56706  $as_echo_n "(cached) " >&6
56707else
56708  case $ICECC_CMD in
56709  [\\/]* | ?:[\\/]*)
56710  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56711  ;;
56712  *)
56713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56714for as_dir in $PATH
56715do
56716  IFS=$as_save_IFS
56717  test -z "$as_dir" && as_dir=.
56718    for ac_exec_ext in '' $ac_executable_extensions; do
56719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56720    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56722    break 2
56723  fi
56724done
56725  done
56726IFS=$as_save_IFS
56727
56728  ;;
56729esac
56730fi
56731ICECC_CMD=$ac_cv_path_ICECC_CMD
56732if test -n "$ICECC_CMD"; then
56733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56734$as_echo "$ICECC_CMD" >&6; }
56735else
56736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56737$as_echo "no" >&6; }
56738fi
56739
56740
56741  test -n "$ICECC_CMD" && break
56742done
56743
56744  else
56745    # The variable is set, but is it from the command line or the environment?
56746
56747    # Try to remove the string !ICECC_CMD! from our list.
56748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
56749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56750      # If it failed, the variable was not from the command line. Ignore it,
56751      # but warn the user (except for BASH, which is always set by the calling BASH).
56752      if test "xICECC_CMD" != xBASH; then
56753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
56754$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
56755      fi
56756      # Try to locate tool using the code snippet
56757      for ac_prog in icecc
56758do
56759  # Extract the first word of "$ac_prog", so it can be a program name with args.
56760set dummy $ac_prog; ac_word=$2
56761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56762$as_echo_n "checking for $ac_word... " >&6; }
56763if ${ac_cv_path_ICECC_CMD+:} false; then :
56764  $as_echo_n "(cached) " >&6
56765else
56766  case $ICECC_CMD in
56767  [\\/]* | ?:[\\/]*)
56768  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56769  ;;
56770  *)
56771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56772for as_dir in $PATH
56773do
56774  IFS=$as_save_IFS
56775  test -z "$as_dir" && as_dir=.
56776    for ac_exec_ext in '' $ac_executable_extensions; do
56777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56778    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56780    break 2
56781  fi
56782done
56783  done
56784IFS=$as_save_IFS
56785
56786  ;;
56787esac
56788fi
56789ICECC_CMD=$ac_cv_path_ICECC_CMD
56790if test -n "$ICECC_CMD"; then
56791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56792$as_echo "$ICECC_CMD" >&6; }
56793else
56794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56795$as_echo "no" >&6; }
56796fi
56797
56798
56799  test -n "$ICECC_CMD" && break
56800done
56801
56802    else
56803      # If it succeeded, then it was overridden by the user. We will use it
56804      # for the tool.
56805
56806      # First remove it from the list of overridden variables, so we can test
56807      # for unknown variables in the end.
56808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
56809
56810      # Check if we try to supply an empty value
56811      if test "x$ICECC_CMD" = x; then
56812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
56813$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
56814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56815$as_echo_n "checking for ICECC_CMD... " >&6; }
56816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
56817$as_echo "disabled" >&6; }
56818      else
56819        # Check if the provided tool contains a complete path.
56820        tool_specified="$ICECC_CMD"
56821        tool_basename="${tool_specified##*/}"
56822        if test "x$tool_basename" = "x$tool_specified"; then
56823          # A command without a complete path is provided, search $PATH.
56824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
56825$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
56826          # Extract the first word of "$tool_basename", so it can be a program name with args.
56827set dummy $tool_basename; ac_word=$2
56828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56829$as_echo_n "checking for $ac_word... " >&6; }
56830if ${ac_cv_path_ICECC_CMD+:} false; then :
56831  $as_echo_n "(cached) " >&6
56832else
56833  case $ICECC_CMD in
56834  [\\/]* | ?:[\\/]*)
56835  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
56836  ;;
56837  *)
56838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56839for as_dir in $PATH
56840do
56841  IFS=$as_save_IFS
56842  test -z "$as_dir" && as_dir=.
56843    for ac_exec_ext in '' $ac_executable_extensions; do
56844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56845    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
56846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56847    break 2
56848  fi
56849done
56850  done
56851IFS=$as_save_IFS
56852
56853  ;;
56854esac
56855fi
56856ICECC_CMD=$ac_cv_path_ICECC_CMD
56857if test -n "$ICECC_CMD"; then
56858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
56859$as_echo "$ICECC_CMD" >&6; }
56860else
56861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56862$as_echo "no" >&6; }
56863fi
56864
56865
56866          if test "x$ICECC_CMD" = x; then
56867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
56868          fi
56869        else
56870          # Otherwise we believe it is a complete path. Use it as it is.
56871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
56872$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
56873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
56874$as_echo_n "checking for ICECC_CMD... " >&6; }
56875          if test ! -x "$tool_specified"; then
56876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
56877$as_echo "not found" >&6; }
56878            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
56879          fi
56880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
56881$as_echo "$tool_specified" >&6; }
56882        fi
56883      fi
56884    fi
56885
56886  fi
56887
56888
56889
56890  if test "x$ICECC_CMD" = x; then
56891    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
56892  fi
56893
56894
56895    old_path="$PATH"
56896
56897    # Look for icecc-create-env in some known places
56898    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
56899
56900
56901
56902  # Publish this variable in the help.
56903
56904
56905  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
56906    # The variable is not set by user, try to locate tool using the code snippet
56907    for ac_prog in icecc-create-env
56908do
56909  # Extract the first word of "$ac_prog", so it can be a program name with args.
56910set dummy $ac_prog; ac_word=$2
56911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56912$as_echo_n "checking for $ac_word... " >&6; }
56913if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56914  $as_echo_n "(cached) " >&6
56915else
56916  case $ICECC_CREATE_ENV in
56917  [\\/]* | ?:[\\/]*)
56918  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56919  ;;
56920  *)
56921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56922for as_dir in $PATH
56923do
56924  IFS=$as_save_IFS
56925  test -z "$as_dir" && as_dir=.
56926    for ac_exec_ext in '' $ac_executable_extensions; do
56927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56928    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56930    break 2
56931  fi
56932done
56933  done
56934IFS=$as_save_IFS
56935
56936  ;;
56937esac
56938fi
56939ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
56940if test -n "$ICECC_CREATE_ENV"; then
56941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
56942$as_echo "$ICECC_CREATE_ENV" >&6; }
56943else
56944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56945$as_echo "no" >&6; }
56946fi
56947
56948
56949  test -n "$ICECC_CREATE_ENV" && break
56950done
56951
56952  else
56953    # The variable is set, but is it from the command line or the environment?
56954
56955    # Try to remove the string !ICECC_CREATE_ENV! from our list.
56956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
56957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
56958      # If it failed, the variable was not from the command line. Ignore it,
56959      # but warn the user (except for BASH, which is always set by the calling BASH).
56960      if test "xICECC_CREATE_ENV" != xBASH; then
56961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
56962$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
56963      fi
56964      # Try to locate tool using the code snippet
56965      for ac_prog in icecc-create-env
56966do
56967  # Extract the first word of "$ac_prog", so it can be a program name with args.
56968set dummy $ac_prog; ac_word=$2
56969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56970$as_echo_n "checking for $ac_word... " >&6; }
56971if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
56972  $as_echo_n "(cached) " >&6
56973else
56974  case $ICECC_CREATE_ENV in
56975  [\\/]* | ?:[\\/]*)
56976  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
56977  ;;
56978  *)
56979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56980for as_dir in $PATH
56981do
56982  IFS=$as_save_IFS
56983  test -z "$as_dir" && as_dir=.
56984    for ac_exec_ext in '' $ac_executable_extensions; do
56985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56986    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
56987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56988    break 2
56989  fi
56990done
56991  done
56992IFS=$as_save_IFS
56993
56994  ;;
56995esac
56996fi
56997ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
56998if test -n "$ICECC_CREATE_ENV"; then
56999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57000$as_echo "$ICECC_CREATE_ENV" >&6; }
57001else
57002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57003$as_echo "no" >&6; }
57004fi
57005
57006
57007  test -n "$ICECC_CREATE_ENV" && break
57008done
57009
57010    else
57011      # If it succeeded, then it was overridden by the user. We will use it
57012      # for the tool.
57013
57014      # First remove it from the list of overridden variables, so we can test
57015      # for unknown variables in the end.
57016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57017
57018      # Check if we try to supply an empty value
57019      if test "x$ICECC_CREATE_ENV" = x; then
57020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57021$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57023$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57025$as_echo "disabled" >&6; }
57026      else
57027        # Check if the provided tool contains a complete path.
57028        tool_specified="$ICECC_CREATE_ENV"
57029        tool_basename="${tool_specified##*/}"
57030        if test "x$tool_basename" = "x$tool_specified"; then
57031          # A command without a complete path is provided, search $PATH.
57032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57033$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57034          # Extract the first word of "$tool_basename", so it can be a program name with args.
57035set dummy $tool_basename; ac_word=$2
57036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57037$as_echo_n "checking for $ac_word... " >&6; }
57038if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57039  $as_echo_n "(cached) " >&6
57040else
57041  case $ICECC_CREATE_ENV in
57042  [\\/]* | ?:[\\/]*)
57043  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57044  ;;
57045  *)
57046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57047for as_dir in $PATH
57048do
57049  IFS=$as_save_IFS
57050  test -z "$as_dir" && as_dir=.
57051    for ac_exec_ext in '' $ac_executable_extensions; do
57052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57053    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57055    break 2
57056  fi
57057done
57058  done
57059IFS=$as_save_IFS
57060
57061  ;;
57062esac
57063fi
57064ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57065if test -n "$ICECC_CREATE_ENV"; then
57066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57067$as_echo "$ICECC_CREATE_ENV" >&6; }
57068else
57069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57070$as_echo "no" >&6; }
57071fi
57072
57073
57074          if test "x$ICECC_CREATE_ENV" = x; then
57075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57076          fi
57077        else
57078          # Otherwise we believe it is a complete path. Use it as it is.
57079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57080$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57082$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57083          if test ! -x "$tool_specified"; then
57084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57085$as_echo "not found" >&6; }
57086            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57087          fi
57088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57089$as_echo "$tool_specified" >&6; }
57090        fi
57091      fi
57092    fi
57093
57094  fi
57095
57096
57097
57098  if test "x$ICECC_CREATE_ENV" = x; then
57099    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57100  fi
57101
57102
57103    # Use icecc-create-env to create a minimal compilation environment that can
57104    # be sent to the other hosts in the icecream cluster.
57105    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57106    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57108$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57109    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57110      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57111          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57112    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57113      # For clang, the icecc compilerwrapper is needed. It usually resides next
57114      # to icecc-create-env.
57115
57116
57117
57118  # Publish this variable in the help.
57119
57120
57121  if [ -z "${ICECC_WRAPPER+x}" ]; then
57122    # The variable is not set by user, try to locate tool using the code snippet
57123    for ac_prog in compilerwrapper
57124do
57125  # Extract the first word of "$ac_prog", so it can be a program name with args.
57126set dummy $ac_prog; ac_word=$2
57127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57128$as_echo_n "checking for $ac_word... " >&6; }
57129if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57130  $as_echo_n "(cached) " >&6
57131else
57132  case $ICECC_WRAPPER in
57133  [\\/]* | ?:[\\/]*)
57134  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57135  ;;
57136  *)
57137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57138for as_dir in $PATH
57139do
57140  IFS=$as_save_IFS
57141  test -z "$as_dir" && as_dir=.
57142    for ac_exec_ext in '' $ac_executable_extensions; do
57143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57144    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57146    break 2
57147  fi
57148done
57149  done
57150IFS=$as_save_IFS
57151
57152  ;;
57153esac
57154fi
57155ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57156if test -n "$ICECC_WRAPPER"; then
57157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57158$as_echo "$ICECC_WRAPPER" >&6; }
57159else
57160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57161$as_echo "no" >&6; }
57162fi
57163
57164
57165  test -n "$ICECC_WRAPPER" && break
57166done
57167
57168  else
57169    # The variable is set, but is it from the command line or the environment?
57170
57171    # Try to remove the string !ICECC_WRAPPER! from our list.
57172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
57173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57174      # If it failed, the variable was not from the command line. Ignore it,
57175      # but warn the user (except for BASH, which is always set by the calling BASH).
57176      if test "xICECC_WRAPPER" != xBASH; then
57177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
57178$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
57179      fi
57180      # Try to locate tool using the code snippet
57181      for ac_prog in compilerwrapper
57182do
57183  # Extract the first word of "$ac_prog", so it can be a program name with args.
57184set dummy $ac_prog; ac_word=$2
57185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57186$as_echo_n "checking for $ac_word... " >&6; }
57187if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57188  $as_echo_n "(cached) " >&6
57189else
57190  case $ICECC_WRAPPER in
57191  [\\/]* | ?:[\\/]*)
57192  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57193  ;;
57194  *)
57195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57196for as_dir in $PATH
57197do
57198  IFS=$as_save_IFS
57199  test -z "$as_dir" && as_dir=.
57200    for ac_exec_ext in '' $ac_executable_extensions; do
57201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57202    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57204    break 2
57205  fi
57206done
57207  done
57208IFS=$as_save_IFS
57209
57210  ;;
57211esac
57212fi
57213ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57214if test -n "$ICECC_WRAPPER"; then
57215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57216$as_echo "$ICECC_WRAPPER" >&6; }
57217else
57218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57219$as_echo "no" >&6; }
57220fi
57221
57222
57223  test -n "$ICECC_WRAPPER" && break
57224done
57225
57226    else
57227      # If it succeeded, then it was overridden by the user. We will use it
57228      # for the tool.
57229
57230      # First remove it from the list of overridden variables, so we can test
57231      # for unknown variables in the end.
57232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57233
57234      # Check if we try to supply an empty value
57235      if test "x$ICECC_WRAPPER" = x; then
57236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
57237$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
57238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57239$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57241$as_echo "disabled" >&6; }
57242      else
57243        # Check if the provided tool contains a complete path.
57244        tool_specified="$ICECC_WRAPPER"
57245        tool_basename="${tool_specified##*/}"
57246        if test "x$tool_basename" = "x$tool_specified"; then
57247          # A command without a complete path is provided, search $PATH.
57248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
57249$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
57250          # Extract the first word of "$tool_basename", so it can be a program name with args.
57251set dummy $tool_basename; ac_word=$2
57252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57253$as_echo_n "checking for $ac_word... " >&6; }
57254if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57255  $as_echo_n "(cached) " >&6
57256else
57257  case $ICECC_WRAPPER in
57258  [\\/]* | ?:[\\/]*)
57259  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57260  ;;
57261  *)
57262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57263for as_dir in $PATH
57264do
57265  IFS=$as_save_IFS
57266  test -z "$as_dir" && as_dir=.
57267    for ac_exec_ext in '' $ac_executable_extensions; do
57268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57269    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57271    break 2
57272  fi
57273done
57274  done
57275IFS=$as_save_IFS
57276
57277  ;;
57278esac
57279fi
57280ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57281if test -n "$ICECC_WRAPPER"; then
57282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57283$as_echo "$ICECC_WRAPPER" >&6; }
57284else
57285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57286$as_echo "no" >&6; }
57287fi
57288
57289
57290          if test "x$ICECC_WRAPPER" = x; then
57291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57292          fi
57293        else
57294          # Otherwise we believe it is a complete path. Use it as it is.
57295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
57296$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
57297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
57298$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
57299          if test ! -x "$tool_specified"; then
57300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57301$as_echo "not found" >&6; }
57302            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
57303          fi
57304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57305$as_echo "$tool_specified" >&6; }
57306        fi
57307      fi
57308    fi
57309
57310  fi
57311
57312
57313
57314  if test "x$ICECC_WRAPPER" = x; then
57315    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
57316  fi
57317
57318
57319      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57320          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57321    else
57322      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
57323    fi
57324    PATH="$old_path"
57325    # The bundle with the compiler gets a name based on checksums. Parse log file
57326    # to find it.
57327    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57328    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57330$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57331    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
57332
57333    if test "x${COMPILE_TYPE}" = "xcross"; then
57334      # If cross compiling, create a separate env package for the build compiler
57335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
57336$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
57337      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
57338      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
57339        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57340            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
57341      elif test "x${BUILD_CC##*/}" = "xclang"; then
57342        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57343            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
57344      else
57345        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
57346      fi
57347      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
57348      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
57349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
57350$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
57351      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
57352          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
57353    else
57354      BUILD_ICECC="${ICECC}"
57355    fi
57356
57357
57358  fi
57359
57360
57361# Can the C/C++ compiler use precompiled headers?
57362
57363
57364  ###############################################################################
57365  #
57366  # Can the C/C++ compiler use precompiled headers?
57367  #
57368  # Check whether --enable-precompiled-headers was given.
57369if test "${enable_precompiled_headers+set}" = set; then :
57370  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
57371else
57372  ENABLE_PRECOMPH=yes
57373fi
57374
57375
57376  USE_PRECOMPILED_HEADER=1
57377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
57378$as_echo_n "checking If precompiled header is enabled... " >&6; }
57379  if test "x$ENABLE_PRECOMPH" = xno; then
57380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
57381$as_echo "no, forced" >&6; }
57382    USE_PRECOMPILED_HEADER=0
57383  elif test "x$ICECC" != "x"; then
57384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
57385$as_echo "no, does not work effectively with icecc" >&6; }
57386    USE_PRECOMPILED_HEADER=0
57387  else
57388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57389$as_echo "yes" >&6; }
57390  fi
57391
57392  if test "x$ENABLE_PRECOMPH" = xyes; then
57393    # Check that the compiler actually supports precomp headers.
57394    if test "x$TOOLCHAIN_TYPE" = xgcc; then
57395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
57396$as_echo_n "checking that precompiled headers work... " >&6; }
57397      echo "int alfa();" > conftest.h
57398      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
57399      if test ! -f conftest.hpp.gch; then
57400        USE_PRECOMPILED_HEADER=0
57401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57402$as_echo "no" >&6; }
57403      else
57404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57405$as_echo "yes" >&6; }
57406      fi
57407      rm -f conftest.h conftest.hpp.gch
57408    fi
57409  fi
57410
57411
57412
57413
57414# Setup use of ccache, if available
57415
57416  # Check whether --enable-ccache was given.
57417if test "${enable_ccache+set}" = set; then :
57418  enableval=$enable_ccache;
57419fi
57420
57421
57422  CCACHE=
57423  CCACHE_STATUS=
57424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
57425$as_echo_n "checking is ccache enabled... " >&6; }
57426  if test "x$enable_ccache" = xyes; then
57427    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
57428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57429$as_echo "yes" >&6; }
57430      OLD_PATH="$PATH"
57431      if test "x$TOOLCHAIN_PATH" != x; then
57432        PATH=$TOOLCHAIN_PATH:$PATH
57433      fi
57434
57435
57436
57437  # Publish this variable in the help.
57438
57439
57440  if [ -z "${CCACHE+x}" ]; then
57441    # The variable is not set by user, try to locate tool using the code snippet
57442    for ac_prog in ccache
57443do
57444  # Extract the first word of "$ac_prog", so it can be a program name with args.
57445set dummy $ac_prog; ac_word=$2
57446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57447$as_echo_n "checking for $ac_word... " >&6; }
57448if ${ac_cv_path_CCACHE+:} false; then :
57449  $as_echo_n "(cached) " >&6
57450else
57451  case $CCACHE in
57452  [\\/]* | ?:[\\/]*)
57453  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57454  ;;
57455  *)
57456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57457for as_dir in $PATH
57458do
57459  IFS=$as_save_IFS
57460  test -z "$as_dir" && as_dir=.
57461    for ac_exec_ext in '' $ac_executable_extensions; do
57462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57463    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57465    break 2
57466  fi
57467done
57468  done
57469IFS=$as_save_IFS
57470
57471  ;;
57472esac
57473fi
57474CCACHE=$ac_cv_path_CCACHE
57475if test -n "$CCACHE"; then
57476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57477$as_echo "$CCACHE" >&6; }
57478else
57479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57480$as_echo "no" >&6; }
57481fi
57482
57483
57484  test -n "$CCACHE" && break
57485done
57486
57487  else
57488    # The variable is set, but is it from the command line or the environment?
57489
57490    # Try to remove the string !CCACHE! from our list.
57491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
57492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57493      # If it failed, the variable was not from the command line. Ignore it,
57494      # but warn the user (except for BASH, which is always set by the calling BASH).
57495      if test "xCCACHE" != xBASH; then
57496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
57497$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
57498      fi
57499      # Try to locate tool using the code snippet
57500      for ac_prog in ccache
57501do
57502  # Extract the first word of "$ac_prog", so it can be a program name with args.
57503set dummy $ac_prog; ac_word=$2
57504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57505$as_echo_n "checking for $ac_word... " >&6; }
57506if ${ac_cv_path_CCACHE+:} false; then :
57507  $as_echo_n "(cached) " >&6
57508else
57509  case $CCACHE in
57510  [\\/]* | ?:[\\/]*)
57511  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57512  ;;
57513  *)
57514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57515for as_dir in $PATH
57516do
57517  IFS=$as_save_IFS
57518  test -z "$as_dir" && as_dir=.
57519    for ac_exec_ext in '' $ac_executable_extensions; do
57520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57521    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57523    break 2
57524  fi
57525done
57526  done
57527IFS=$as_save_IFS
57528
57529  ;;
57530esac
57531fi
57532CCACHE=$ac_cv_path_CCACHE
57533if test -n "$CCACHE"; then
57534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57535$as_echo "$CCACHE" >&6; }
57536else
57537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57538$as_echo "no" >&6; }
57539fi
57540
57541
57542  test -n "$CCACHE" && break
57543done
57544
57545    else
57546      # If it succeeded, then it was overridden by the user. We will use it
57547      # for the tool.
57548
57549      # First remove it from the list of overridden variables, so we can test
57550      # for unknown variables in the end.
57551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57552
57553      # Check if we try to supply an empty value
57554      if test "x$CCACHE" = x; then
57555        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
57556$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
57557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57558$as_echo_n "checking for CCACHE... " >&6; }
57559        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57560$as_echo "disabled" >&6; }
57561      else
57562        # Check if the provided tool contains a complete path.
57563        tool_specified="$CCACHE"
57564        tool_basename="${tool_specified##*/}"
57565        if test "x$tool_basename" = "x$tool_specified"; then
57566          # A command without a complete path is provided, search $PATH.
57567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
57568$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
57569          # Extract the first word of "$tool_basename", so it can be a program name with args.
57570set dummy $tool_basename; ac_word=$2
57571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57572$as_echo_n "checking for $ac_word... " >&6; }
57573if ${ac_cv_path_CCACHE+:} false; then :
57574  $as_echo_n "(cached) " >&6
57575else
57576  case $CCACHE in
57577  [\\/]* | ?:[\\/]*)
57578  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
57579  ;;
57580  *)
57581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57582for as_dir in $PATH
57583do
57584  IFS=$as_save_IFS
57585  test -z "$as_dir" && as_dir=.
57586    for ac_exec_ext in '' $ac_executable_extensions; do
57587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57588    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
57589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57590    break 2
57591  fi
57592done
57593  done
57594IFS=$as_save_IFS
57595
57596  ;;
57597esac
57598fi
57599CCACHE=$ac_cv_path_CCACHE
57600if test -n "$CCACHE"; then
57601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
57602$as_echo "$CCACHE" >&6; }
57603else
57604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57605$as_echo "no" >&6; }
57606fi
57607
57608
57609          if test "x$CCACHE" = x; then
57610            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57611          fi
57612        else
57613          # Otherwise we believe it is a complete path. Use it as it is.
57614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
57615$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
57616          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
57617$as_echo_n "checking for CCACHE... " >&6; }
57618          if test ! -x "$tool_specified"; then
57619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57620$as_echo "not found" >&6; }
57621            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
57622          fi
57623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57624$as_echo "$tool_specified" >&6; }
57625        fi
57626      fi
57627    fi
57628
57629  fi
57630
57631
57632
57633  if test "x$CCACHE" = x; then
57634    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
57635  fi
57636
57637
57638      PATH="$OLD_PATH"
57639      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
57640      CCACHE_STATUS="Active ($CCACHE_VERSION)"
57641    else
57642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57643$as_echo "no" >&6; }
57644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
57645$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
57646    fi
57647  elif test "x$enable_ccache" = xno; then
57648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
57649$as_echo "no, explicitly disabled" >&6; }
57650    CCACHE_STATUS="Disabled"
57651  elif test "x$enable_ccache" = x; then
57652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57653$as_echo "no" >&6; }
57654  else
57655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
57656$as_echo "unknown" >&6; }
57657    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
57658  fi
57659
57660
57661
57662# Check whether --with-ccache-dir was given.
57663if test "${with_ccache_dir+set}" = set; then :
57664  withval=$with_ccache_dir;
57665fi
57666
57667
57668  if test "x$with_ccache_dir" != x; then
57669    # When using a non home ccache directory, assume the use is to share ccache files
57670    # with other users. Thus change the umask.
57671    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
57672    if test "x$CCACHE" = x; then
57673      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
57674$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
57675    fi
57676  fi
57677
57678  if test "x$CCACHE" != x; then
57679
57680  if test "x$CCACHE" != x; then
57681    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
57682      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
57683          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
57684      if test "x$HAS_BAD_CCACHE" != "x"; then
57685        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
57686      fi
57687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
57688$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
57689      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
57690      PUSHED_FLAGS="$CXXFLAGS"
57691      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
57692      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57693/* end confdefs.h.  */
57694
57695int
57696main ()
57697{
57698
57699  ;
57700  return 0;
57701}
57702_ACEOF
57703if ac_fn_cxx_try_compile "$LINENO"; then :
57704  CC_KNOWS_CCACHE_TRICK=yes
57705else
57706  CC_KNOWS_CCACHE_TRICK=no
57707fi
57708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57709      CXXFLAGS="$PUSHED_FLAGS"
57710      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
57711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57712$as_echo "yes" >&6; }
57713        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
57714
57715        CCACHE_SLOPPINESS=pch_defines,time_macros
57716      else
57717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57718$as_echo "no" >&6; }
57719        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
57720      fi
57721    fi
57722
57723    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
57724        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
57725
57726    if test "x$SET_CCACHE_DIR" != x; then
57727      mkdir -p $CCACHE_DIR > /dev/null 2>&1
57728      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
57729    fi
57730  fi
57731
57732  fi
57733
57734
57735###############################################################################
57736#
57737# And now the finish...
57738#
57739###############################################################################
57740
57741# Check for some common pitfalls
57742
57743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57744    file_to_test="$SRC_ROOT/LICENSE"
57745    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
57746      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
57747    fi
57748  fi
57749
57750
57751  # Did user specify any unknown variables?
57752
57753  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
57754    # Replace the separating ! with spaces before presenting for end user.
57755    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
57756    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
57757$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
57758  fi
57759
57760
57761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
57762$as_echo_n "checking if build directory is on local disk... " >&6; }
57763
57764  # df -l lists only local disks; if the given directory is not found then
57765  # a non-zero exit code is given
57766  if test "x$DF" = x; then
57767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57768      # msys does not have df; use Windows "net use" instead.
57769      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
57770      if test "x$IS_NETWORK_DISK" = x; then
57771        OUTPUT_DIR_IS_LOCAL="yes"
57772      else
57773        OUTPUT_DIR_IS_LOCAL="no"
57774      fi
57775    else
57776      # No df here, say it's local
57777      OUTPUT_DIR_IS_LOCAL="yes"
57778    fi
57779  else
57780    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
57781      OUTPUT_DIR_IS_LOCAL="yes"
57782    else
57783      OUTPUT_DIR_IS_LOCAL="no"
57784    fi
57785  fi
57786
57787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
57788$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
57789
57790
57791
57792  # Check if the user has any old-style ALT_ variables set.
57793  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
57794
57795  # Before generating output files, test if they exist. If they do, this is a reconfigure.
57796  # Since we can't properly handle the dependencies for this, warn the user about the situation
57797  if test -e $OUTPUT_ROOT/spec.gmk; then
57798    IS_RECONFIGURE=yes
57799  else
57800    IS_RECONFIGURE=no
57801  fi
57802
57803
57804# At the end, call the custom hook. (Dummy macro if no custom sources available)
57805
57806
57807# We're messing a bit with internal autoconf variables to put the config.status
57808# in the output directory instead of the current directory.
57809CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
57810
57811# Create the actual output files. Now the main work of configure is done.
57812cat >confcache <<\_ACEOF
57813# This file is a shell script that caches the results of configure
57814# tests run on this system so they can be shared between configure
57815# scripts and configure runs, see configure's option --config-cache.
57816# It is not useful on other systems.  If it contains results you don't
57817# want to keep, you may remove or edit it.
57818#
57819# config.status only pays attention to the cache file if you give it
57820# the --recheck option to rerun configure.
57821#
57822# `ac_cv_env_foo' variables (set or unset) will be overridden when
57823# loading this file, other *unset* `ac_cv_foo' will be assigned the
57824# following values.
57825
57826_ACEOF
57827
57828# The following way of writing the cache mishandles newlines in values,
57829# but we know of no workaround that is simple, portable, and efficient.
57830# So, we kill variables containing newlines.
57831# Ultrix sh set writes to stderr and can't be redirected directly,
57832# and sets the high bit in the cache file unless we assign to the vars.
57833(
57834  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
57835    eval ac_val=\$$ac_var
57836    case $ac_val in #(
57837    *${as_nl}*)
57838      case $ac_var in #(
57839      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
57840$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
57841      esac
57842      case $ac_var in #(
57843      _ | IFS | as_nl) ;; #(
57844      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
57845      *) { eval $ac_var=; unset $ac_var;} ;;
57846      esac ;;
57847    esac
57848  done
57849
57850  (set) 2>&1 |
57851    case $as_nl`(ac_space=' '; set) 2>&1` in #(
57852    *${as_nl}ac_space=\ *)
57853      # `set' does not quote correctly, so add quotes: double-quote
57854      # substitution turns \\\\ into \\, and sed turns \\ into \.
57855      sed -n \
57856	"s/'/'\\\\''/g;
57857	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
57858      ;; #(
57859    *)
57860      # `set' quotes correctly as required by POSIX, so do not add quotes.
57861      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
57862      ;;
57863    esac |
57864    sort
57865) |
57866  sed '
57867     /^ac_cv_env_/b end
57868     t clear
57869     :clear
57870     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
57871     t end
57872     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
57873     :end' >>confcache
57874if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
57875  if test -w "$cache_file"; then
57876    if test "x$cache_file" != "x/dev/null"; then
57877      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
57878$as_echo "$as_me: updating cache $cache_file" >&6;}
57879      if test ! -f "$cache_file" || test -h "$cache_file"; then
57880	cat confcache >"$cache_file"
57881      else
57882        case $cache_file in #(
57883        */* | ?:*)
57884	  mv -f confcache "$cache_file"$$ &&
57885	  mv -f "$cache_file"$$ "$cache_file" ;; #(
57886        *)
57887	  mv -f confcache "$cache_file" ;;
57888	esac
57889      fi
57890    fi
57891  else
57892    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
57893$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
57894  fi
57895fi
57896rm -f confcache
57897
57898test "x$prefix" = xNONE && prefix=$ac_default_prefix
57899# Let make expand exec_prefix.
57900test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
57901
57902# Transform confdefs.h into DEFS.
57903# Protect against shell expansion while executing Makefile rules.
57904# Protect against Makefile macro expansion.
57905#
57906# If the first sed substitution is executed (which looks for macros that
57907# take arguments), then branch to the quote section.  Otherwise,
57908# look for a macro that doesn't take arguments.
57909ac_script='
57910:mline
57911/\\$/{
57912 N
57913 s,\\\n,,
57914 b mline
57915}
57916t clear
57917:clear
57918s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
57919t quote
57920s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
57921t quote
57922b any
57923:quote
57924s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
57925s/\[/\\&/g
57926s/\]/\\&/g
57927s/\$/$$/g
57928H
57929:any
57930${
57931	g
57932	s/^\n//
57933	s/\n/ /g
57934	p
57935}
57936'
57937DEFS=`sed -n "$ac_script" confdefs.h`
57938
57939
57940ac_libobjs=
57941ac_ltlibobjs=
57942U=
57943for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
57944  # 1. Remove the extension, and $U if already installed.
57945  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
57946  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
57947  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
57948  #    will be set to the directory where LIBOBJS objects are built.
57949  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
57950  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
57951done
57952LIBOBJS=$ac_libobjs
57953
57954LTLIBOBJS=$ac_ltlibobjs
57955
57956
57957
57958: "${CONFIG_STATUS=./config.status}"
57959ac_write_fail=0
57960ac_clean_files_save=$ac_clean_files
57961ac_clean_files="$ac_clean_files $CONFIG_STATUS"
57962{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
57963$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
57964as_write_fail=0
57965cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
57966#! $SHELL
57967# Generated by $as_me.
57968# Run this file to recreate the current configuration.
57969# Compiler output produced by configure, useful for debugging
57970# configure, is in config.log if it exists.
57971
57972debug=false
57973ac_cs_recheck=false
57974ac_cs_silent=false
57975
57976SHELL=\${CONFIG_SHELL-$SHELL}
57977export SHELL
57978_ASEOF
57979cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
57980## -------------------- ##
57981## M4sh Initialization. ##
57982## -------------------- ##
57983
57984# Be more Bourne compatible
57985DUALCASE=1; export DUALCASE # for MKS sh
57986if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
57987  emulate sh
57988  NULLCMD=:
57989  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
57990  # is contrary to our usage.  Disable this feature.
57991  alias -g '${1+"$@"}'='"$@"'
57992  setopt NO_GLOB_SUBST
57993else
57994  case `(set -o) 2>/dev/null` in #(
57995  *posix*) :
57996    set -o posix ;; #(
57997  *) :
57998     ;;
57999esac
58000fi
58001
58002
58003as_nl='
58004'
58005export as_nl
58006# Printing a long string crashes Solaris 7 /usr/bin/printf.
58007as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58008as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58009as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58010# Prefer a ksh shell builtin over an external printf program on Solaris,
58011# but without wasting forks for bash or zsh.
58012if test -z "$BASH_VERSION$ZSH_VERSION" \
58013    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58014  as_echo='print -r --'
58015  as_echo_n='print -rn --'
58016elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58017  as_echo='printf %s\n'
58018  as_echo_n='printf %s'
58019else
58020  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58021    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58022    as_echo_n='/usr/ucb/echo -n'
58023  else
58024    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58025    as_echo_n_body='eval
58026      arg=$1;
58027      case $arg in #(
58028      *"$as_nl"*)
58029	expr "X$arg" : "X\\(.*\\)$as_nl";
58030	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58031      esac;
58032      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58033    '
58034    export as_echo_n_body
58035    as_echo_n='sh -c $as_echo_n_body as_echo'
58036  fi
58037  export as_echo_body
58038  as_echo='sh -c $as_echo_body as_echo'
58039fi
58040
58041# The user is always right.
58042if test "${PATH_SEPARATOR+set}" != set; then
58043  PATH_SEPARATOR=:
58044  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58045    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58046      PATH_SEPARATOR=';'
58047  }
58048fi
58049
58050
58051# IFS
58052# We need space, tab and new line, in precisely that order.  Quoting is
58053# there to prevent editors from complaining about space-tab.
58054# (If _AS_PATH_WALK were called with IFS unset, it would disable word
58055# splitting by setting IFS to empty value.)
58056IFS=" ""	$as_nl"
58057
58058# Find who we are.  Look in the path if we contain no directory separator.
58059as_myself=
58060case $0 in #((
58061  *[\\/]* ) as_myself=$0 ;;
58062  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58063for as_dir in $PATH
58064do
58065  IFS=$as_save_IFS
58066  test -z "$as_dir" && as_dir=.
58067    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58068  done
58069IFS=$as_save_IFS
58070
58071     ;;
58072esac
58073# We did not find ourselves, most probably we were run as `sh COMMAND'
58074# in which case we are not to be found in the path.
58075if test "x$as_myself" = x; then
58076  as_myself=$0
58077fi
58078if test ! -f "$as_myself"; then
58079  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58080  exit 1
58081fi
58082
58083# Unset variables that we do not need and which cause bugs (e.g. in
58084# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58085# suppresses any "Segmentation fault" message there.  '((' could
58086# trigger a bug in pdksh 5.2.14.
58087for as_var in BASH_ENV ENV MAIL MAILPATH
58088do eval test x\${$as_var+set} = xset \
58089  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58090done
58091PS1='$ '
58092PS2='> '
58093PS4='+ '
58094
58095# NLS nuisances.
58096LC_ALL=C
58097export LC_ALL
58098LANGUAGE=C
58099export LANGUAGE
58100
58101# CDPATH.
58102(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58103
58104
58105# as_fn_error STATUS ERROR [LINENO LOG_FD]
58106# ----------------------------------------
58107# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58108# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58109# script with STATUS, using 1 if that was 0.
58110as_fn_error ()
58111{
58112  as_status=$1; test $as_status -eq 0 && as_status=1
58113  if test "$4"; then
58114    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58115    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58116  fi
58117  $as_echo "$as_me: error: $2" >&2
58118  as_fn_exit $as_status
58119} # as_fn_error
58120
58121
58122# as_fn_set_status STATUS
58123# -----------------------
58124# Set $? to STATUS, without forking.
58125as_fn_set_status ()
58126{
58127  return $1
58128} # as_fn_set_status
58129
58130# as_fn_exit STATUS
58131# -----------------
58132# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58133as_fn_exit ()
58134{
58135  set +e
58136  as_fn_set_status $1
58137  exit $1
58138} # as_fn_exit
58139
58140# as_fn_unset VAR
58141# ---------------
58142# Portably unset VAR.
58143as_fn_unset ()
58144{
58145  { eval $1=; unset $1;}
58146}
58147as_unset=as_fn_unset
58148# as_fn_append VAR VALUE
58149# ----------------------
58150# Append the text in VALUE to the end of the definition contained in VAR. Take
58151# advantage of any shell optimizations that allow amortized linear growth over
58152# repeated appends, instead of the typical quadratic growth present in naive
58153# implementations.
58154if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58155  eval 'as_fn_append ()
58156  {
58157    eval $1+=\$2
58158  }'
58159else
58160  as_fn_append ()
58161  {
58162    eval $1=\$$1\$2
58163  }
58164fi # as_fn_append
58165
58166# as_fn_arith ARG...
58167# ------------------
58168# Perform arithmetic evaluation on the ARGs, and store the result in the
58169# global $as_val. Take advantage of shells that can avoid forks. The arguments
58170# must be portable across $(()) and expr.
58171if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
58172  eval 'as_fn_arith ()
58173  {
58174    as_val=$(( $* ))
58175  }'
58176else
58177  as_fn_arith ()
58178  {
58179    as_val=`expr "$@" || test $? -eq 1`
58180  }
58181fi # as_fn_arith
58182
58183
58184if expr a : '\(a\)' >/dev/null 2>&1 &&
58185   test "X`expr 00001 : '.*\(...\)'`" = X001; then
58186  as_expr=expr
58187else
58188  as_expr=false
58189fi
58190
58191if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
58192  as_basename=basename
58193else
58194  as_basename=false
58195fi
58196
58197if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
58198  as_dirname=dirname
58199else
58200  as_dirname=false
58201fi
58202
58203as_me=`$as_basename -- "$0" ||
58204$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
58205	 X"$0" : 'X\(//\)$' \| \
58206	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
58207$as_echo X/"$0" |
58208    sed '/^.*\/\([^/][^/]*\)\/*$/{
58209	    s//\1/
58210	    q
58211	  }
58212	  /^X\/\(\/\/\)$/{
58213	    s//\1/
58214	    q
58215	  }
58216	  /^X\/\(\/\).*/{
58217	    s//\1/
58218	    q
58219	  }
58220	  s/.*/./; q'`
58221
58222# Avoid depending upon Character Ranges.
58223as_cr_letters='abcdefghijklmnopqrstuvwxyz'
58224as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
58225as_cr_Letters=$as_cr_letters$as_cr_LETTERS
58226as_cr_digits='0123456789'
58227as_cr_alnum=$as_cr_Letters$as_cr_digits
58228
58229ECHO_C= ECHO_N= ECHO_T=
58230case `echo -n x` in #(((((
58231-n*)
58232  case `echo 'xy\c'` in
58233  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
58234  xy)  ECHO_C='\c';;
58235  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
58236       ECHO_T='	';;
58237  esac;;
58238*)
58239  ECHO_N='-n';;
58240esac
58241
58242rm -f conf$$ conf$$.exe conf$$.file
58243if test -d conf$$.dir; then
58244  rm -f conf$$.dir/conf$$.file
58245else
58246  rm -f conf$$.dir
58247  mkdir conf$$.dir 2>/dev/null
58248fi
58249if (echo >conf$$.file) 2>/dev/null; then
58250  if ln -s conf$$.file conf$$ 2>/dev/null; then
58251    as_ln_s='ln -s'
58252    # ... but there are two gotchas:
58253    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
58254    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
58255    # In both cases, we have to default to `cp -pR'.
58256    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
58257      as_ln_s='cp -pR'
58258  elif ln conf$$.file conf$$ 2>/dev/null; then
58259    as_ln_s=ln
58260  else
58261    as_ln_s='cp -pR'
58262  fi
58263else
58264  as_ln_s='cp -pR'
58265fi
58266rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
58267rmdir conf$$.dir 2>/dev/null
58268
58269
58270# as_fn_mkdir_p
58271# -------------
58272# Create "$as_dir" as a directory, including parents if necessary.
58273as_fn_mkdir_p ()
58274{
58275
58276  case $as_dir in #(
58277  -*) as_dir=./$as_dir;;
58278  esac
58279  test -d "$as_dir" || eval $as_mkdir_p || {
58280    as_dirs=
58281    while :; do
58282      case $as_dir in #(
58283      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
58284      *) as_qdir=$as_dir;;
58285      esac
58286      as_dirs="'$as_qdir' $as_dirs"
58287      as_dir=`$as_dirname -- "$as_dir" ||
58288$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58289	 X"$as_dir" : 'X\(//\)[^/]' \| \
58290	 X"$as_dir" : 'X\(//\)$' \| \
58291	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
58292$as_echo X"$as_dir" |
58293    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58294	    s//\1/
58295	    q
58296	  }
58297	  /^X\(\/\/\)[^/].*/{
58298	    s//\1/
58299	    q
58300	  }
58301	  /^X\(\/\/\)$/{
58302	    s//\1/
58303	    q
58304	  }
58305	  /^X\(\/\).*/{
58306	    s//\1/
58307	    q
58308	  }
58309	  s/.*/./; q'`
58310      test -d "$as_dir" && break
58311    done
58312    test -z "$as_dirs" || eval "mkdir $as_dirs"
58313  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
58314
58315
58316} # as_fn_mkdir_p
58317if mkdir -p . 2>/dev/null; then
58318  as_mkdir_p='mkdir -p "$as_dir"'
58319else
58320  test -d ./-p && rmdir ./-p
58321  as_mkdir_p=false
58322fi
58323
58324
58325# as_fn_executable_p FILE
58326# -----------------------
58327# Test if FILE is an executable regular file.
58328as_fn_executable_p ()
58329{
58330  test -f "$1" && test -x "$1"
58331} # as_fn_executable_p
58332as_test_x='test -x'
58333as_executable_p=as_fn_executable_p
58334
58335# Sed expression to map a string onto a valid CPP name.
58336as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
58337
58338# Sed expression to map a string onto a valid variable name.
58339as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
58340
58341
58342exec 6>&1
58343## ----------------------------------- ##
58344## Main body of $CONFIG_STATUS script. ##
58345## ----------------------------------- ##
58346_ASEOF
58347test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
58348
58349cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58350# Save the log message, to keep $0 and so on meaningful, and to
58351# report actual input values of CONFIG_FILES etc. instead of their
58352# values after options handling.
58353ac_log="
58354This file was extended by OpenJDK $as_me jdk9, which was
58355generated by GNU Autoconf 2.69.  Invocation command line was
58356
58357  CONFIG_FILES    = $CONFIG_FILES
58358  CONFIG_HEADERS  = $CONFIG_HEADERS
58359  CONFIG_LINKS    = $CONFIG_LINKS
58360  CONFIG_COMMANDS = $CONFIG_COMMANDS
58361  $ $0 $@
58362
58363on `(hostname || uname -n) 2>/dev/null | sed 1q`
58364"
58365
58366_ACEOF
58367
58368case $ac_config_files in *"
58369"*) set x $ac_config_files; shift; ac_config_files=$*;;
58370esac
58371
58372
58373
58374cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58375# Files that config.status was made for.
58376config_files="$ac_config_files"
58377
58378_ACEOF
58379
58380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58381ac_cs_usage="\
58382\`$as_me' instantiates files and other configuration actions
58383from templates according to the current configuration.  Unless the files
58384and actions are specified as TAGs, all are instantiated by default.
58385
58386Usage: $0 [OPTION]... [TAG]...
58387
58388  -h, --help       print this help, then exit
58389  -V, --version    print version number and configuration settings, then exit
58390      --config     print configuration, then exit
58391  -q, --quiet, --silent
58392                   do not print progress messages
58393  -d, --debug      don't remove temporary files
58394      --recheck    update $as_me by reconfiguring in the same conditions
58395      --file=FILE[:TEMPLATE]
58396                   instantiate the configuration file FILE
58397
58398Configuration files:
58399$config_files
58400
58401Report bugs to <build-dev@openjdk.java.net>.
58402OpenJDK home page: <http://openjdk.java.net>."
58403
58404_ACEOF
58405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58406ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
58407ac_cs_version="\\
58408OpenJDK config.status jdk9
58409configured by $0, generated by GNU Autoconf 2.69,
58410  with options \\"\$ac_cs_config\\"
58411
58412Copyright (C) 2012 Free Software Foundation, Inc.
58413This config.status script is free software; the Free Software Foundation
58414gives unlimited permission to copy, distribute and modify it."
58415
58416ac_pwd='$ac_pwd'
58417srcdir='$srcdir'
58418AWK='$AWK'
58419test -n "\$AWK" || AWK=awk
58420_ACEOF
58421
58422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58423# The default lists apply if the user does not specify any file.
58424ac_need_defaults=:
58425while test $# != 0
58426do
58427  case $1 in
58428  --*=?*)
58429    ac_option=`expr "X$1" : 'X\([^=]*\)='`
58430    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
58431    ac_shift=:
58432    ;;
58433  --*=)
58434    ac_option=`expr "X$1" : 'X\([^=]*\)='`
58435    ac_optarg=
58436    ac_shift=:
58437    ;;
58438  *)
58439    ac_option=$1
58440    ac_optarg=$2
58441    ac_shift=shift
58442    ;;
58443  esac
58444
58445  case $ac_option in
58446  # Handling of the options.
58447  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
58448    ac_cs_recheck=: ;;
58449  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
58450    $as_echo "$ac_cs_version"; exit ;;
58451  --config | --confi | --conf | --con | --co | --c )
58452    $as_echo "$ac_cs_config"; exit ;;
58453  --debug | --debu | --deb | --de | --d | -d )
58454    debug=: ;;
58455  --file | --fil | --fi | --f )
58456    $ac_shift
58457    case $ac_optarg in
58458    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
58459    '') as_fn_error $? "missing file argument" ;;
58460    esac
58461    as_fn_append CONFIG_FILES " '$ac_optarg'"
58462    ac_need_defaults=false;;
58463  --he | --h |  --help | --hel | -h )
58464    $as_echo "$ac_cs_usage"; exit ;;
58465  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
58466  | -silent | --silent | --silen | --sile | --sil | --si | --s)
58467    ac_cs_silent=: ;;
58468
58469  # This is an error.
58470  -*) as_fn_error $? "unrecognized option: \`$1'
58471Try \`$0 --help' for more information." ;;
58472
58473  *) as_fn_append ac_config_targets " $1"
58474     ac_need_defaults=false ;;
58475
58476  esac
58477  shift
58478done
58479
58480ac_configure_extra_args=
58481
58482if $ac_cs_silent; then
58483  exec 6>/dev/null
58484  ac_configure_extra_args="$ac_configure_extra_args --silent"
58485fi
58486
58487_ACEOF
58488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58489if \$ac_cs_recheck; then
58490  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
58491  shift
58492  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
58493  CONFIG_SHELL='$SHELL'
58494  export CONFIG_SHELL
58495  exec "\$@"
58496fi
58497
58498_ACEOF
58499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58500exec 5>>config.log
58501{
58502  echo
58503  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
58504## Running $as_me. ##
58505_ASBOX
58506  $as_echo "$ac_log"
58507} >&5
58508
58509_ACEOF
58510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58511_ACEOF
58512
58513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58514
58515# Handling of arguments.
58516for ac_config_target in $ac_config_targets
58517do
58518  case $ac_config_target in
58519    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
58520    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
58521    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
58522    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
58523    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
58524
58525  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
58526  esac
58527done
58528
58529
58530# If the user did not use the arguments to specify the items to instantiate,
58531# then the envvar interface is used.  Set only those that are not.
58532# We use the long form for the default assignment because of an extremely
58533# bizarre bug on SunOS 4.1.3.
58534if $ac_need_defaults; then
58535  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
58536fi
58537
58538# Have a temporary directory for convenience.  Make it in the build tree
58539# simply because there is no reason against having it here, and in addition,
58540# creating and moving files from /tmp can sometimes cause problems.
58541# Hook for its removal unless debugging.
58542# Note that there is a small window in which the directory will not be cleaned:
58543# after its creation but before its name has been assigned to `$tmp'.
58544$debug ||
58545{
58546  tmp= ac_tmp=
58547  trap 'exit_status=$?
58548  : "${ac_tmp:=$tmp}"
58549  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
58550' 0
58551  trap 'as_fn_exit 1' 1 2 13 15
58552}
58553# Create a (secure) tmp directory for tmp files.
58554
58555{
58556  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
58557  test -d "$tmp"
58558}  ||
58559{
58560  tmp=./conf$$-$RANDOM
58561  (umask 077 && mkdir "$tmp")
58562} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
58563ac_tmp=$tmp
58564
58565# Set up the scripts for CONFIG_FILES section.
58566# No need to generate them if there are no CONFIG_FILES.
58567# This happens for instance with `./config.status config.h'.
58568if test -n "$CONFIG_FILES"; then
58569
58570
58571ac_cr=`echo X | tr X '\015'`
58572# On cygwin, bash can eat \r inside `` if the user requested igncr.
58573# But we know of no other shell where ac_cr would be empty at this
58574# point, so we can use a bashism as a fallback.
58575if test "x$ac_cr" = x; then
58576  eval ac_cr=\$\'\\r\'
58577fi
58578ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
58579if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
58580  ac_cs_awk_cr='\\r'
58581else
58582  ac_cs_awk_cr=$ac_cr
58583fi
58584
58585echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
58586_ACEOF
58587
58588
58589{
58590  echo "cat >conf$$subs.awk <<_ACEOF" &&
58591  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
58592  echo "_ACEOF"
58593} >conf$$subs.sh ||
58594  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58595ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
58596ac_delim='%!_!# '
58597for ac_last_try in false false false false false :; do
58598  . ./conf$$subs.sh ||
58599    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58600
58601  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
58602  if test $ac_delim_n = $ac_delim_num; then
58603    break
58604  elif $ac_last_try; then
58605    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
58606  else
58607    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
58608  fi
58609done
58610rm -f conf$$subs.sh
58611
58612cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58613cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
58614_ACEOF
58615sed -n '
58616h
58617s/^/S["/; s/!.*/"]=/
58618p
58619g
58620s/^[^!]*!//
58621:repl
58622t repl
58623s/'"$ac_delim"'$//
58624t delim
58625:nl
58626h
58627s/\(.\{148\}\)..*/\1/
58628t more1
58629s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
58630p
58631n
58632b repl
58633:more1
58634s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58635p
58636g
58637s/.\{148\}//
58638t nl
58639:delim
58640h
58641s/\(.\{148\}\)..*/\1/
58642t more2
58643s/["\\]/\\&/g; s/^/"/; s/$/"/
58644p
58645b
58646:more2
58647s/["\\]/\\&/g; s/^/"/; s/$/"\\/
58648p
58649g
58650s/.\{148\}//
58651t delim
58652' <conf$$subs.awk | sed '
58653/^[^""]/{
58654  N
58655  s/\n//
58656}
58657' >>$CONFIG_STATUS || ac_write_fail=1
58658rm -f conf$$subs.awk
58659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58660_ACAWK
58661cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
58662  for (key in S) S_is_set[key] = 1
58663  FS = ""
58664
58665}
58666{
58667  line = $ 0
58668  nfields = split(line, field, "@")
58669  substed = 0
58670  len = length(field[1])
58671  for (i = 2; i < nfields; i++) {
58672    key = field[i]
58673    keylen = length(key)
58674    if (S_is_set[key]) {
58675      value = S[key]
58676      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
58677      len += length(value) + length(field[++i])
58678      substed = 1
58679    } else
58680      len += 1 + keylen
58681  }
58682
58683  print line
58684}
58685
58686_ACAWK
58687_ACEOF
58688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58689if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
58690  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
58691else
58692  cat
58693fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
58694  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
58695_ACEOF
58696
58697# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
58698# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
58699# trailing colons and then remove the whole line if VPATH becomes empty
58700# (actually we leave an empty line to preserve line numbers).
58701if test "x$srcdir" = x.; then
58702  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
58703h
58704s///
58705s/^/:/
58706s/[	 ]*$/:/
58707s/:\$(srcdir):/:/g
58708s/:\${srcdir}:/:/g
58709s/:@srcdir@:/:/g
58710s/^:*//
58711s/:*$//
58712x
58713s/\(=[	 ]*\).*/\1/
58714G
58715s/\n//
58716s/^[^=]*=[	 ]*$//
58717}'
58718fi
58719
58720cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58721fi # test -n "$CONFIG_FILES"
58722
58723
58724eval set X "  :F $CONFIG_FILES      "
58725shift
58726for ac_tag
58727do
58728  case $ac_tag in
58729  :[FHLC]) ac_mode=$ac_tag; continue;;
58730  esac
58731  case $ac_mode$ac_tag in
58732  :[FHL]*:*);;
58733  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
58734  :[FH]-) ac_tag=-:-;;
58735  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
58736  esac
58737  ac_save_IFS=$IFS
58738  IFS=:
58739  set x $ac_tag
58740  IFS=$ac_save_IFS
58741  shift
58742  ac_file=$1
58743  shift
58744
58745  case $ac_mode in
58746  :L) ac_source=$1;;
58747  :[FH])
58748    ac_file_inputs=
58749    for ac_f
58750    do
58751      case $ac_f in
58752      -) ac_f="$ac_tmp/stdin";;
58753      *) # Look for the file first in the build tree, then in the source tree
58754	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
58755	 # because $ac_f cannot contain `:'.
58756	 test -f "$ac_f" ||
58757	   case $ac_f in
58758	   [\\/$]*) false;;
58759	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
58760	   esac ||
58761	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
58762      esac
58763      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
58764      as_fn_append ac_file_inputs " '$ac_f'"
58765    done
58766
58767    # Let's still pretend it is `configure' which instantiates (i.e., don't
58768    # use $as_me), people would be surprised to read:
58769    #    /* config.h.  Generated by config.status.  */
58770    configure_input='Generated from '`
58771	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
58772	`' by configure.'
58773    if test x"$ac_file" != x-; then
58774      configure_input="$ac_file.  $configure_input"
58775      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
58776$as_echo "$as_me: creating $ac_file" >&6;}
58777    fi
58778    # Neutralize special characters interpreted by sed in replacement strings.
58779    case $configure_input in #(
58780    *\&* | *\|* | *\\* )
58781       ac_sed_conf_input=`$as_echo "$configure_input" |
58782       sed 's/[\\\\&|]/\\\\&/g'`;; #(
58783    *) ac_sed_conf_input=$configure_input;;
58784    esac
58785
58786    case $ac_tag in
58787    *:-:* | *:-) cat >"$ac_tmp/stdin" \
58788      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
58789    esac
58790    ;;
58791  esac
58792
58793  ac_dir=`$as_dirname -- "$ac_file" ||
58794$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
58795	 X"$ac_file" : 'X\(//\)[^/]' \| \
58796	 X"$ac_file" : 'X\(//\)$' \| \
58797	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
58798$as_echo X"$ac_file" |
58799    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
58800	    s//\1/
58801	    q
58802	  }
58803	  /^X\(\/\/\)[^/].*/{
58804	    s//\1/
58805	    q
58806	  }
58807	  /^X\(\/\/\)$/{
58808	    s//\1/
58809	    q
58810	  }
58811	  /^X\(\/\).*/{
58812	    s//\1/
58813	    q
58814	  }
58815	  s/.*/./; q'`
58816  as_dir="$ac_dir"; as_fn_mkdir_p
58817  ac_builddir=.
58818
58819case "$ac_dir" in
58820.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
58821*)
58822  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
58823  # A ".." for each directory in $ac_dir_suffix.
58824  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
58825  case $ac_top_builddir_sub in
58826  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
58827  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
58828  esac ;;
58829esac
58830ac_abs_top_builddir=$ac_pwd
58831ac_abs_builddir=$ac_pwd$ac_dir_suffix
58832# for backward compatibility:
58833ac_top_builddir=$ac_top_build_prefix
58834
58835case $srcdir in
58836  .)  # We are building in place.
58837    ac_srcdir=.
58838    ac_top_srcdir=$ac_top_builddir_sub
58839    ac_abs_top_srcdir=$ac_pwd ;;
58840  [\\/]* | ?:[\\/]* )  # Absolute name.
58841    ac_srcdir=$srcdir$ac_dir_suffix;
58842    ac_top_srcdir=$srcdir
58843    ac_abs_top_srcdir=$srcdir ;;
58844  *) # Relative name.
58845    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
58846    ac_top_srcdir=$ac_top_build_prefix$srcdir
58847    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
58848esac
58849ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
58850
58851
58852  case $ac_mode in
58853  :F)
58854  #
58855  # CONFIG_FILE
58856  #
58857
58858_ACEOF
58859
58860cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58861# If the template does not know about datarootdir, expand it.
58862# FIXME: This hack should be removed a few years after 2.60.
58863ac_datarootdir_hack=; ac_datarootdir_seen=
58864ac_sed_dataroot='
58865/datarootdir/ {
58866  p
58867  q
58868}
58869/@datadir@/p
58870/@docdir@/p
58871/@infodir@/p
58872/@localedir@/p
58873/@mandir@/p'
58874case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
58875*datarootdir*) ac_datarootdir_seen=yes;;
58876*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
58877  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
58878$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
58879_ACEOF
58880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58881  ac_datarootdir_hack='
58882  s&@datadir@&$datadir&g
58883  s&@docdir@&$docdir&g
58884  s&@infodir@&$infodir&g
58885  s&@localedir@&$localedir&g
58886  s&@mandir@&$mandir&g
58887  s&\\\${datarootdir}&$datarootdir&g' ;;
58888esac
58889_ACEOF
58890
58891# Neutralize VPATH when `$srcdir' = `.'.
58892# Shell code in configure.ac might set extrasub.
58893# FIXME: do we really want to maintain this feature?
58894cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
58895ac_sed_extra="$ac_vpsub
58896$extrasub
58897_ACEOF
58898cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
58899:t
58900/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
58901s|@configure_input@|$ac_sed_conf_input|;t t
58902s&@top_builddir@&$ac_top_builddir_sub&;t t
58903s&@top_build_prefix@&$ac_top_build_prefix&;t t
58904s&@srcdir@&$ac_srcdir&;t t
58905s&@abs_srcdir@&$ac_abs_srcdir&;t t
58906s&@top_srcdir@&$ac_top_srcdir&;t t
58907s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
58908s&@builddir@&$ac_builddir&;t t
58909s&@abs_builddir@&$ac_abs_builddir&;t t
58910s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
58911$ac_datarootdir_hack
58912"
58913eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
58914  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58915
58916test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
58917  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
58918  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
58919      "$ac_tmp/out"`; test -z "$ac_out"; } &&
58920  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58921which seems to be undefined.  Please make sure it is defined" >&5
58922$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
58923which seems to be undefined.  Please make sure it is defined" >&2;}
58924
58925  rm -f "$ac_tmp/stdin"
58926  case $ac_file in
58927  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
58928  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
58929  esac \
58930  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
58931 ;;
58932
58933
58934
58935  esac
58936
58937done # for ac_tag
58938
58939
58940as_fn_exit 0
58941_ACEOF
58942ac_clean_files=$ac_clean_files_save
58943
58944test $ac_write_fail = 0 ||
58945  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
58946
58947
58948# configure is writing to config.log, and then calls config.status.
58949# config.status does its own redirection, appending to config.log.
58950# Unfortunately, on DOS this fails, as config.log is still kept open
58951# by configure, so config.status won't be able to write to it; its
58952# output is simply discarded.  So we exec the FD to /dev/null,
58953# effectively closing config.log, so it can be properly (re)opened and
58954# appended to by config.status.  When coming back to configure, we
58955# need to make the FD available again.
58956if test "$no_create" != yes; then
58957  ac_cs_success=:
58958  ac_config_status_args=
58959  test "$silent" = yes &&
58960    ac_config_status_args="$ac_config_status_args --quiet"
58961  exec 5>/dev/null
58962  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
58963  exec 5>>config.log
58964  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
58965  # would make configure fail if this is the last instruction.
58966  $ac_cs_success || as_fn_exit 1
58967fi
58968if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
58969  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
58970$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
58971fi
58972
58973
58974# After AC_OUTPUT, we need to do final work
58975
58976
58977  # Try to move config.log (generated by autoconf) to the configure-support directory.
58978  if test -e ./config.log; then
58979    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
58980  fi
58981
58982  # Rotate our log file (configure.log)
58983  if test -e "$OUTPUT_ROOT/configure.log.old"; then
58984    $RM -f "$OUTPUT_ROOT/configure.log.old"
58985  fi
58986  if test -e "$OUTPUT_ROOT/configure.log"; then
58987    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
58988  fi
58989
58990  # Move configure.log from current directory to the build output root
58991  if test -e ./configure.log; then
58992    echo found it
58993    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
58994  fi
58995
58996  # Make the compare script executable
58997  $CHMOD +x $OUTPUT_ROOT/compare.sh
58998
58999
59000# Finally output some useful information to the user
59001
59002  # Finally output some useful information to the user
59003
59004  printf "\n"
59005  printf "====================================================\n"
59006  if test "x$no_create" != "xyes"; then
59007    if test "x$IS_RECONFIGURE" != "xyes"; then
59008      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59009    else
59010      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59011    fi
59012  else
59013    if test "x$IS_RECONFIGURE" != "xyes"; then
59014      printf "A configuration has been successfully checked but not created\n"
59015    else
59016      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59017    fi
59018  fi
59019  if test "x$CONFIGURE_COMMAND_LINE" != x; then
59020    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59021  else
59022    printf "using default settings.\n"
59023  fi
59024
59025  printf "\n"
59026  printf "Configuration summary:\n"
59027  printf "* Debug level:    $DEBUG_LEVEL\n"
59028  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59029  printf "* JDK variant:    $JDK_VARIANT\n"
59030  printf "* JVM variants:   $with_jvm_variants\n"
59031  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59032
59033  printf "\n"
59034  printf "Tools summary:\n"
59035  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59036    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59037  fi
59038  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59039  if test "x$TOOLCHAIN_VERSION" != "x"; then
59040    print_version=" $TOOLCHAIN_VERSION"
59041  fi
59042  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59043  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59044  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59045
59046  printf "\n"
59047  printf "Build performance summary:\n"
59048  printf "* Cores to use:   $JOBS\n"
59049  printf "* Memory limit:   $MEMORY_SIZE MB\n"
59050  if test "x$CCACHE_STATUS" != "x"; then
59051    printf "* ccache status:  $CCACHE_STATUS\n"
59052  fi
59053  printf "\n"
59054
59055  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59056    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59057    printf "will result in longer build times.\n"
59058    printf "\n"
59059  fi
59060
59061  if test "x$FOUND_ALT_VARIABLES" != "x"; then
59062    printf "WARNING: You have old-style ALT_ environment variables set.\n"
59063    printf "These are not respected, and will be ignored. It is recommended\n"
59064    printf "that you clean your environment. The following variables are set:\n"
59065    printf "$FOUND_ALT_VARIABLES\n"
59066    printf "\n"
59067  fi
59068
59069  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59070    printf "WARNING: Your build output directory is not on a local disk.\n"
59071    printf "This will severely degrade build performance!\n"
59072    printf "It is recommended that you create an output directory on a local disk,\n"
59073    printf "and run the configure script again from that directory.\n"
59074    printf "\n"
59075  fi
59076
59077  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59078    printf "WARNING: The result of this configuration has overridden an older\n"
59079    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59080    printf "proper build. Failure to do so might result in strange build problems.\n"
59081    printf "\n"
59082  fi
59083
59084  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59085    printf "WARNING: The result of this configuration was not saved.\n"
59086    printf "You should run without '--no-create | -n' to create the configuration.\n"
59087    printf "\n"
59088  fi
59089
59090
59091
59092  # Locate config.log.
59093  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59094    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59095  elif test -e "./config.log"; then
59096    CONFIG_LOG_PATH="."
59097  fi
59098
59099  if test -e "$CONFIG_LOG_PATH/config.log"; then
59100    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59101    if test $? -eq 0; then
59102      printf "The following warnings were produced. Repeated here for convenience:\n"
59103      # We must quote sed expression (using []) to stop m4 from eating the [].
59104      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59105      printf "\n"
59106    fi
59107  fi
59108
59109