generated-configure.sh revision 629:ab82853d3365
1160814Ssimon#! /bin/sh
2160814Ssimon# Guess values for system-dependent variables and create Makefiles.
3160814Ssimon# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4160814Ssimon#
5160814Ssimon# Report bugs to <build-dev@openjdk.java.net>.
6160814Ssimon#
7160814Ssimon#
8160814Ssimon# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9160814Ssimon# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10160814Ssimon# Foundation, Inc.
11160814Ssimon#
12160814Ssimon#
13280297Sjkim# This configure script is free software; the Free Software Foundation
14160814Ssimon# gives unlimited permission to copy, distribute and modify it.
15160814Ssimon## -------------------- ##
16160814Ssimon## M4sh Initialization. ##
17160814Ssimon## -------------------- ##
18160814Ssimon
19160814Ssimon# Be more Bourne compatible
20160814SsimonDUALCASE=1; export DUALCASE # for MKS sh
21160814Ssimonif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22160814Ssimon  emulate sh
23160814Ssimon  NULLCMD=:
24160814Ssimon  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25160814Ssimon  # is contrary to our usage.  Disable this feature.
26160814Ssimon  alias -g '${1+"$@"}'='"$@"'
27160814Ssimon  setopt NO_GLOB_SUBST
28160814Ssimonelse
29160814Ssimon  case `(set -o) 2>/dev/null` in #(
30160814Ssimon  *posix*) :
31160814Ssimon    set -o posix ;; #(
32160814Ssimon  *) :
33160814Ssimon     ;;
34160814Ssimonesac
35160814Ssimonfi
36160814Ssimon
37160814Ssimon
38160814Ssimonas_nl='
39160814Ssimon'
40160814Ssimonexport as_nl
41160814Ssimon# Printing a long string crashes Solaris 7 /usr/bin/printf.
42160814Ssimonas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43160814Ssimonas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44160814Ssimonas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45160814Ssimon# Prefer a ksh shell builtin over an external printf program on Solaris,
46160814Ssimon# but without wasting forks for bash or zsh.
47160814Ssimonif test -z "$BASH_VERSION$ZSH_VERSION" \
48160814Ssimon    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49160814Ssimon  as_echo='print -r --'
50160814Ssimon  as_echo_n='print -rn --'
51160814Ssimonelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52160814Ssimon  as_echo='printf %s\n'
53160814Ssimon  as_echo_n='printf %s'
54160814Ssimonelse
55160814Ssimon  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56160814Ssimon    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57160814Ssimon    as_echo_n='/usr/ucb/echo -n'
58160814Ssimon  else
59160814Ssimon    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60160814Ssimon    as_echo_n_body='eval
61280297Sjkim      arg=$1;
62160814Ssimon      case $arg in #(
63160814Ssimon      *"$as_nl"*)
64160814Ssimon	expr "X$arg" : "X\\(.*\\)$as_nl";
65160814Ssimon	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66160814Ssimon      esac;
67280297Sjkim      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68160814Ssimon    '
69160814Ssimon    export as_echo_n_body
70160814Ssimon    as_echo_n='sh -c $as_echo_n_body as_echo'
71160814Ssimon  fi
72160814Ssimon  export as_echo_body
73160814Ssimon  as_echo='sh -c $as_echo_body as_echo'
74280297Sjkimfi
75280297Sjkim
76280297Sjkim# The user is always right.
77280297Sjkimif test "${PATH_SEPARATOR+set}" != set; then
78280297Sjkim  PATH_SEPARATOR=:
79280297Sjkim  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80280297Sjkim    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81280297Sjkim      PATH_SEPARATOR=';'
82280297Sjkim  }
83280297Sjkimfi
84280297Sjkim
85280297Sjkim
86160814Ssimon# IFS
87280297Sjkim# We need space, tab and new line, in precisely that order.  Quoting is
88280297Sjkim# there to prevent editors from complaining about space-tab.
89160814Ssimon# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90280297Sjkim# splitting by setting IFS to empty value.)
91280297SjkimIFS=" ""	$as_nl"
92160814Ssimon
93160814Ssimon# Find who we are.  Look in the path if we contain no directory separator.
94160814Ssimoncase $0 in #((
95160814Ssimon  *[\\/]* ) as_myself=$0 ;;
96160814Ssimon  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97160814Ssimonfor as_dir in $PATH
98160814Ssimondo
99160814Ssimon  IFS=$as_save_IFS
100160814Ssimon  test -z "$as_dir" && as_dir=.
101280297Sjkim    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102160814Ssimon  done
103160814SsimonIFS=$as_save_IFS
104160814Ssimon
105160814Ssimon     ;;
106160814Ssimonesac
107160814Ssimon# We did not find ourselves, most probably we were run as `sh COMMAND'
108160814Ssimon# in which case we are not to be found in the path.
109264278Sjkimif test "x$as_myself" = x; then
110160814Ssimon  as_myself=$0
111160814Ssimonfi
112160814Ssimonif test ! -f "$as_myself"; then
113160814Ssimon  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114160814Ssimon  exit 1
115280297Sjkimfi
116280297Sjkim
117160814Ssimon# Unset variables that we do not need and which cause bugs (e.g. in
118160814Ssimon# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119160814Ssimon# suppresses any "Segmentation fault" message there.  '((' could
120160814Ssimon# trigger a bug in pdksh 5.2.14.
121280297Sjkimfor as_var in BASH_ENV ENV MAIL MAILPATH
122280297Sjkimdo eval test x\${$as_var+set} = xset \
123280297Sjkim  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124280297Sjkimdone
125280297SjkimPS1='$ '
126280297SjkimPS2='> '
127280297SjkimPS4='+ '
128280297Sjkim
129280297Sjkim# NLS nuisances.
130280297SjkimLC_ALL=C
131280297Sjkimexport LC_ALL
132280297SjkimLANGUAGE=C
133280297Sjkimexport LANGUAGE
134314125Sdelphij
135160814Ssimon# CDPATH.
136280297Sjkim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137280297Sjkim
138280297Sjkimif test "x$CONFIG_SHELL" = x; then
139160814Ssimon  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140280297Sjkim  emulate sh
141160814Ssimon  NULLCMD=:
142280297Sjkim  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143280297Sjkim  # is contrary to our usage.  Disable this feature.
144280297Sjkim  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145160814Ssimon  setopt NO_GLOB_SUBST
146280297Sjkimelse
147280297Sjkim  case \`(set -o) 2>/dev/null\` in #(
148160814Ssimon  *posix*) :
149280297Sjkim    set -o posix ;; #(
150280297Sjkim  *) :
151160814Ssimon     ;;
152280297Sjkimesac
153280297Sjkimfi
154280297Sjkim"
155280297Sjkim  as_required="as_fn_return () { (exit \$1); }
156280297Sjkimas_fn_success () { as_fn_return 0; }
157280297Sjkimas_fn_failure () { as_fn_return 1; }
158280297Sjkimas_fn_ret_success () { return 0; }
159280297Sjkimas_fn_ret_failure () { return 1; }
160280297Sjkim
161280297Sjkimexitcode=0
162280297Sjkimas_fn_success || { exitcode=1; echo as_fn_success failed.; }
163280297Sjkimas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164280297Sjkimas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165280297Sjkimas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166280297Sjkimif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167280297Sjkim
168280297Sjkimelse
169280297Sjkim  exitcode=1; echo positional parameters were not saved.
170280297Sjkimfi
171280297Sjkimtest x\$exitcode = x0 || exit 1"
172280297Sjkim  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173280297Sjkim  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174280297Sjkim  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175280297Sjkim  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176280297Sjkimtest \$(( 1 + 1 )) = 2 || exit 1"
177280297Sjkim  if (eval "$as_required") 2>/dev/null; then :
178280297Sjkim  as_have_required=yes
179280297Sjkimelse
180280297Sjkim  as_have_required=no
181280297Sjkimfi
182280297Sjkim  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183280297Sjkim
184280297Sjkimelse
185280297Sjkim  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186280297Sjkimas_found=false
187280297Sjkimfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188280297Sjkimdo
189280297Sjkim  IFS=$as_save_IFS
190280297Sjkim  test -z "$as_dir" && as_dir=.
191280297Sjkim  as_found=:
192280297Sjkim  case $as_dir in #(
193280297Sjkim	 /*)
194280297Sjkim	   for as_base in sh bash ksh sh5; do
195280297Sjkim	     # Try only shells that exist, to save several forks.
196280297Sjkim	     as_shell=$as_dir/$as_base
197280297Sjkim	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198280297Sjkim		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199280297Sjkim  CONFIG_SHELL=$as_shell as_have_required=yes
200280297Sjkim		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201280297Sjkim  break 2
202280297Sjkimfi
203280297Sjkimfi
204280297Sjkim	   done;;
205280297Sjkim       esac
206280297Sjkim  as_found=false
207280297Sjkimdone
208280297Sjkim$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209280297Sjkim	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210280297Sjkim  CONFIG_SHELL=$SHELL as_have_required=yes
211280297Sjkimfi; }
212280297SjkimIFS=$as_save_IFS
213280297Sjkim
214280297Sjkim
215280297Sjkim      if test "x$CONFIG_SHELL" != x; then :
216280297Sjkim  # We cannot yet assume a decent shell, so we have to provide a
217280297Sjkim	# neutralization value for shells without unset; and this also
218280297Sjkim	# works around shells that cannot unset nonexistent variables.
219280297Sjkim	BASH_ENV=/dev/null
220280297Sjkim	ENV=/dev/null
221280297Sjkim	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222280297Sjkim	export CONFIG_SHELL
223280297Sjkim	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224280297Sjkimfi
225280297Sjkim
226280297Sjkim    if test x$as_have_required = xno; then :
227280297Sjkim  $as_echo "$0: This script requires a shell more modern than all"
228280297Sjkim  $as_echo "$0: the shells that I found on your system."
229280297Sjkim  if test x${ZSH_VERSION+set} = xset ; then
230280297Sjkim    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231280297Sjkim    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232160814Ssimon  else
233280297Sjkim    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234280297Sjkim$0: build-dev@openjdk.java.net about your system, including
235280297Sjkim$0: any error possibly output before this message. Then
236280297Sjkim$0: install a modern shell, or manually run the script
237280297Sjkim$0: under such a shell if you do have one."
238280297Sjkim  fi
239280297Sjkim  exit 1
240280297Sjkimfi
241280297Sjkimfi
242280297Sjkimfi
243280297SjkimSHELL=${CONFIG_SHELL-/bin/sh}
244280297Sjkimexport SHELL
245280297Sjkim# Unset more variables known to interfere with behavior of common tools.
246280297SjkimCLICOLOR_FORCE= GREP_OPTIONS=
247280297Sjkimunset CLICOLOR_FORCE GREP_OPTIONS
248280297Sjkim
249280297Sjkim## --------------------- ##
250280297Sjkim## M4sh Shell Functions. ##
251280297Sjkim## --------------------- ##
252280297Sjkim# as_fn_unset VAR
253280297Sjkim# ---------------
254280297Sjkim# Portably unset VAR.
255280297Sjkimas_fn_unset ()
256280297Sjkim{
257280297Sjkim  { eval $1=; unset $1;}
258280297Sjkim}
259280297Sjkimas_unset=as_fn_unset
260280297Sjkim
261280297Sjkim# as_fn_set_status STATUS
262280297Sjkim# -----------------------
263280297Sjkim# Set $? to STATUS, without forking.
264280297Sjkimas_fn_set_status ()
265280297Sjkim{
266280297Sjkim  return $1
267280297Sjkim} # as_fn_set_status
268280297Sjkim
269280297Sjkim# as_fn_exit STATUS
270280297Sjkim# -----------------
271280297Sjkim# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272280297Sjkimas_fn_exit ()
273280297Sjkim{
274280297Sjkim  set +e
275280297Sjkim  as_fn_set_status $1
276280297Sjkim  exit $1
277280297Sjkim} # as_fn_exit
278280297Sjkim
279280297Sjkim# as_fn_mkdir_p
280280297Sjkim# -------------
281280297Sjkim# Create "$as_dir" as a directory, including parents if necessary.
282160814Ssimonas_fn_mkdir_p ()
283280297Sjkim{
284160814Ssimon
285280297Sjkim  case $as_dir in #(
286280297Sjkim  -*) as_dir=./$as_dir;;
287280297Sjkim  esac
288280297Sjkim  test -d "$as_dir" || eval $as_mkdir_p || {
289280297Sjkim    as_dirs=
290280297Sjkim    while :; do
291160814Ssimon      case $as_dir in #(
292280297Sjkim      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293280297Sjkim      *) as_qdir=$as_dir;;
294280297Sjkim      esac
295280297Sjkim      as_dirs="'$as_qdir' $as_dirs"
296280297Sjkim      as_dir=`$as_dirname -- "$as_dir" ||
297280297Sjkim$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298280297Sjkim	 X"$as_dir" : 'X\(//\)[^/]' \| \
299280297Sjkim	 X"$as_dir" : 'X\(//\)$' \| \
300280297Sjkim	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301280297Sjkim$as_echo X"$as_dir" |
302280297Sjkim    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303280297Sjkim	    s//\1/
304280297Sjkim	    q
305280297Sjkim	  }
306280297Sjkim	  /^X\(\/\/\)[^/].*/{
307280297Sjkim	    s//\1/
308280297Sjkim	    q
309280297Sjkim	  }
310280297Sjkim	  /^X\(\/\/\)$/{
311280297Sjkim	    s//\1/
312280297Sjkim	    q
313280297Sjkim	  }
314160814Ssimon	  /^X\(\/\).*/{
315314125Sdelphij	    s//\1/
316160814Ssimon	    q
317280297Sjkim	  }
318280297Sjkim	  s/.*/./; q'`
319280297Sjkim      test -d "$as_dir" && break
320280297Sjkim    done
321160814Ssimon    test -z "$as_dirs" || eval "mkdir $as_dirs"
322280297Sjkim  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323160814Ssimon
324280297Sjkim
325160814Ssimon} # as_fn_mkdir_p
326280297Sjkim# as_fn_append VAR VALUE
327280297Sjkim# ----------------------
328160814Ssimon# Append the text in VALUE to the end of the definition contained in VAR. Take
329280297Sjkim# advantage of any shell optimizations that allow amortized linear growth over
330280297Sjkim# repeated appends, instead of the typical quadratic growth present in naive
331280297Sjkim# implementations.
332280297Sjkimif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333160814Ssimon  eval 'as_fn_append ()
334280297Sjkim  {
335280297Sjkim    eval $1+=\$2
336280297Sjkim  }'
337280297Sjkimelse
338280297Sjkim  as_fn_append ()
339280297Sjkim  {
340280297Sjkim    eval $1=\$$1\$2
341280297Sjkim  }
342280297Sjkimfi # as_fn_append
343160814Ssimon
344280297Sjkim# as_fn_arith ARG...
345280297Sjkim# ------------------
346280297Sjkim# Perform arithmetic evaluation on the ARGs, and store the result in the
347160814Ssimon# global $as_val. Take advantage of shells that can avoid forks. The arguments
348280297Sjkim# must be portable across $(()) and expr.
349280297Sjkimif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350280297Sjkim  eval 'as_fn_arith ()
351280297Sjkim  {
352160814Ssimon    as_val=$(( $* ))
353280297Sjkim  }'
354280297Sjkimelse
355160814Ssimon  as_fn_arith ()
356280297Sjkim  {
357280297Sjkim    as_val=`expr "$@" || test $? -eq 1`
358280297Sjkim  }
359280297Sjkimfi # as_fn_arith
360280297Sjkim
361280297Sjkim
362280297Sjkim# as_fn_error STATUS ERROR [LINENO LOG_FD]
363280297Sjkim# ----------------------------------------
364280297Sjkim# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365280297Sjkim# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366280297Sjkim# script with STATUS, using 1 if that was 0.
367280297Sjkimas_fn_error ()
368280297Sjkim{
369280297Sjkim  as_status=$1; test $as_status -eq 0 && as_status=1
370280297Sjkim  if test "$4"; then
371160814Ssimon    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372290207Sjkim    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373290207Sjkim  fi
374290207Sjkim  $as_echo "$as_me: error: $2" >&2
375280297Sjkim  as_fn_exit $as_status
376280297Sjkim} # as_fn_error
377280297Sjkim
378280297Sjkimif expr a : '\(a\)' >/dev/null 2>&1 &&
379160814Ssimon   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380280297Sjkim  as_expr=expr
381280297Sjkimelse
382280297Sjkim  as_expr=false
383280297Sjkimfi
384280297Sjkim
385280297Sjkimif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386280297Sjkim  as_basename=basename
387280297Sjkimelse
388280297Sjkim  as_basename=false
389280297Sjkimfi
390280297Sjkim
391280297Sjkimif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392280297Sjkim  as_dirname=dirname
393280297Sjkimelse
394280297Sjkim  as_dirname=false
395160814Ssimonfi
396280297Sjkim
397280297Sjkimas_me=`$as_basename -- "$0" ||
398280297Sjkim$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399280297Sjkim	 X"$0" : 'X\(//\)$' \| \
400280297Sjkim	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401160814Ssimon$as_echo X/"$0" |
402280297Sjkim    sed '/^.*\/\([^/][^/]*\)\/*$/{
403280297Sjkim	    s//\1/
404160814Ssimon	    q
405280297Sjkim	  }
406280297Sjkim	  /^X\/\(\/\/\)$/{
407160814Ssimon	    s//\1/
408280297Sjkim	    q
409280297Sjkim	  }
410280297Sjkim	  /^X\/\(\/\).*/{
411160814Ssimon	    s//\1/
412280297Sjkim	    q
413280297Sjkim	  }
414280297Sjkim	  s/.*/./; q'`
415280297Sjkim
416160814Ssimon# Avoid depending upon Character Ranges.
417280297Sjkimas_cr_letters='abcdefghijklmnopqrstuvwxyz'
418280297Sjkimas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419280297Sjkimas_cr_Letters=$as_cr_letters$as_cr_LETTERS
420280297Sjkimas_cr_digits='0123456789'
421280297Sjkimas_cr_alnum=$as_cr_Letters$as_cr_digits
422291719Sjkim
423291719Sjkim
424291719Sjkim  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425160814Ssimon  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426280297Sjkim  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427160814Ssimon  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428280297Sjkim  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429280297Sjkim  sed -n '
430280297Sjkim    p
431280297Sjkim    /[$]LINENO/=
432280297Sjkim  ' <$as_myself |
433160814Ssimon    sed '
434280297Sjkim      s/[$]LINENO.*/&-/
435280297Sjkim      t lineno
436280297Sjkim      b
437280297Sjkim      :lineno
438280297Sjkim      N
439280297Sjkim      :loop
440280297Sjkim      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441160814Ssimon      t loop
442280297Sjkim      s/-\n.*//
443160814Ssimon    ' >$as_me.lineno &&
444280297Sjkim  chmod +x "$as_me.lineno" ||
445280297Sjkim    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446280297Sjkim
447280297Sjkim  # Don't try to exec as it changes $[0], causing all sort of problems
448280297Sjkim  # (the dirname of $[0] is not the place where we might find the
449280297Sjkim  # original and so on.  Autoconf is especially sensitive to this).
450280297Sjkim  . "./$as_me.lineno"
451160814Ssimon  # Exit status is that of the last command.
452280297Sjkim  exit
453280297Sjkim}
454280297Sjkim
455280297SjkimECHO_C= ECHO_N= ECHO_T=
456280297Sjkimcase `echo -n x` in #(((((
457280297Sjkim-n*)
458280297Sjkim  case `echo 'xy\c'` in
459280297Sjkim  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460280297Sjkim  xy)  ECHO_C='\c';;
461280297Sjkim  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462160814Ssimon       ECHO_T='	';;
463280297Sjkim  esac;;
464280297Sjkim*)
465160814Ssimon  ECHO_N='-n';;
466280297Sjkimesac
467160814Ssimon
468280297Sjkimrm -f conf$$ conf$$.exe conf$$.file
469280297Sjkimif test -d conf$$.dir; then
470280297Sjkim  rm -f conf$$.dir/conf$$.file
471280297Sjkimelse
472280297Sjkim  rm -f conf$$.dir
473280297Sjkim  mkdir conf$$.dir 2>/dev/null
474280297Sjkimfi
475280297Sjkimif (echo >conf$$.file) 2>/dev/null; then
476280297Sjkim  if ln -s conf$$.file conf$$ 2>/dev/null; then
477280297Sjkim    as_ln_s='ln -s'
478280297Sjkim    # ... but there are two gotchas:
479280297Sjkim    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480160814Ssimon    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481280297Sjkim    # In both cases, we have to default to `cp -p'.
482160814Ssimon    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483280297Sjkim      as_ln_s='cp -p'
484280297Sjkim  elif ln conf$$.file conf$$ 2>/dev/null; then
485280297Sjkim    as_ln_s=ln
486280297Sjkim  else
487160814Ssimon    as_ln_s='cp -p'
488280297Sjkim  fi
489280297Sjkimelse
490280297Sjkim  as_ln_s='cp -p'
491280297Sjkimfi
492280297Sjkimrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493280297Sjkimrmdir conf$$.dir 2>/dev/null
494160814Ssimon
495280297Sjkimif mkdir -p . 2>/dev/null; then
496160814Ssimon  as_mkdir_p='mkdir -p "$as_dir"'
497280297Sjkimelse
498280297Sjkim  test -d ./-p && rmdir ./-p
499280297Sjkim  as_mkdir_p=false
500280297Sjkimfi
501280297Sjkim
502280297Sjkimif test -x / >/dev/null 2>&1; then
503280297Sjkim  as_test_x='test -x'
504280297Sjkimelse
505280297Sjkim  if ls -dL / >/dev/null 2>&1; then
506280297Sjkim    as_ls_L_option=L
507280297Sjkim  else
508280297Sjkim    as_ls_L_option=
509280297Sjkim  fi
510280297Sjkim  as_test_x='
511280297Sjkim    eval sh -c '\''
512280297Sjkim      if test -d "$1"; then
513280297Sjkim	test -d "$1/.";
514280297Sjkim      else
515280297Sjkim	case $1 in #(
516280297Sjkim	-*)set "./$1";;
517280297Sjkim	esac;
518280297Sjkim	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519280297Sjkim	???[sx]*):;;*)false;;esac;fi
520280297Sjkim    '\'' sh
521280297Sjkim  '
522280297Sjkimfi
523280297Sjkimas_executable_p=$as_test_x
524280297Sjkim
525280297Sjkim# Sed expression to map a string onto a valid CPP name.
526280297Sjkimas_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527280297Sjkim
528280297Sjkim# Sed expression to map a string onto a valid variable name.
529280297Sjkimas_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530280297Sjkim
531280297Sjkim
532280297Sjkimtest -n "$DJDIR" || exec 7<&0 </dev/null
533280297Sjkimexec 6>&1
534280297Sjkim
535280297Sjkim# Name of the host.
536280297Sjkim# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537280297Sjkim# so uname gets run too.
538280297Sjkimac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539280297Sjkim
540280297Sjkim#
541280297Sjkim# Initializations.
542280297Sjkim#
543280297Sjkimac_default_prefix=/usr/local
544280297Sjkimac_clean_files=
545280297Sjkimac_config_libobj_dir=.
546280297SjkimLIBOBJS=
547280297Sjkimcross_compiling=no
548160814Ssimonsubdirs=
549280297SjkimMFLAGS=
550280297SjkimMAKEFLAGS=
551280297Sjkim
552280297Sjkim# Identity of this package.
553280297SjkimPACKAGE_NAME='OpenJDK'
554280297SjkimPACKAGE_TARNAME='openjdk'
555280297SjkimPACKAGE_VERSION='jdk8'
556280297SjkimPACKAGE_STRING='OpenJDK jdk8'
557280297SjkimPACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558280297SjkimPACKAGE_URL='http://openjdk.java.net'
559280297Sjkim
560280297Sjkim# Factoring default headers for most tests.
561280297Sjkimac_includes_default="\
562280297Sjkim#include <stdio.h>
563280297Sjkim#ifdef HAVE_SYS_TYPES_H
564280297Sjkim# include <sys/types.h>
565280297Sjkim#endif
566160814Ssimon#ifdef HAVE_SYS_STAT_H
567280297Sjkim# include <sys/stat.h>
568280297Sjkim#endif
569280297Sjkim#ifdef STDC_HEADERS
570280297Sjkim# include <stdlib.h>
571280297Sjkim# include <stddef.h>
572280297Sjkim#else
573160814Ssimon# ifdef HAVE_STDLIB_H
574280297Sjkim#  include <stdlib.h>
575280297Sjkim# endif
576160814Ssimon#endif
577280297Sjkim#ifdef HAVE_STRING_H
578280297Sjkim# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579160814Ssimon#  include <memory.h>
580280297Sjkim# endif
581280297Sjkim# include <string.h>
582280297Sjkim#endif
583280297Sjkim#ifdef HAVE_STRINGS_H
584280297Sjkim# include <strings.h>
585280297Sjkim#endif
586280297Sjkim#ifdef HAVE_INTTYPES_H
587280297Sjkim# include <inttypes.h>
588280297Sjkim#endif
589280297Sjkim#ifdef HAVE_STDINT_H
590280297Sjkim# include <stdint.h>
591280297Sjkim#endif
592280297Sjkim#ifdef HAVE_UNISTD_H
593280297Sjkim# include <unistd.h>
594280297Sjkim#endif"
595280297Sjkim
596280297Sjkimac_subst_vars='LTLIBOBJS
597280297SjkimLIBOBJS
598280297SjkimCCACHE
599280297SjkimUSE_PRECOMPILED_HEADER
600280297SjkimSJAVAC_SERVER_DIR
601280297SjkimENABLE_SJAVAC
602280297SjkimSJAVAC_SERVER_CORES
603280297SjkimSJAVAC_SERVER_JAVA
604280297SjkimMEMORY_SIZE
605280297SjkimCONCURRENT_BUILD_JOBS
606280297SjkimNUM_CORES
607280297SjkimSALIB_NAME
608280297SjkimHOTSPOT_MAKE_ARGS
609280297SjkimFIXPATH
610280297SjkimLIBCXX
611280297SjkimSTATIC_CXX_SETTING
612280297SjkimLIBDL
613280297SjkimLIBM
614280297SjkimLIBZIP_CAN_USE_MMAP
615280297SjkimUSE_EXTERNAL_LIBZ
616280297SjkimUSE_EXTERNAL_LIBGIF
617280297SjkimUSE_EXTERNAL_LIBJPEG
618280297SjkimALSA_LIBS
619280297SjkimALSA_CFLAGS
620280297SjkimFREETYPE2_LIB_PATH
621280297SjkimUSING_SYSTEM_FT_LIB
622314125SdelphijFREETYPE2_LIBS
623314125SdelphijFREETYPE2_CFLAGS
624314125SdelphijCUPS_CFLAGS
625280297SjkimOPENWIN_HOME
626280297SjkimX_EXTRA_LIBS
627280297SjkimX_LIBS
628280297SjkimX_PRE_LIBS
629280297SjkimX_CFLAGS
630280297SjkimXMKMF
631160814SsimonCXXFLAGS_DEBUG_SYMBOLS
632160814SsimonCFLAGS_DEBUG_SYMBOLS
633160814SsimonZIP_DEBUGINFO_FILES
634280297SjkimENABLE_DEBUG_SYMBOLS
635280297SjkimLDFLAGS_CXX_JDK
636280297SjkimLDFLAGS_JDKEXE_SUFFIX
637280297SjkimLDFLAGS_JDKLIB_SUFFIX
638280297SjkimLDFLAGS_JDKEXE
639280297SjkimLDFLAGS_JDKLIB
640280297SjkimCXXFLAGS_JDKEXE
641160814SsimonCXXFLAGS_JDKLIB
642280297SjkimCFLAGS_JDKEXE
643280297SjkimCFLAGS_JDKLIB
644280297SjkimMACOSX_VERSION_MIN
645280297SjkimPACKAGE_PATH
646280297SjkimLEGACY_EXTRA_LDFLAGS
647280297SjkimLEGACY_EXTRA_CXXFLAGS
648280297SjkimLEGACY_EXTRA_CFLAGS
649280297SjkimCXX_FLAG_DEPS
650280297SjkimC_FLAG_DEPS
651280297SjkimCXX_O_FLAG_NONE
652280297SjkimCXX_O_FLAG_NORM
653280297SjkimCXX_O_FLAG_HI
654280297SjkimCXX_O_FLAG_HIGHEST
655280297SjkimC_O_FLAG_NONE
656238405SjkimC_O_FLAG_NORM
657238405SjkimC_O_FLAG_HI
658280297SjkimC_O_FLAG_HIGHEST
659238405SjkimPOST_MCS_CMD
660238405SjkimPOST_STRIP_CMD
661160814SsimonSET_EXECUTABLE_ORIGIN
662SET_SHARED_LIBRARY_ORIGIN
663CXX_FLAG_REORDER
664C_FLAG_REORDER
665SET_SHARED_LIBRARY_MAPFILE
666SET_SHARED_LIBRARY_NAME
667SHARED_LIBRARY_FLAGS
668EXE_SUFFIX
669STATIC_LIBRARY_SUFFIX
670SHARED_LIBRARY_SUFFIX
671LIBRARY_PREFIX
672STATIC_LIBRARY
673SHARED_LIBRARY
674OBJ_SUFFIX
675LIPO
676ac_ct_OBJDUMP
677OBJDUMP
678ac_ct_OBJCOPY
679OBJCOPY
680MCS
681STRIP
682NM
683AS
684CXXCPP
685CPP
686COMPILER_TYPE
687RC_FLAGS
688DUMPBIN
689WINAR
690HOTSPOT_RC
691HOTSPOT_MT
692RC
693MT
694WINLD
695HOTSPOT_LD
696HOTSPOT_CXX
697ARFLAGS
698AR
699LDEXECXX
700LDCXX
701LDEXE
702LD
703ac_ct_OBJC
704OBJCFLAGS
705OBJC
706ac_ct_CXX
707CXXFLAGS
708CXX
709ac_ct_PROPER_COMPILER_CXX
710PROPER_COMPILER_CXX
711POTENTIAL_CXX
712TOOLS_DIR_CXX
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720ac_ct_PROPER_COMPILER_CC
721PROPER_COMPILER_CC
722POTENTIAL_CC
723TOOLS_DIR_CC
724BUILD_LD
725BUILD_CXX
726BUILD_CC
727MSVCR_DLL
728VS_PATH
729VS_LIB
730VS_INCLUDE
731CYGWIN_LINK
732AR_OUT_OPTION
733LD_OUT_OPTION
734EXE_OUT_OPTION
735CC_OUT_OPTION
736BUILD_HOTSPOT
737HOTSPOT_DIST
738BUILD_OUTPUT
739OVERRIDE_SRC_ROOT
740ADD_SRC_ROOT
741JDK_TOPDIR
742HOTSPOT_TOPDIR
743JAXWS_TOPDIR
744JAXP_TOPDIR
745CORBA_TOPDIR
746LANGTOOLS_TOPDIR
747BOOT_JDK_JVMARGS
748JAVAC_FLAGS
749BOOT_JDK_SOURCETARGET
750BOOT_JDK
751BOOT_TOOLSJAR
752BOOT_RTJAR
753JAVA_CHECK
754JAVAC_CHECK
755COOKED_BUILD_NUMBER
756JDK_VERSION
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771USER_RELEASE_SUFFIX
772COMPRESS_JARS
773UNLIMITED_CRYPTO
774CACERTS_FILE
775TEST_IN_BUILD
776BUILD_HEADLESS
777SUPPORT_HEADFUL
778SUPPORT_HEADLESS
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785TIME
786STAT
787HG
788READELF
789OTOOL
790LDD
791ZIP
792UNZIP
793FIND_DELETE
794MAKE
795CHECK_TOOLSDIR_MAKE
796CHECK_TOOLSDIR_GMAKE
797CHECK_MAKE
798CHECK_GMAKE
799PKGHANDLER
800OUTPUT_ROOT
801CONF_NAME
802SPEC
803BUILD_VARIANT_RELEASE
804DEBUG_CLASSFILES
805FASTDEBUG
806VARIANT
807DEBUG_LEVEL
808MACOSX_UNIVERSAL
809JVM_VARIANT_ZEROSHARK
810JVM_VARIANT_ZERO
811JVM_VARIANT_KERNEL
812JVM_VARIANT_MINIMAL1
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817SET_OPENJDK
818BUILD_LOG_WRAPPER
819BUILD_LOG_PREVIOUS
820BUILD_LOG
821SYS_ROOT
822PATH_SEP
823SRC_ROOT
824DEFINE_CROSS_COMPILE_ARCH
825LP64
826OPENJDK_TARGET_OS_API_DIR
827OPENJDK_TARGET_CPU_JLI_CFLAGS
828OPENJDK_TARGET_CPU_OSARCH
829OPENJDK_TARGET_CPU_ISADIR
830OPENJDK_TARGET_CPU_LIBDIR
831OPENJDK_TARGET_CPU_LEGACY_LIB
832OPENJDK_TARGET_CPU_LEGACY
833REQUIRED_OS_VERSION
834REQUIRED_OS_NAME
835COMPILE_TYPE
836OPENJDK_TARGET_CPU_ENDIAN
837OPENJDK_TARGET_CPU_BITS
838OPENJDK_TARGET_CPU_ARCH
839OPENJDK_TARGET_CPU
840OPENJDK_TARGET_OS_API
841OPENJDK_TARGET_OS
842OPENJDK_BUILD_CPU_ENDIAN
843OPENJDK_BUILD_CPU_BITS
844OPENJDK_BUILD_CPU_ARCH
845OPENJDK_BUILD_CPU
846OPENJDK_BUILD_OS_API
847OPENJDK_BUILD_OS
848OPENJDK_BUILD_AUTOCONF_NAME
849OPENJDK_TARGET_AUTOCONF_NAME
850target_os
851target_vendor
852target_cpu
853target
854host_os
855host_vendor
856host_cpu
857host
858build_os
859build_vendor
860build_cpu
861build
862SETFILE
863DF
864READLINK
865CYGPATH
866NAWK
867SED
868FGREP
869EGREP
870GREP
871AWK
872XARGS
873WHICH
874WC
875UNIQ
876UNAME
877TR
878TOUCH
879TEE
880TAR
881TAIL
882SORT
883SH
884RM
885THEPWDCMD
886PRINTF
887MV
888MKTEMP
889MKDIR
890LS
891LN
892HEAD
893FIND
894FILE
895EXPR
896ECHO
897DIRNAME
898DIFF
899DATE
900CUT
901CPIO
902CP
903COMM
904CMP
905CHMOD
906CAT
907BASH
908BASENAME
909DATE_WHEN_CONFIGURED
910CONFIGURE_COMMAND_LINE
911CUSTOM_MAKE_DIR
912target_alias
913host_alias
914build_alias
915LIBS
916ECHO_T
917ECHO_N
918ECHO_C
919DEFS
920mandir
921localedir
922libdir
923psdir
924pdfdir
925dvidir
926htmldir
927infodir
928docdir
929oldincludedir
930includedir
931localstatedir
932sharedstatedir
933sysconfdir
934datadir
935datarootdir
936libexecdir
937sbindir
938bindir
939program_transform_name
940prefix
941exec_prefix
942PACKAGE_URL
943PACKAGE_BUGREPORT
944PACKAGE_STRING
945PACKAGE_VERSION
946PACKAGE_TARNAME
947PACKAGE_NAME
948PATH_SEPARATOR
949SHELL'
950ac_subst_files=''
951ac_user_opts='
952enable_option_checking
953with_custom_make_dir
954with_target_bits
955with_sys_root
956with_tools_dir
957with_devkit
958enable_openjdk_only
959with_jdk_variant
960with_jvm_variants
961enable_debug
962with_debug_level
963with_conf_name
964with_builddeps_conf
965with_builddeps_server
966with_builddeps_dir
967with_builddeps_group
968enable_headful
969enable_hotspot_test_in_build
970with_cacerts_file
971enable_unlimited_crypto
972with_milestone
973with_build_number
974with_user_release_suffix
975with_boot_jdk
976with_boot_jdk_jvmargs
977with_add_source_root
978with_override_source_root
979with_adds_and_overrides
980with_override_langtools
981with_override_corba
982with_override_jaxp
983with_override_jaxws
984with_override_hotspot
985with_override_jdk
986with_import_hotspot
987with_msvcr_dll
988with_extra_cflags
989with_extra_cxxflags
990with_extra_ldflags
991enable_debug_symbols
992enable_zip_debug_info
993enable_macosx_runtime_support
994with_x
995with_cups
996with_cups_include
997with_freetype
998with_alsa
999with_alsa_include
1000with_alsa_lib
1001with_zlib
1002with_stdc__lib
1003with_num_cores
1004with_memory_size
1005with_sjavac_server_java
1006with_sjavac_server_cores
1007enable_sjavac
1008enable_precompiled_headers
1009enable_ccache
1010with_ccache_dir
1011'
1012      ac_precious_vars='build_alias
1013host_alias
1014target_alias
1015PKG_CONFIG
1016CC
1017CFLAGS
1018LDFLAGS
1019LIBS
1020CPPFLAGS
1021CXX
1022CXXFLAGS
1023CCC
1024OBJC
1025OBJCFLAGS
1026CPP
1027CXXCPP
1028XMKMF
1029FREETYPE2_CFLAGS
1030FREETYPE2_LIBS
1031ALSA_CFLAGS
1032ALSA_LIBS'
1033
1034
1035# Initialize some variables set by options.
1036ac_init_help=
1037ac_init_version=false
1038ac_unrecognized_opts=
1039ac_unrecognized_sep=
1040# The variables have the same names as the options, with
1041# dashes changed to underlines.
1042cache_file=/dev/null
1043exec_prefix=NONE
1044no_create=
1045no_recursion=
1046prefix=NONE
1047program_prefix=NONE
1048program_suffix=NONE
1049program_transform_name=s,x,x,
1050silent=
1051site=
1052srcdir=
1053verbose=
1054x_includes=NONE
1055x_libraries=NONE
1056
1057# Installation directory options.
1058# These are left unexpanded so users can "make install exec_prefix=/foo"
1059# and all the variables that are supposed to be based on exec_prefix
1060# by default will actually change.
1061# Use braces instead of parens because sh, perl, etc. also accept them.
1062# (The list follows the same order as the GNU Coding Standards.)
1063bindir='${exec_prefix}/bin'
1064sbindir='${exec_prefix}/sbin'
1065libexecdir='${exec_prefix}/libexec'
1066datarootdir='${prefix}/share'
1067datadir='${datarootdir}'
1068sysconfdir='${prefix}/etc'
1069sharedstatedir='${prefix}/com'
1070localstatedir='${prefix}/var'
1071includedir='${prefix}/include'
1072oldincludedir='/usr/include'
1073docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1074infodir='${datarootdir}/info'
1075htmldir='${docdir}'
1076dvidir='${docdir}'
1077pdfdir='${docdir}'
1078psdir='${docdir}'
1079libdir='${exec_prefix}/lib'
1080localedir='${datarootdir}/locale'
1081mandir='${datarootdir}/man'
1082
1083ac_prev=
1084ac_dashdash=
1085for ac_option
1086do
1087  # If the previous option needs an argument, assign it.
1088  if test -n "$ac_prev"; then
1089    eval $ac_prev=\$ac_option
1090    ac_prev=
1091    continue
1092  fi
1093
1094  case $ac_option in
1095  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1096  *=)   ac_optarg= ;;
1097  *)    ac_optarg=yes ;;
1098  esac
1099
1100  # Accept the important Cygnus configure options, so we can diagnose typos.
1101
1102  case $ac_dashdash$ac_option in
1103  --)
1104    ac_dashdash=yes ;;
1105
1106  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1107    ac_prev=bindir ;;
1108  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1109    bindir=$ac_optarg ;;
1110
1111  -build | --build | --buil | --bui | --bu)
1112    ac_prev=build_alias ;;
1113  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1114    build_alias=$ac_optarg ;;
1115
1116  -cache-file | --cache-file | --cache-fil | --cache-fi \
1117  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1118    ac_prev=cache_file ;;
1119  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1120  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1121    cache_file=$ac_optarg ;;
1122
1123  --config-cache | -C)
1124    cache_file=config.cache ;;
1125
1126  -datadir | --datadir | --datadi | --datad)
1127    ac_prev=datadir ;;
1128  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1129    datadir=$ac_optarg ;;
1130
1131  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1132  | --dataroo | --dataro | --datar)
1133    ac_prev=datarootdir ;;
1134  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1135  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1136    datarootdir=$ac_optarg ;;
1137
1138  -disable-* | --disable-*)
1139    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1140    # Reject names that are not valid shell variable names.
1141    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142      as_fn_error $? "invalid feature name: $ac_useropt"
1143    ac_useropt_orig=$ac_useropt
1144    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145    case $ac_user_opts in
1146      *"
1147"enable_$ac_useropt"
1148"*) ;;
1149      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1150	 ac_unrecognized_sep=', ';;
1151    esac
1152    eval enable_$ac_useropt=no ;;
1153
1154  -docdir | --docdir | --docdi | --doc | --do)
1155    ac_prev=docdir ;;
1156  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1157    docdir=$ac_optarg ;;
1158
1159  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1160    ac_prev=dvidir ;;
1161  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1162    dvidir=$ac_optarg ;;
1163
1164  -enable-* | --enable-*)
1165    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1166    # Reject names that are not valid shell variable names.
1167    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1168      as_fn_error $? "invalid feature name: $ac_useropt"
1169    ac_useropt_orig=$ac_useropt
1170    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1171    case $ac_user_opts in
1172      *"
1173"enable_$ac_useropt"
1174"*) ;;
1175      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1176	 ac_unrecognized_sep=', ';;
1177    esac
1178    eval enable_$ac_useropt=\$ac_optarg ;;
1179
1180  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1181  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1182  | --exec | --exe | --ex)
1183    ac_prev=exec_prefix ;;
1184  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1185  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1186  | --exec=* | --exe=* | --ex=*)
1187    exec_prefix=$ac_optarg ;;
1188
1189  -gas | --gas | --ga | --g)
1190    # Obsolete; use --with-gas.
1191    with_gas=yes ;;
1192
1193  -help | --help | --hel | --he | -h)
1194    ac_init_help=long ;;
1195  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1196    ac_init_help=recursive ;;
1197  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1198    ac_init_help=short ;;
1199
1200  -host | --host | --hos | --ho)
1201    ac_prev=host_alias ;;
1202  -host=* | --host=* | --hos=* | --ho=*)
1203    host_alias=$ac_optarg ;;
1204
1205  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1206    ac_prev=htmldir ;;
1207  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1208  | --ht=*)
1209    htmldir=$ac_optarg ;;
1210
1211  -includedir | --includedir | --includedi | --included | --include \
1212  | --includ | --inclu | --incl | --inc)
1213    ac_prev=includedir ;;
1214  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1215  | --includ=* | --inclu=* | --incl=* | --inc=*)
1216    includedir=$ac_optarg ;;
1217
1218  -infodir | --infodir | --infodi | --infod | --info | --inf)
1219    ac_prev=infodir ;;
1220  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1221    infodir=$ac_optarg ;;
1222
1223  -libdir | --libdir | --libdi | --libd)
1224    ac_prev=libdir ;;
1225  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1226    libdir=$ac_optarg ;;
1227
1228  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1229  | --libexe | --libex | --libe)
1230    ac_prev=libexecdir ;;
1231  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1232  | --libexe=* | --libex=* | --libe=*)
1233    libexecdir=$ac_optarg ;;
1234
1235  -localedir | --localedir | --localedi | --localed | --locale)
1236    ac_prev=localedir ;;
1237  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1238    localedir=$ac_optarg ;;
1239
1240  -localstatedir | --localstatedir | --localstatedi | --localstated \
1241  | --localstate | --localstat | --localsta | --localst | --locals)
1242    ac_prev=localstatedir ;;
1243  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1244  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1245    localstatedir=$ac_optarg ;;
1246
1247  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1248    ac_prev=mandir ;;
1249  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1250    mandir=$ac_optarg ;;
1251
1252  -nfp | --nfp | --nf)
1253    # Obsolete; use --without-fp.
1254    with_fp=no ;;
1255
1256  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1257  | --no-cr | --no-c | -n)
1258    no_create=yes ;;
1259
1260  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1261  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1262    no_recursion=yes ;;
1263
1264  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1265  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1266  | --oldin | --oldi | --old | --ol | --o)
1267    ac_prev=oldincludedir ;;
1268  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1269  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1270  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1271    oldincludedir=$ac_optarg ;;
1272
1273  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1274    ac_prev=prefix ;;
1275  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1276    prefix=$ac_optarg ;;
1277
1278  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1279  | --program-pre | --program-pr | --program-p)
1280    ac_prev=program_prefix ;;
1281  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1282  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1283    program_prefix=$ac_optarg ;;
1284
1285  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1286  | --program-suf | --program-su | --program-s)
1287    ac_prev=program_suffix ;;
1288  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1289  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1290    program_suffix=$ac_optarg ;;
1291
1292  -program-transform-name | --program-transform-name \
1293  | --program-transform-nam | --program-transform-na \
1294  | --program-transform-n | --program-transform- \
1295  | --program-transform | --program-transfor \
1296  | --program-transfo | --program-transf \
1297  | --program-trans | --program-tran \
1298  | --progr-tra | --program-tr | --program-t)
1299    ac_prev=program_transform_name ;;
1300  -program-transform-name=* | --program-transform-name=* \
1301  | --program-transform-nam=* | --program-transform-na=* \
1302  | --program-transform-n=* | --program-transform-=* \
1303  | --program-transform=* | --program-transfor=* \
1304  | --program-transfo=* | --program-transf=* \
1305  | --program-trans=* | --program-tran=* \
1306  | --progr-tra=* | --program-tr=* | --program-t=*)
1307    program_transform_name=$ac_optarg ;;
1308
1309  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1310    ac_prev=pdfdir ;;
1311  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1312    pdfdir=$ac_optarg ;;
1313
1314  -psdir | --psdir | --psdi | --psd | --ps)
1315    ac_prev=psdir ;;
1316  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1317    psdir=$ac_optarg ;;
1318
1319  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1320  | -silent | --silent | --silen | --sile | --sil)
1321    silent=yes ;;
1322
1323  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1324    ac_prev=sbindir ;;
1325  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1326  | --sbi=* | --sb=*)
1327    sbindir=$ac_optarg ;;
1328
1329  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1330  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1331  | --sharedst | --shareds | --shared | --share | --shar \
1332  | --sha | --sh)
1333    ac_prev=sharedstatedir ;;
1334  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1335  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1336  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1337  | --sha=* | --sh=*)
1338    sharedstatedir=$ac_optarg ;;
1339
1340  -site | --site | --sit)
1341    ac_prev=site ;;
1342  -site=* | --site=* | --sit=*)
1343    site=$ac_optarg ;;
1344
1345  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1346    ac_prev=srcdir ;;
1347  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1348    srcdir=$ac_optarg ;;
1349
1350  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1351  | --syscon | --sysco | --sysc | --sys | --sy)
1352    ac_prev=sysconfdir ;;
1353  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1354  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1355    sysconfdir=$ac_optarg ;;
1356
1357  -target | --target | --targe | --targ | --tar | --ta | --t)
1358    ac_prev=target_alias ;;
1359  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1360    target_alias=$ac_optarg ;;
1361
1362  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1363    verbose=yes ;;
1364
1365  -version | --version | --versio | --versi | --vers | -V)
1366    ac_init_version=: ;;
1367
1368  -with-* | --with-*)
1369    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1370    # Reject names that are not valid shell variable names.
1371    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1372      as_fn_error $? "invalid package name: $ac_useropt"
1373    ac_useropt_orig=$ac_useropt
1374    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375    case $ac_user_opts in
1376      *"
1377"with_$ac_useropt"
1378"*) ;;
1379      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1380	 ac_unrecognized_sep=', ';;
1381    esac
1382    eval with_$ac_useropt=\$ac_optarg ;;
1383
1384  -without-* | --without-*)
1385    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1386    # Reject names that are not valid shell variable names.
1387    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1388      as_fn_error $? "invalid package name: $ac_useropt"
1389    ac_useropt_orig=$ac_useropt
1390    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1391    case $ac_user_opts in
1392      *"
1393"with_$ac_useropt"
1394"*) ;;
1395      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1396	 ac_unrecognized_sep=', ';;
1397    esac
1398    eval with_$ac_useropt=no ;;
1399
1400  --x)
1401    # Obsolete; use --with-x.
1402    with_x=yes ;;
1403
1404  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1405  | --x-incl | --x-inc | --x-in | --x-i)
1406    ac_prev=x_includes ;;
1407  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1408  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1409    x_includes=$ac_optarg ;;
1410
1411  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1412  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1413    ac_prev=x_libraries ;;
1414  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1415  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1416    x_libraries=$ac_optarg ;;
1417
1418  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1419Try \`$0 --help' for more information"
1420    ;;
1421
1422  *=*)
1423    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1424    # Reject names that are not valid shell variable names.
1425    case $ac_envvar in #(
1426      '' | [0-9]* | *[!_$as_cr_alnum]* )
1427      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1428    esac
1429    eval $ac_envvar=\$ac_optarg
1430    export $ac_envvar ;;
1431
1432  *)
1433    # FIXME: should be removed in autoconf 3.0.
1434    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1435    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1436      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1437    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1438    ;;
1439
1440  esac
1441done
1442
1443if test -n "$ac_prev"; then
1444  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1445  as_fn_error $? "missing argument to $ac_option"
1446fi
1447
1448if test -n "$ac_unrecognized_opts"; then
1449  case $enable_option_checking in
1450    no) ;;
1451    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1452    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1453  esac
1454fi
1455
1456# Check all directory arguments for consistency.
1457for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1458		datadir sysconfdir sharedstatedir localstatedir includedir \
1459		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1460		libdir localedir mandir
1461do
1462  eval ac_val=\$$ac_var
1463  # Remove trailing slashes.
1464  case $ac_val in
1465    */ )
1466      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1467      eval $ac_var=\$ac_val;;
1468  esac
1469  # Be sure to have absolute directory names.
1470  case $ac_val in
1471    [\\/$]* | ?:[\\/]* )  continue;;
1472    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1473  esac
1474  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1475done
1476
1477# There might be people who depend on the old broken behavior: `$host'
1478# used to hold the argument of --host etc.
1479# FIXME: To remove some day.
1480build=$build_alias
1481host=$host_alias
1482target=$target_alias
1483
1484# FIXME: To remove some day.
1485if test "x$host_alias" != x; then
1486  if test "x$build_alias" = x; then
1487    cross_compiling=maybe
1488    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1489    If a cross compiler is detected then cross compile mode will be used" >&2
1490  elif test "x$build_alias" != "x$host_alias"; then
1491    cross_compiling=yes
1492  fi
1493fi
1494
1495ac_tool_prefix=
1496test -n "$host_alias" && ac_tool_prefix=$host_alias-
1497
1498test "$silent" = yes && exec 6>/dev/null
1499
1500
1501ac_pwd=`pwd` && test -n "$ac_pwd" &&
1502ac_ls_di=`ls -di .` &&
1503ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1504  as_fn_error $? "working directory cannot be determined"
1505test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1506  as_fn_error $? "pwd does not report name of working directory"
1507
1508
1509# Find the source files, if location was not specified.
1510if test -z "$srcdir"; then
1511  ac_srcdir_defaulted=yes
1512  # Try the directory containing this script, then the parent directory.
1513  ac_confdir=`$as_dirname -- "$as_myself" ||
1514$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1515	 X"$as_myself" : 'X\(//\)[^/]' \| \
1516	 X"$as_myself" : 'X\(//\)$' \| \
1517	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1518$as_echo X"$as_myself" |
1519    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)[^/].*/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\/\)$/{
1528	    s//\1/
1529	    q
1530	  }
1531	  /^X\(\/\).*/{
1532	    s//\1/
1533	    q
1534	  }
1535	  s/.*/./; q'`
1536  srcdir=$ac_confdir
1537  if test ! -r "$srcdir/$ac_unique_file"; then
1538    srcdir=..
1539  fi
1540else
1541  ac_srcdir_defaulted=no
1542fi
1543if test ! -r "$srcdir/$ac_unique_file"; then
1544  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1545  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1546fi
1547ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1548ac_abs_confdir=`(
1549	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1550	pwd)`
1551# When building in place, set srcdir=.
1552if test "$ac_abs_confdir" = "$ac_pwd"; then
1553  srcdir=.
1554fi
1555# Remove unnecessary trailing slashes from srcdir.
1556# Double slashes in file names in object file debugging info
1557# mess up M-x gdb in Emacs.
1558case $srcdir in
1559*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1560esac
1561for ac_var in $ac_precious_vars; do
1562  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1563  eval ac_env_${ac_var}_value=\$${ac_var}
1564  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1565  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1566done
1567
1568#
1569# Report the --help message.
1570#
1571if test "$ac_init_help" = "long"; then
1572  # Omit some internal or obsolete options to make the list less imposing.
1573  # This message is too long to be a string in the A/UX 3.1 sh.
1574  cat <<_ACEOF
1575\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1576
1577Usage: $0 [OPTION]... [VAR=VALUE]...
1578
1579To assign environment variables (e.g., CC, CFLAGS...), specify them as
1580VAR=VALUE.  See below for descriptions of some of the useful variables.
1581
1582Defaults for the options are specified in brackets.
1583
1584Configuration:
1585  -h, --help              display this help and exit
1586      --help=short        display options specific to this package
1587      --help=recursive    display the short help of all the included packages
1588  -V, --version           display version information and exit
1589  -q, --quiet, --silent   do not print \`checking ...' messages
1590      --cache-file=FILE   cache test results in FILE [disabled]
1591  -C, --config-cache      alias for \`--cache-file=config.cache'
1592  -n, --no-create         do not create output files
1593      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1594
1595Installation directories:
1596  --prefix=PREFIX         install architecture-independent files in PREFIX
1597                          [$ac_default_prefix]
1598  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1599                          [PREFIX]
1600
1601By default, \`make install' will install all the files in
1602\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1603an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1604for instance \`--prefix=\$HOME'.
1605
1606For better control, use the options below.
1607
1608Fine tuning of the installation directories:
1609  --bindir=DIR            user executables [EPREFIX/bin]
1610  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1611  --libexecdir=DIR        program executables [EPREFIX/libexec]
1612  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1613  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1614  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1615  --libdir=DIR            object code libraries [EPREFIX/lib]
1616  --includedir=DIR        C header files [PREFIX/include]
1617  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1618  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1619  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1620  --infodir=DIR           info documentation [DATAROOTDIR/info]
1621  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1622  --mandir=DIR            man documentation [DATAROOTDIR/man]
1623  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1624  --htmldir=DIR           html documentation [DOCDIR]
1625  --dvidir=DIR            dvi documentation [DOCDIR]
1626  --pdfdir=DIR            pdf documentation [DOCDIR]
1627  --psdir=DIR             ps documentation [DOCDIR]
1628_ACEOF
1629
1630  cat <<\_ACEOF
1631
1632X features:
1633  --x-includes=DIR    X include files are in DIR
1634  --x-libraries=DIR   X library files are in DIR
1635
1636System types:
1637  --build=BUILD     configure for building on BUILD [guessed]
1638  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1639  --target=TARGET   configure for building compilers for TARGET [HOST]
1640_ACEOF
1641fi
1642
1643if test -n "$ac_init_help"; then
1644  case $ac_init_help in
1645     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1646   esac
1647  cat <<\_ACEOF
1648
1649Optional Features:
1650  --disable-option-checking  ignore unrecognized --enable/--with options
1651  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1652  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1653  --enable-openjdk-only   suppress building custom source even if present
1654                          [disabled]
1655  --enable-debug          set the debug level to fastdebug (shorthand for
1656                          --with-debug-level=fastdebug) [disabled]
1657  --disable-headful       disable building headful support (graphical UI
1658                          support) [enabled]
1659  --enable-hotspot-test-in-build
1660                          run the Queens test after Hotspot build [disabled]
1661  --enable-unlimited-crypto
1662                          Enable unlimited crypto policy [disabled]
1663  --disable-debug-symbols disable generation of debug symbols [enabled]
1664  --disable-zip-debug-info
1665                          disable zipping of debug-info files [enabled]
1666  --disable-macosx-runtime-support
1667                          disable the use of MacOSX Java runtime support
1668                          framework [enabled]
1669  --enable-sjavac         use sjavac to do fast incremental compiles
1670                          [disabled]
1671  --disable-precompiled-headers
1672                          disable using precompiled headers when compiling C++
1673                          [enabled]
1674  --disable-ccache        disable using ccache to speed up recompilations
1675                          [enabled]
1676
1677Optional Packages:
1678  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1679  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1680  --with-custom-make-dir  use this directory for custom build/make files
1681  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1682                          support it), e.g. --with-target-bits=32 [guessed]
1683  --with-sys-root         pass this sys-root to the compilers and tools (for
1684                          cross-compiling)
1685  --with-tools-dir        search this directory for compilers and tools (for
1686                          cross-compiling)
1687  --with-devkit           use this directory as base for tools-dir and
1688                          sys-root (for cross-compiling)
1689  --with-jdk-variant      JDK variant to build (normal) [normal]
1690  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1691                          client, minimal1, kernel, zero, zeroshark) [server]
1692  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1693                          [release]
1694  --with-conf-name        use this as the name of the configuration [generated
1695                          from important configuration options]
1696  --with-builddeps-conf   use this configuration file for the builddeps
1697  --with-builddeps-server download and use build dependencies from this server
1698                          url
1699  --with-builddeps-dir    store downloaded build dependencies here
1700                          [/localhome/builddeps]
1701  --with-builddeps-group  chgrp the downloaded build dependencies to this
1702                          group
1703  --with-cacerts-file     specify alternative cacerts file
1704  --with-milestone        Set milestone value for build [internal]
1705  --with-build-number     Set build number value for build [b00]
1706  --with-user-release-suffix
1707                          Add a custom string to the version string if build
1708                          number isn't set.[username_builddateb00]
1709  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1710  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1711                          invocations of the Boot JDK, overriding the default
1712                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1713                          -enableassertions"
1714  --with-add-source-root  for each and every source directory, look in this
1715                          additional source root for the same directory; if it
1716                          exists and have files in it, include it in the build
1717  --with-override-source-root
1718                          for each and every source directory, look in this
1719                          override source root for the same directory; if it
1720                          exists, use that directory instead and ignore the
1721                          directory in the original source root
1722  --with-adds-and-overrides
1723                          use the subdirs 'adds' and 'overrides' in the
1724                          specified directory as add-source-root and
1725                          override-source-root
1726  --with-override-langtools
1727                          use this langtools dir for the build
1728  --with-override-corba   use this corba dir for the build
1729  --with-override-jaxp    use this jaxp dir for the build
1730  --with-override-jaxws   use this jaxws dir for the build
1731  --with-override-hotspot use this hotspot dir for the build
1732  --with-override-jdk     use this jdk dir for the build
1733  --with-import-hotspot   import hotspot binaries from this jdk image or
1734                          hotspot build dist dir instead of building from
1735                          source
1736  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1737                          only) [probed]
1738  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1739  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1740  --with-extra-ldflags    extra flags to be used when linking jdk
1741  --with-x                use the X Window System
1742  --with-cups             specify prefix directory for the cups package
1743                          (expecting the headers under PATH/include)
1744  --with-cups-include     specify directory for the cups include files
1745  --with-freetype         specify prefix directory for the freetype2 package
1746                          (expecting the libraries under PATH/lib and the
1747                          headers under PATH/include)
1748  --with-alsa             specify prefix directory for the alsa package
1749                          (expecting the libraries under PATH/lib and the
1750                          headers under PATH/include)
1751  --with-alsa-include     specify directory for the alsa include files
1752  --with-alsa-lib         specify directory for the alsa library
1753  --with-zlib             use zlib from build system or OpenJDK source
1754                          (system, bundled) [bundled]
1755  --with-stdc++lib=<static>,<dynamic>,<default>
1756                          force linking of the C++ runtime on Linux to either
1757                          static or dynamic, default is static with dynamic as
1758                          fallback
1759  --with-num-cores        number of cores in the build system, e.g.
1760                          --with-num-cores=8 [probed]
1761  --with-memory-size      memory (in MB) available in the build system, e.g.
1762                          --with-memory-size=1024 [probed]
1763  --with-sjavac-server-java
1764                          use this java binary for running the sjavac
1765                          background server [Boot JDK java]
1766  --with-sjavac-server-cores
1767                          use at most this number of concurrent threads on the
1768                          sjavac server [probed]
1769  --with-ccache-dir       where to store ccache files [~/.ccache]
1770
1771Some influential environment variables:
1772  PKG_CONFIG  path to pkg-config utility
1773  CC          C compiler command
1774  CFLAGS      C compiler flags
1775  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1776              nonstandard directory <lib dir>
1777  LIBS        libraries to pass to the linker, e.g. -l<library>
1778  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1779              you have headers in a nonstandard directory <include dir>
1780  CXX         C++ compiler command
1781  CXXFLAGS    C++ compiler flags
1782  OBJC        Objective C compiler command
1783  OBJCFLAGS   Objective C compiler flags
1784  CPP         C preprocessor
1785  CXXCPP      C++ preprocessor
1786  XMKMF       Path to xmkmf, Makefile generator for X Window System
1787  FREETYPE2_CFLAGS
1788              C compiler flags for FREETYPE2, overriding pkg-config
1789  FREETYPE2_LIBS
1790              linker flags for FREETYPE2, overriding pkg-config
1791  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1792  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1793
1794Use these variables to override the choices made by `configure' or to help
1795it to find libraries and programs with nonstandard names/locations.
1796
1797Report bugs to <build-dev@openjdk.java.net>.
1798OpenJDK home page: <http://openjdk.java.net>.
1799_ACEOF
1800ac_status=$?
1801fi
1802
1803if test "$ac_init_help" = "recursive"; then
1804  # If there are subdirs, report their specific --help.
1805  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1806    test -d "$ac_dir" ||
1807      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1808      continue
1809    ac_builddir=.
1810
1811case "$ac_dir" in
1812.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1813*)
1814  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1815  # A ".." for each directory in $ac_dir_suffix.
1816  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1817  case $ac_top_builddir_sub in
1818  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1819  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1820  esac ;;
1821esac
1822ac_abs_top_builddir=$ac_pwd
1823ac_abs_builddir=$ac_pwd$ac_dir_suffix
1824# for backward compatibility:
1825ac_top_builddir=$ac_top_build_prefix
1826
1827case $srcdir in
1828  .)  # We are building in place.
1829    ac_srcdir=.
1830    ac_top_srcdir=$ac_top_builddir_sub
1831    ac_abs_top_srcdir=$ac_pwd ;;
1832  [\\/]* | ?:[\\/]* )  # Absolute name.
1833    ac_srcdir=$srcdir$ac_dir_suffix;
1834    ac_top_srcdir=$srcdir
1835    ac_abs_top_srcdir=$srcdir ;;
1836  *) # Relative name.
1837    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1838    ac_top_srcdir=$ac_top_build_prefix$srcdir
1839    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1840esac
1841ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1842
1843    cd "$ac_dir" || { ac_status=$?; continue; }
1844    # Check for guested configure.
1845    if test -f "$ac_srcdir/configure.gnu"; then
1846      echo &&
1847      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1848    elif test -f "$ac_srcdir/configure"; then
1849      echo &&
1850      $SHELL "$ac_srcdir/configure" --help=recursive
1851    else
1852      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1853    fi || ac_status=$?
1854    cd "$ac_pwd" || { ac_status=$?; break; }
1855  done
1856fi
1857
1858test -n "$ac_init_help" && exit $ac_status
1859if $ac_init_version; then
1860  cat <<\_ACEOF
1861OpenJDK configure jdk8
1862generated by GNU Autoconf 2.67
1863
1864Copyright (C) 2010 Free Software Foundation, Inc.
1865This configure script is free software; the Free Software Foundation
1866gives unlimited permission to copy, distribute and modify it.
1867_ACEOF
1868  exit
1869fi
1870
1871## ------------------------ ##
1872## Autoconf initialization. ##
1873## ------------------------ ##
1874
1875# ac_fn_c_try_compile LINENO
1876# --------------------------
1877# Try to compile conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_compile ()
1879{
1880  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881  rm -f conftest.$ac_objext
1882  if { { ac_try="$ac_compile"
1883case "(($ac_try" in
1884  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885  *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889  (eval "$ac_compile") 2>conftest.err
1890  ac_status=$?
1891  if test -s conftest.err; then
1892    grep -v '^ *+' conftest.err >conftest.er1
1893    cat conftest.er1 >&5
1894    mv -f conftest.er1 conftest.err
1895  fi
1896  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897  test $ac_status = 0; } && {
1898	 test -z "$ac_c_werror_flag" ||
1899	 test ! -s conftest.err
1900       } && test -s conftest.$ac_objext; then :
1901  ac_retval=0
1902else
1903  $as_echo "$as_me: failed program was:" >&5
1904sed 's/^/| /' conftest.$ac_ext >&5
1905
1906	ac_retval=1
1907fi
1908  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1909  as_fn_set_status $ac_retval
1910
1911} # ac_fn_c_try_compile
1912
1913# ac_fn_cxx_try_compile LINENO
1914# ----------------------------
1915# Try to compile conftest.$ac_ext, and return whether this succeeded.
1916ac_fn_cxx_try_compile ()
1917{
1918  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919  rm -f conftest.$ac_objext
1920  if { { ac_try="$ac_compile"
1921case "(($ac_try" in
1922  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1923  *) ac_try_echo=$ac_try;;
1924esac
1925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1926$as_echo "$ac_try_echo"; } >&5
1927  (eval "$ac_compile") 2>conftest.err
1928  ac_status=$?
1929  if test -s conftest.err; then
1930    grep -v '^ *+' conftest.err >conftest.er1
1931    cat conftest.er1 >&5
1932    mv -f conftest.er1 conftest.err
1933  fi
1934  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1935  test $ac_status = 0; } && {
1936	 test -z "$ac_cxx_werror_flag" ||
1937	 test ! -s conftest.err
1938       } && test -s conftest.$ac_objext; then :
1939  ac_retval=0
1940else
1941  $as_echo "$as_me: failed program was:" >&5
1942sed 's/^/| /' conftest.$ac_ext >&5
1943
1944	ac_retval=1
1945fi
1946  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1947  as_fn_set_status $ac_retval
1948
1949} # ac_fn_cxx_try_compile
1950
1951# ac_fn_objc_try_compile LINENO
1952# -----------------------------
1953# Try to compile conftest.$ac_ext, and return whether this succeeded.
1954ac_fn_objc_try_compile ()
1955{
1956  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1957  rm -f conftest.$ac_objext
1958  if { { ac_try="$ac_compile"
1959case "(($ac_try" in
1960  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1961  *) ac_try_echo=$ac_try;;
1962esac
1963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1964$as_echo "$ac_try_echo"; } >&5
1965  (eval "$ac_compile") 2>conftest.err
1966  ac_status=$?
1967  if test -s conftest.err; then
1968    grep -v '^ *+' conftest.err >conftest.er1
1969    cat conftest.er1 >&5
1970    mv -f conftest.er1 conftest.err
1971  fi
1972  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1973  test $ac_status = 0; } && {
1974	 test -z "$ac_objc_werror_flag" ||
1975	 test ! -s conftest.err
1976       } && test -s conftest.$ac_objext; then :
1977  ac_retval=0
1978else
1979  $as_echo "$as_me: failed program was:" >&5
1980sed 's/^/| /' conftest.$ac_ext >&5
1981
1982	ac_retval=1
1983fi
1984  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1985  as_fn_set_status $ac_retval
1986
1987} # ac_fn_objc_try_compile
1988
1989# ac_fn_c_try_cpp LINENO
1990# ----------------------
1991# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1992ac_fn_c_try_cpp ()
1993{
1994  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995  if { { ac_try="$ac_cpp conftest.$ac_ext"
1996case "(($ac_try" in
1997  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1998  *) ac_try_echo=$ac_try;;
1999esac
2000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2001$as_echo "$ac_try_echo"; } >&5
2002  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2003  ac_status=$?
2004  if test -s conftest.err; then
2005    grep -v '^ *+' conftest.err >conftest.er1
2006    cat conftest.er1 >&5
2007    mv -f conftest.er1 conftest.err
2008  fi
2009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010  test $ac_status = 0; } > conftest.i && {
2011	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2012	 test ! -s conftest.err
2013       }; then :
2014  ac_retval=0
2015else
2016  $as_echo "$as_me: failed program was:" >&5
2017sed 's/^/| /' conftest.$ac_ext >&5
2018
2019    ac_retval=1
2020fi
2021  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2022  as_fn_set_status $ac_retval
2023
2024} # ac_fn_c_try_cpp
2025
2026# ac_fn_cxx_try_cpp LINENO
2027# ------------------------
2028# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2029ac_fn_cxx_try_cpp ()
2030{
2031  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032  if { { ac_try="$ac_cpp conftest.$ac_ext"
2033case "(($ac_try" in
2034  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2035  *) ac_try_echo=$ac_try;;
2036esac
2037eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2038$as_echo "$ac_try_echo"; } >&5
2039  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2040  ac_status=$?
2041  if test -s conftest.err; then
2042    grep -v '^ *+' conftest.err >conftest.er1
2043    cat conftest.er1 >&5
2044    mv -f conftest.er1 conftest.err
2045  fi
2046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2047  test $ac_status = 0; } > conftest.i && {
2048	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2049	 test ! -s conftest.err
2050       }; then :
2051  ac_retval=0
2052else
2053  $as_echo "$as_me: failed program was:" >&5
2054sed 's/^/| /' conftest.$ac_ext >&5
2055
2056    ac_retval=1
2057fi
2058  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2059  as_fn_set_status $ac_retval
2060
2061} # ac_fn_cxx_try_cpp
2062
2063# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2064# ---------------------------------------------------------
2065# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2066# the include files in INCLUDES and setting the cache variable VAR
2067# accordingly.
2068ac_fn_cxx_check_header_mongrel ()
2069{
2070  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071  if eval "test \"\${$3+set}\"" = set; then :
2072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073$as_echo_n "checking for $2... " >&6; }
2074if eval "test \"\${$3+set}\"" = set; then :
2075  $as_echo_n "(cached) " >&6
2076fi
2077eval ac_res=\$$3
2078	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2079$as_echo "$ac_res" >&6; }
2080else
2081  # Is the header compilable?
2082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2083$as_echo_n "checking $2 usability... " >&6; }
2084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h.  */
2086$4
2087#include <$2>
2088_ACEOF
2089if ac_fn_cxx_try_compile "$LINENO"; then :
2090  ac_header_compiler=yes
2091else
2092  ac_header_compiler=no
2093fi
2094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2096$as_echo "$ac_header_compiler" >&6; }
2097
2098# Is the header present?
2099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2100$as_echo_n "checking $2 presence... " >&6; }
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h.  */
2103#include <$2>
2104_ACEOF
2105if ac_fn_cxx_try_cpp "$LINENO"; then :
2106  ac_header_preproc=yes
2107else
2108  ac_header_preproc=no
2109fi
2110rm -f conftest.err conftest.i conftest.$ac_ext
2111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2112$as_echo "$ac_header_preproc" >&6; }
2113
2114# So?  What about this header?
2115case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2116  yes:no: )
2117    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2118$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2119    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2120$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2121    ;;
2122  no:yes:* )
2123    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2124$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2125    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2126$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2128$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2130$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2132$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2133( $as_echo "## ----------------------------------------- ##
2134## Report this to build-dev@openjdk.java.net ##
2135## ----------------------------------------- ##"
2136     ) | sed "s/^/$as_me: WARNING:     /" >&2
2137    ;;
2138esac
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2140$as_echo_n "checking for $2... " >&6; }
2141if eval "test \"\${$3+set}\"" = set; then :
2142  $as_echo_n "(cached) " >&6
2143else
2144  eval "$3=\$ac_header_compiler"
2145fi
2146eval ac_res=\$$3
2147	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2148$as_echo "$ac_res" >&6; }
2149fi
2150  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2151
2152} # ac_fn_cxx_check_header_mongrel
2153
2154# ac_fn_cxx_try_run LINENO
2155# ------------------------
2156# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2157# that executables *can* be run.
2158ac_fn_cxx_try_run ()
2159{
2160  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161  if { { ac_try="$ac_link"
2162case "(($ac_try" in
2163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2164  *) ac_try_echo=$ac_try;;
2165esac
2166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2167$as_echo "$ac_try_echo"; } >&5
2168  (eval "$ac_link") 2>&5
2169  ac_status=$?
2170  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2171  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2172  { { case "(($ac_try" in
2173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2174  *) ac_try_echo=$ac_try;;
2175esac
2176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2177$as_echo "$ac_try_echo"; } >&5
2178  (eval "$ac_try") 2>&5
2179  ac_status=$?
2180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2181  test $ac_status = 0; }; }; then :
2182  ac_retval=0
2183else
2184  $as_echo "$as_me: program exited with status $ac_status" >&5
2185       $as_echo "$as_me: failed program was:" >&5
2186sed 's/^/| /' conftest.$ac_ext >&5
2187
2188       ac_retval=$ac_status
2189fi
2190  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2191  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2192  as_fn_set_status $ac_retval
2193
2194} # ac_fn_cxx_try_run
2195
2196# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2197# ---------------------------------------------------------
2198# Tests whether HEADER exists and can be compiled using the include files in
2199# INCLUDES, setting the cache variable VAR accordingly.
2200ac_fn_cxx_check_header_compile ()
2201{
2202  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2204$as_echo_n "checking for $2... " >&6; }
2205if eval "test \"\${$3+set}\"" = set; then :
2206  $as_echo_n "(cached) " >&6
2207else
2208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2209/* end confdefs.h.  */
2210$4
2211#include <$2>
2212_ACEOF
2213if ac_fn_cxx_try_compile "$LINENO"; then :
2214  eval "$3=yes"
2215else
2216  eval "$3=no"
2217fi
2218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219fi
2220eval ac_res=\$$3
2221	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2222$as_echo "$ac_res" >&6; }
2223  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2224
2225} # ac_fn_cxx_check_header_compile
2226
2227# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2228# ----------------------------------------------
2229# Tries to find the compile-time value of EXPR in a program that includes
2230# INCLUDES, setting VAR accordingly. Returns whether the value could be
2231# computed
2232ac_fn_cxx_compute_int ()
2233{
2234  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2235  if test "$cross_compiling" = yes; then
2236    # Depending upon the size, compute the lo and hi bounds.
2237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h.  */
2239$4
2240int
2241main ()
2242{
2243static int test_array [1 - 2 * !(($2) >= 0)];
2244test_array [0] = 0
2245
2246  ;
2247  return 0;
2248}
2249_ACEOF
2250if ac_fn_cxx_try_compile "$LINENO"; then :
2251  ac_lo=0 ac_mid=0
2252  while :; do
2253    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h.  */
2255$4
2256int
2257main ()
2258{
2259static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2260test_array [0] = 0
2261
2262  ;
2263  return 0;
2264}
2265_ACEOF
2266if ac_fn_cxx_try_compile "$LINENO"; then :
2267  ac_hi=$ac_mid; break
2268else
2269  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2270			if test $ac_lo -le $ac_mid; then
2271			  ac_lo= ac_hi=
2272			  break
2273			fi
2274			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277  done
2278else
2279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280/* end confdefs.h.  */
2281$4
2282int
2283main ()
2284{
2285static int test_array [1 - 2 * !(($2) < 0)];
2286test_array [0] = 0
2287
2288  ;
2289  return 0;
2290}
2291_ACEOF
2292if ac_fn_cxx_try_compile "$LINENO"; then :
2293  ac_hi=-1 ac_mid=-1
2294  while :; do
2295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h.  */
2297$4
2298int
2299main ()
2300{
2301static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2302test_array [0] = 0
2303
2304  ;
2305  return 0;
2306}
2307_ACEOF
2308if ac_fn_cxx_try_compile "$LINENO"; then :
2309  ac_lo=$ac_mid; break
2310else
2311  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2312			if test $ac_mid -le $ac_hi; then
2313			  ac_lo= ac_hi=
2314			  break
2315			fi
2316			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2317fi
2318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2319  done
2320else
2321  ac_lo= ac_hi=
2322fi
2323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326# Binary search between lo and hi bounds.
2327while test "x$ac_lo" != "x$ac_hi"; do
2328  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2330/* end confdefs.h.  */
2331$4
2332int
2333main ()
2334{
2335static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2336test_array [0] = 0
2337
2338  ;
2339  return 0;
2340}
2341_ACEOF
2342if ac_fn_cxx_try_compile "$LINENO"; then :
2343  ac_hi=$ac_mid
2344else
2345  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2346fi
2347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2348done
2349case $ac_lo in #((
2350?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2351'') ac_retval=1 ;;
2352esac
2353  else
2354    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h.  */
2356$4
2357static long int longval () { return $2; }
2358static unsigned long int ulongval () { return $2; }
2359#include <stdio.h>
2360#include <stdlib.h>
2361int
2362main ()
2363{
2364
2365  FILE *f = fopen ("conftest.val", "w");
2366  if (! f)
2367    return 1;
2368  if (($2) < 0)
2369    {
2370      long int i = longval ();
2371      if (i != ($2))
2372	return 1;
2373      fprintf (f, "%ld", i);
2374    }
2375  else
2376    {
2377      unsigned long int i = ulongval ();
2378      if (i != ($2))
2379	return 1;
2380      fprintf (f, "%lu", i);
2381    }
2382  /* Do not output a trailing newline, as this causes \r\n confusion
2383     on some platforms.  */
2384  return ferror (f) || fclose (f) != 0;
2385
2386  ;
2387  return 0;
2388}
2389_ACEOF
2390if ac_fn_cxx_try_run "$LINENO"; then :
2391  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2392else
2393  ac_retval=1
2394fi
2395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2396  conftest.$ac_objext conftest.beam conftest.$ac_ext
2397rm -f conftest.val
2398
2399  fi
2400  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2401  as_fn_set_status $ac_retval
2402
2403} # ac_fn_cxx_compute_int
2404
2405# ac_fn_cxx_try_link LINENO
2406# -------------------------
2407# Try to link conftest.$ac_ext, and return whether this succeeded.
2408ac_fn_cxx_try_link ()
2409{
2410  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411  rm -f conftest.$ac_objext conftest$ac_exeext
2412  if { { ac_try="$ac_link"
2413case "(($ac_try" in
2414  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415  *) ac_try_echo=$ac_try;;
2416esac
2417eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418$as_echo "$ac_try_echo"; } >&5
2419  (eval "$ac_link") 2>conftest.err
2420  ac_status=$?
2421  if test -s conftest.err; then
2422    grep -v '^ *+' conftest.err >conftest.er1
2423    cat conftest.er1 >&5
2424    mv -f conftest.er1 conftest.err
2425  fi
2426  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427  test $ac_status = 0; } && {
2428	 test -z "$ac_cxx_werror_flag" ||
2429	 test ! -s conftest.err
2430       } && test -s conftest$ac_exeext && {
2431	 test "$cross_compiling" = yes ||
2432	 $as_test_x conftest$ac_exeext
2433       }; then :
2434  ac_retval=0
2435else
2436  $as_echo "$as_me: failed program was:" >&5
2437sed 's/^/| /' conftest.$ac_ext >&5
2438
2439	ac_retval=1
2440fi
2441  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2442  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2443  # interfere with the next link command; also delete a directory that is
2444  # left behind by Apple's compiler.  We do this before executing the actions.
2445  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2446  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_cxx_try_link
2450
2451# ac_fn_cxx_check_func LINENO FUNC VAR
2452# ------------------------------------
2453# Tests whether FUNC exists, setting the cache variable VAR accordingly
2454ac_fn_cxx_check_func ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458$as_echo_n "checking for $2... " >&6; }
2459if eval "test \"\${$3+set}\"" = set; then :
2460  $as_echo_n "(cached) " >&6
2461else
2462  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2465   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2466#define $2 innocuous_$2
2467
2468/* System header to define __stub macros and hopefully few prototypes,
2469    which can conflict with char $2 (); below.
2470    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2471    <limits.h> exists even on freestanding compilers.  */
2472
2473#ifdef __STDC__
2474# include <limits.h>
2475#else
2476# include <assert.h>
2477#endif
2478
2479#undef $2
2480
2481/* Override any GCC internal prototype to avoid an error.
2482   Use char because int might match the return type of a GCC
2483   builtin and then its argument prototype would still apply.  */
2484#ifdef __cplusplus
2485extern "C"
2486#endif
2487char $2 ();
2488/* The GNU C library defines this for functions which it implements
2489    to always fail with ENOSYS.  Some functions are actually named
2490    something starting with __ and the normal name is an alias.  */
2491#if defined __stub_$2 || defined __stub___$2
2492choke me
2493#endif
2494
2495int
2496main ()
2497{
2498return $2 ();
2499  ;
2500  return 0;
2501}
2502_ACEOF
2503if ac_fn_cxx_try_link "$LINENO"; then :
2504  eval "$3=yes"
2505else
2506  eval "$3=no"
2507fi
2508rm -f core conftest.err conftest.$ac_objext \
2509    conftest$ac_exeext conftest.$ac_ext
2510fi
2511eval ac_res=\$$3
2512	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513$as_echo "$ac_res" >&6; }
2514  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2515
2516} # ac_fn_cxx_check_func
2517
2518# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2519# -------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_c_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval "test \"\${$3+set}\"" = set; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_c_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2546
2547} # ac_fn_c_check_header_compile
2548cat >config.log <<_ACEOF
2549This file contains any messages produced by compilers while
2550running configure, to aid debugging if configure makes a mistake.
2551
2552It was created by OpenJDK $as_me jdk8, which was
2553generated by GNU Autoconf 2.67.  Invocation command line was
2554
2555  $ $0 $@
2556
2557_ACEOF
2558exec 5>>config.log
2559{
2560cat <<_ASUNAME
2561## --------- ##
2562## Platform. ##
2563## --------- ##
2564
2565hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2566uname -m = `(uname -m) 2>/dev/null || echo unknown`
2567uname -r = `(uname -r) 2>/dev/null || echo unknown`
2568uname -s = `(uname -s) 2>/dev/null || echo unknown`
2569uname -v = `(uname -v) 2>/dev/null || echo unknown`
2570
2571/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2572/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2573
2574/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2575/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2576/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2577/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2578/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2579/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2580/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2581
2582_ASUNAME
2583
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587  IFS=$as_save_IFS
2588  test -z "$as_dir" && as_dir=.
2589    $as_echo "PATH: $as_dir"
2590  done
2591IFS=$as_save_IFS
2592
2593} >&5
2594
2595cat >&5 <<_ACEOF
2596
2597
2598## ----------- ##
2599## Core tests. ##
2600## ----------- ##
2601
2602_ACEOF
2603
2604
2605# Keep a trace of the command line.
2606# Strip out --no-create and --no-recursion so they do not pile up.
2607# Strip out --silent because we don't want to record it for future runs.
2608# Also quote any args containing shell meta-characters.
2609# Make two passes to allow for proper duplicate-argument suppression.
2610ac_configure_args=
2611ac_configure_args0=
2612ac_configure_args1=
2613ac_must_keep_next=false
2614for ac_pass in 1 2
2615do
2616  for ac_arg
2617  do
2618    case $ac_arg in
2619    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2620    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2621    | -silent | --silent | --silen | --sile | --sil)
2622      continue ;;
2623    *\'*)
2624      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2625    esac
2626    case $ac_pass in
2627    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2628    2)
2629      as_fn_append ac_configure_args1 " '$ac_arg'"
2630      if test $ac_must_keep_next = true; then
2631	ac_must_keep_next=false # Got value, back to normal.
2632      else
2633	case $ac_arg in
2634	  *=* | --config-cache | -C | -disable-* | --disable-* \
2635	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2636	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2637	  | -with-* | --with-* | -without-* | --without-* | --x)
2638	    case "$ac_configure_args0 " in
2639	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2640	    esac
2641	    ;;
2642	  -* ) ac_must_keep_next=true ;;
2643	esac
2644      fi
2645      as_fn_append ac_configure_args " '$ac_arg'"
2646      ;;
2647    esac
2648  done
2649done
2650{ ac_configure_args0=; unset ac_configure_args0;}
2651{ ac_configure_args1=; unset ac_configure_args1;}
2652
2653# When interrupted or exit'd, cleanup temporary files, and complete
2654# config.log.  We remove comments because anyway the quotes in there
2655# would cause problems or look ugly.
2656# WARNING: Use '\'' to represent an apostrophe within the trap.
2657# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2658trap 'exit_status=$?
2659  # Save into config.log some information that might help in debugging.
2660  {
2661    echo
2662
2663    $as_echo "## ---------------- ##
2664## Cache variables. ##
2665## ---------------- ##"
2666    echo
2667    # The following way of writing the cache mishandles newlines in values,
2668(
2669  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2670    eval ac_val=\$$ac_var
2671    case $ac_val in #(
2672    *${as_nl}*)
2673      case $ac_var in #(
2674      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2675$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2676      esac
2677      case $ac_var in #(
2678      _ | IFS | as_nl) ;; #(
2679      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2680      *) { eval $ac_var=; unset $ac_var;} ;;
2681      esac ;;
2682    esac
2683  done
2684  (set) 2>&1 |
2685    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2686    *${as_nl}ac_space=\ *)
2687      sed -n \
2688	"s/'\''/'\''\\\\'\'''\''/g;
2689	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2690      ;; #(
2691    *)
2692      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2693      ;;
2694    esac |
2695    sort
2696)
2697    echo
2698
2699    $as_echo "## ----------------- ##
2700## Output variables. ##
2701## ----------------- ##"
2702    echo
2703    for ac_var in $ac_subst_vars
2704    do
2705      eval ac_val=\$$ac_var
2706      case $ac_val in
2707      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2708      esac
2709      $as_echo "$ac_var='\''$ac_val'\''"
2710    done | sort
2711    echo
2712
2713    if test -n "$ac_subst_files"; then
2714      $as_echo "## ------------------- ##
2715## File substitutions. ##
2716## ------------------- ##"
2717      echo
2718      for ac_var in $ac_subst_files
2719      do
2720	eval ac_val=\$$ac_var
2721	case $ac_val in
2722	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2723	esac
2724	$as_echo "$ac_var='\''$ac_val'\''"
2725      done | sort
2726      echo
2727    fi
2728
2729    if test -s confdefs.h; then
2730      $as_echo "## ----------- ##
2731## confdefs.h. ##
2732## ----------- ##"
2733      echo
2734      cat confdefs.h
2735      echo
2736    fi
2737    test "$ac_signal" != 0 &&
2738      $as_echo "$as_me: caught signal $ac_signal"
2739    $as_echo "$as_me: exit $exit_status"
2740  } >&5
2741  rm -f core *.core core.conftest.* &&
2742    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2743    exit $exit_status
2744' 0
2745for ac_signal in 1 2 13 15; do
2746  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2747done
2748ac_signal=0
2749
2750# confdefs.h avoids OS command line length limits that DEFS can exceed.
2751rm -f -r conftest* confdefs.h
2752
2753$as_echo "/* confdefs.h */" > confdefs.h
2754
2755# Predefined preprocessor variables.
2756
2757cat >>confdefs.h <<_ACEOF
2758#define PACKAGE_NAME "$PACKAGE_NAME"
2759_ACEOF
2760
2761cat >>confdefs.h <<_ACEOF
2762#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2763_ACEOF
2764
2765cat >>confdefs.h <<_ACEOF
2766#define PACKAGE_VERSION "$PACKAGE_VERSION"
2767_ACEOF
2768
2769cat >>confdefs.h <<_ACEOF
2770#define PACKAGE_STRING "$PACKAGE_STRING"
2771_ACEOF
2772
2773cat >>confdefs.h <<_ACEOF
2774#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2775_ACEOF
2776
2777cat >>confdefs.h <<_ACEOF
2778#define PACKAGE_URL "$PACKAGE_URL"
2779_ACEOF
2780
2781
2782# Let the site file select an alternate cache file if it wants to.
2783# Prefer an explicitly selected file to automatically selected ones.
2784ac_site_file1=NONE
2785ac_site_file2=NONE
2786if test -n "$CONFIG_SITE"; then
2787  # We do not want a PATH search for config.site.
2788  case $CONFIG_SITE in #((
2789    -*)  ac_site_file1=./$CONFIG_SITE;;
2790    */*) ac_site_file1=$CONFIG_SITE;;
2791    *)   ac_site_file1=./$CONFIG_SITE;;
2792  esac
2793elif test "x$prefix" != xNONE; then
2794  ac_site_file1=$prefix/share/config.site
2795  ac_site_file2=$prefix/etc/config.site
2796else
2797  ac_site_file1=$ac_default_prefix/share/config.site
2798  ac_site_file2=$ac_default_prefix/etc/config.site
2799fi
2800for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2801do
2802  test "x$ac_site_file" = xNONE && continue
2803  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2804    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2805$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2806    sed 's/^/| /' "$ac_site_file" >&5
2807    . "$ac_site_file" \
2808      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2810as_fn_error $? "failed to load site script $ac_site_file
2811See \`config.log' for more details" "$LINENO" 5 ; }
2812  fi
2813done
2814
2815if test -r "$cache_file"; then
2816  # Some versions of bash will fail to source /dev/null (special files
2817  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2818  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2819    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2820$as_echo "$as_me: loading cache $cache_file" >&6;}
2821    case $cache_file in
2822      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2823      *)                      . "./$cache_file";;
2824    esac
2825  fi
2826else
2827  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2828$as_echo "$as_me: creating cache $cache_file" >&6;}
2829  >$cache_file
2830fi
2831
2832# Check that the precious variables saved in the cache have kept the same
2833# value.
2834ac_cache_corrupted=false
2835for ac_var in $ac_precious_vars; do
2836  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2837  eval ac_new_set=\$ac_env_${ac_var}_set
2838  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2839  eval ac_new_val=\$ac_env_${ac_var}_value
2840  case $ac_old_set,$ac_new_set in
2841    set,)
2842      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2843$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2844      ac_cache_corrupted=: ;;
2845    ,set)
2846      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2847$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2848      ac_cache_corrupted=: ;;
2849    ,);;
2850    *)
2851      if test "x$ac_old_val" != "x$ac_new_val"; then
2852	# differences in whitespace do not lead to failure.
2853	ac_old_val_w=`echo x $ac_old_val`
2854	ac_new_val_w=`echo x $ac_new_val`
2855	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2856	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2857$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2858	  ac_cache_corrupted=:
2859	else
2860	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2861$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2862	  eval $ac_var=\$ac_old_val
2863	fi
2864	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2865$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2866	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2867$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2868      fi;;
2869  esac
2870  # Pass precious variables to config.status.
2871  if test "$ac_new_set" = set; then
2872    case $ac_new_val in
2873    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2874    *) ac_arg=$ac_var=$ac_new_val ;;
2875    esac
2876    case " $ac_configure_args " in
2877      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2878      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2879    esac
2880  fi
2881done
2882if $ac_cache_corrupted; then
2883  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2885  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2886$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2887  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2888fi
2889## -------------------- ##
2890## Main body of script. ##
2891## -------------------- ##
2892
2893ac_ext=c
2894ac_cpp='$CPP $CPPFLAGS'
2895ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2896ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2897ac_compiler_gnu=$ac_cv_c_compiler_gnu
2898
2899
2900
2901ac_aux_dir=
2902for ac_dir in build-aux "$srcdir"/build-aux; do
2903  if test -f "$ac_dir/install-sh"; then
2904    ac_aux_dir=$ac_dir
2905    ac_install_sh="$ac_aux_dir/install-sh -c"
2906    break
2907  elif test -f "$ac_dir/install.sh"; then
2908    ac_aux_dir=$ac_dir
2909    ac_install_sh="$ac_aux_dir/install.sh -c"
2910    break
2911  elif test -f "$ac_dir/shtool"; then
2912    ac_aux_dir=$ac_dir
2913    ac_install_sh="$ac_aux_dir/shtool install -c"
2914    break
2915  fi
2916done
2917if test -z "$ac_aux_dir"; then
2918  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2919fi
2920
2921# These three variables are undocumented and unsupported,
2922# and are intended to be withdrawn in a future Autoconf release.
2923# They can cause serious problems if a builder's source tree is in a directory
2924# whose full name contains unusual characters.
2925ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2926ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2927ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2928
2929
2930# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2931
2932#
2933# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2934# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2935#
2936# This code is free software; you can redistribute it and/or modify it
2937# under the terms of the GNU General Public License version 2 only, as
2938# published by the Free Software Foundation.  Oracle designates this
2939# particular file as subject to the "Classpath" exception as provided
2940# by Oracle in the LICENSE file that accompanied this code.
2941#
2942# This code is distributed in the hope that it will be useful, but WITHOUT
2943# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2944# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2945# version 2 for more details (a copy is included in the LICENSE file that
2946# accompanied this code).
2947#
2948# You should have received a copy of the GNU General Public License version
2949# 2 along with this work; if not, write to the Free Software Foundation,
2950# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2951#
2952# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2953# or visit www.oracle.com if you need additional information or have any
2954# questions.
2955#
2956
2957#
2958# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2959#
2960# This program is free software; you can redistribute it and/or modify
2961# it under the terms of the GNU General Public License as published by
2962# the Free Software Foundation; either version 2 of the License, or
2963# (at your option) any later version.
2964#
2965# This program is distributed in the hope that it will be useful, but
2966# WITHOUT ANY WARRANTY; without even the implied warranty of
2967# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2968# General Public License for more details.
2969#
2970# You should have received a copy of the GNU General Public License
2971# along with this program; if not, write to the Free Software
2972# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2973#
2974# As a special exception to the GNU General Public License, if you
2975# distribute this file as part of a program that contains a
2976# configuration script generated by Autoconf, you may include it under
2977# the same distribution terms that you use for the rest of that program.
2978
2979# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2980# ----------------------------------
2981# PKG_PROG_PKG_CONFIG
2982
2983# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2984#
2985# Check to see whether a particular set of modules exists.  Similar
2986# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2987#
2988#
2989# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2990# this or PKG_CHECK_MODULES is called, or make sure to call
2991# PKG_CHECK_EXISTS manually
2992# --------------------------------------------------------------
2993
2994
2995
2996# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2997# ---------------------------------------------
2998# _PKG_CONFIG
2999
3000# _PKG_SHORT_ERRORS_SUPPORTED
3001# -----------------------------
3002# _PKG_SHORT_ERRORS_SUPPORTED
3003
3004
3005# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3006# [ACTION-IF-NOT-FOUND])
3007#
3008#
3009# Note that if there is a possibility the first call to
3010# PKG_CHECK_MODULES might not happen, you should be sure to include an
3011# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3012#
3013#
3014# --------------------------------------------------------------
3015# PKG_CHECK_MODULES
3016
3017
3018# Include these first...
3019#
3020# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3021# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3022#
3023# This code is free software; you can redistribute it and/or modify it
3024# under the terms of the GNU General Public License version 2 only, as
3025# published by the Free Software Foundation.  Oracle designates this
3026# particular file as subject to the "Classpath" exception as provided
3027# by Oracle in the LICENSE file that accompanied this code.
3028#
3029# This code is distributed in the hope that it will be useful, but WITHOUT
3030# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3031# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3032# version 2 for more details (a copy is included in the LICENSE file that
3033# accompanied this code).
3034#
3035# You should have received a copy of the GNU General Public License version
3036# 2 along with this work; if not, write to the Free Software Foundation,
3037# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3038#
3039# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3040# or visit www.oracle.com if you need additional information or have any
3041# questions.
3042#
3043
3044
3045
3046# This will make sure the given variable points to a full and proper
3047# path. This means:
3048# 1) There will be no spaces in the path. On posix platforms,
3049#    spaces in the path will result in an error. On Windows,
3050#    the path will be rewritten using short-style to be space-free.
3051# 2) The path will be absolute, and it will be in unix-style (on
3052#     cygwin).
3053# $1: The name of the variable to fix
3054
3055
3056# This will make sure the given variable points to a executable
3057# with a full and proper path. This means:
3058# 1) There will be no spaces in the path. On posix platforms,
3059#    spaces in the path will result in an error. On Windows,
3060#    the path will be rewritten using short-style to be space-free.
3061# 2) The path will be absolute, and it will be in unix-style (on
3062#     cygwin).
3063# Any arguments given to the executable is preserved.
3064# If the input variable does not have a directory specification, then
3065# it need to be in the PATH.
3066# $1: The name of the variable to fix
3067
3068
3069
3070
3071
3072
3073# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3074# $1: variable to check
3075# $2: executable name to print in warning (optional)
3076
3077
3078# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3079# Arguments as AC_PATH_PROG:
3080# $1: variable to set
3081# $2: executable name to look for
3082
3083
3084# Setup the most fundamental tools that relies on not much else to set up,
3085# but is used by much of the early bootstrap code.
3086
3087
3088# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3089
3090
3091
3092
3093
3094
3095
3096#%%% Simple tools %%%
3097
3098# Check if we have found a usable version of make
3099# $1: the path to a potential make binary (or empty)
3100# $2: the description on how we found this
3101
3102
3103# Goes looking for a usable version of GNU make.
3104
3105
3106
3107
3108
3109
3110# Check if build directory is on local disk. If not possible to determine,
3111# we prefer to claim it's local.
3112# Argument 1: directory to test
3113# Argument 2: what to do if it is on local disk
3114# Argument 3: what to do otherwise (remote disk or failure)
3115
3116
3117# Check that source files have basic read permissions set. This might
3118# not be the case in cygwin in certain conditions.
3119
3120
3121
3122
3123#
3124# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3125# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3126#
3127# This code is free software; you can redistribute it and/or modify it
3128# under the terms of the GNU General Public License version 2 only, as
3129# published by the Free Software Foundation.  Oracle designates this
3130# particular file as subject to the "Classpath" exception as provided
3131# by Oracle in the LICENSE file that accompanied this code.
3132#
3133# This code is distributed in the hope that it will be useful, but WITHOUT
3134# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3135# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3136# version 2 for more details (a copy is included in the LICENSE file that
3137# accompanied this code).
3138#
3139# You should have received a copy of the GNU General Public License version
3140# 2 along with this work; if not, write to the Free Software Foundation,
3141# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3142#
3143# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3144# or visit www.oracle.com if you need additional information or have any
3145# questions.
3146#
3147
3148
3149
3150
3151
3152# Helper function which possibly converts a path using DOS-style short mode.
3153# If so, the updated path is stored in $new_path.
3154# $1: The path to check
3155
3156
3157# Helper function which possibly converts a path using DOS-style short mode.
3158# If so, the updated path is stored in $new_path.
3159# $1: The path to check
3160
3161
3162# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3163# and could probably be heavily simplified. However, all changes in this
3164# area tend to need lot of testing in different scenarios, and in lack of
3165# proper unit testing, cleaning this up has not been deemed worth the effort
3166# at the moment.
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3177
3178
3179
3180
3181#
3182# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3183# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3184#
3185# This code is free software; you can redistribute it and/or modify it
3186# under the terms of the GNU General Public License version 2 only, as
3187# published by the Free Software Foundation.  Oracle designates this
3188# particular file as subject to the "Classpath" exception as provided
3189# by Oracle in the LICENSE file that accompanied this code.
3190#
3191# This code is distributed in the hope that it will be useful, but WITHOUT
3192# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3193# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3194# version 2 for more details (a copy is included in the LICENSE file that
3195# accompanied this code).
3196#
3197# You should have received a copy of the GNU General Public License version
3198# 2 along with this work; if not, write to the Free Software Foundation,
3199# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3200#
3201# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3202# or visit www.oracle.com if you need additional information or have any
3203# questions.
3204#
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216# ... then the rest
3217#
3218# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3219# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3220#
3221# This code is free software; you can redistribute it and/or modify it
3222# under the terms of the GNU General Public License version 2 only, as
3223# published by the Free Software Foundation.  Oracle designates this
3224# particular file as subject to the "Classpath" exception as provided
3225# by Oracle in the LICENSE file that accompanied this code.
3226#
3227# This code is distributed in the hope that it will be useful, but WITHOUT
3228# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3229# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3230# version 2 for more details (a copy is included in the LICENSE file that
3231# accompanied this code).
3232#
3233# You should have received a copy of the GNU General Public License version
3234# 2 along with this work; if not, write to the Free Software Foundation,
3235# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3236#
3237# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3238# or visit www.oracle.com if you need additional information or have any
3239# questions.
3240#
3241
3242# Execute the check given as argument, and verify the result
3243# If the Boot JDK was previously found, do nothing
3244# $1 A command line (typically autoconf macro) to execute
3245
3246
3247# Test: Is bootjdk explicitely set by command line arguments?
3248
3249
3250# Test: Is bootjdk available from builddeps?
3251
3252
3253# Test: Is $JAVA_HOME set?
3254
3255
3256# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3257
3258
3259# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3260
3261
3262# Look for a jdk in the given path. If there are multiple, try to select the newest.
3263# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3264# $1 = Path to directory containing jdk installations.
3265# $2 = String to append to the found JDK directory to get the proper JDK home
3266
3267
3268# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3269# environmental variable as base for where to look.
3270# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3271
3272
3273# Test: Is there a JDK installed in default, well-known locations?
3274
3275
3276# Check that a command-line tool in the Boot JDK is correct
3277# $1 = name of variable to assign
3278# $2 = name of binary
3279
3280
3281###############################################################################
3282#
3283# We need a Boot JDK to bootstrap the build.
3284#
3285
3286
3287
3288
3289
3290#
3291# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3293#
3294# This code is free software; you can redistribute it and/or modify it
3295# under the terms of the GNU General Public License version 2 only, as
3296# published by the Free Software Foundation.  Oracle designates this
3297# particular file as subject to the "Classpath" exception as provided
3298# by Oracle in the LICENSE file that accompanied this code.
3299#
3300# This code is distributed in the hope that it will be useful, but WITHOUT
3301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3303# version 2 for more details (a copy is included in the LICENSE file that
3304# accompanied this code).
3305#
3306# You should have received a copy of the GNU General Public License version
3307# 2 along with this work; if not, write to the Free Software Foundation,
3308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3309#
3310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3311# or visit www.oracle.com if you need additional information or have any
3312# questions.
3313#
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332#
3333# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3334# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3335#
3336# This code is free software; you can redistribute it and/or modify it
3337# under the terms of the GNU General Public License version 2 only, as
3338# published by the Free Software Foundation.  Oracle designates this
3339# particular file as subject to the "Classpath" exception as provided
3340# by Oracle in the LICENSE file that accompanied this code.
3341#
3342# This code is distributed in the hope that it will be useful, but WITHOUT
3343# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3344# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3345# version 2 for more details (a copy is included in the LICENSE file that
3346# accompanied this code).
3347#
3348# You should have received a copy of the GNU General Public License version
3349# 2 along with this work; if not, write to the Free Software Foundation,
3350# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3351#
3352# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3353# or visit www.oracle.com if you need additional information or have any
3354# questions.
3355#
3356
3357
3358
3359
3360
3361cygwin_help() {
3362    case $1 in
3363    unzip)
3364        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3365    zip)
3366        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3367    make)
3368        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3369    * )
3370       break ;;
3371    esac
3372}
3373
3374apt_help() {
3375    case $1 in
3376    devkit)
3377        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3378    openjdk)
3379        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3380    alsa)
3381        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3382    cups)
3383        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3384    freetype2)
3385        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3386    pulse)
3387        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3388    x11)
3389        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3390    ccache)
3391        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3392    * )
3393       break ;;
3394    esac
3395}
3396
3397yum_help() {
3398    case $1 in
3399    devkit)
3400        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3401    openjdk)
3402        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3403    alsa)
3404        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3405    cups)
3406        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3407    freetype2)
3408        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3409    pulse)
3410        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3411    x11)
3412        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3413    ccache)
3414        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3415    * )
3416       break ;;
3417    esac
3418}
3419
3420port_help() {
3421    PKGHANDLER_COMMAND=""
3422}
3423
3424pkgutil_help() {
3425    PKGHANDLER_COMMAND=""
3426}
3427
3428pkgadd_help() {
3429    PKGHANDLER_COMMAND=""
3430}
3431
3432
3433
3434#
3435# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3436# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3437#
3438# This code is free software; you can redistribute it and/or modify it
3439# under the terms of the GNU General Public License version 2 only, as
3440# published by the Free Software Foundation.  Oracle designates this
3441# particular file as subject to the "Classpath" exception as provided
3442# by Oracle in the LICENSE file that accompanied this code.
3443#
3444# This code is distributed in the hope that it will be useful, but WITHOUT
3445# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3446# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3447# version 2 for more details (a copy is included in the LICENSE file that
3448# accompanied this code).
3449#
3450# You should have received a copy of the GNU General Public License version
3451# 2 along with this work; if not, write to the Free Software Foundation,
3452# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3453#
3454# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3455# or visit www.oracle.com if you need additional information or have any
3456# questions.
3457#
3458
3459
3460
3461
3462
3463
3464
3465
3466###############################################################################
3467#
3468# Should we build only OpenJDK even if closed sources are present?
3469#
3470
3471
3472
3473
3474###############################################################################
3475#
3476# Setup version numbers
3477#
3478
3479
3480
3481
3482
3483
3484# Support for customization of the build process. Some build files
3485# will include counterparts from this location, if they exist. This allows
3486# for a degree of customization of the build targets and the rules/recipes
3487# to create them
3488
3489# Check whether --with-custom-make-dir was given.
3490if test "${with_custom_make_dir+set}" = set; then :
3491  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3492fi
3493
3494
3495
3496#
3497# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3498# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3499#
3500# This code is free software; you can redistribute it and/or modify it
3501# under the terms of the GNU General Public License version 2 only, as
3502# published by the Free Software Foundation.  Oracle designates this
3503# particular file as subject to the "Classpath" exception as provided
3504# by Oracle in the LICENSE file that accompanied this code.
3505#
3506# This code is distributed in the hope that it will be useful, but WITHOUT
3507# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3508# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3509# version 2 for more details (a copy is included in the LICENSE file that
3510# accompanied this code).
3511#
3512# You should have received a copy of the GNU General Public License version
3513# 2 along with this work; if not, write to the Free Software Foundation,
3514# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3515#
3516# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3517# or visit www.oracle.com if you need additional information or have any
3518# questions.
3519#
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535#
3536# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3537# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3538#
3539# This code is free software; you can redistribute it and/or modify it
3540# under the terms of the GNU General Public License version 2 only, as
3541# published by the Free Software Foundation.  Oracle designates this
3542# particular file as subject to the "Classpath" exception as provided
3543# by Oracle in the LICENSE file that accompanied this code.
3544#
3545# This code is distributed in the hope that it will be useful, but WITHOUT
3546# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3547# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3548# version 2 for more details (a copy is included in the LICENSE file that
3549# accompanied this code).
3550#
3551# You should have received a copy of the GNU General Public License version
3552# 2 along with this work; if not, write to the Free Software Foundation,
3553# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3554#
3555# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3556# or visit www.oracle.com if you need additional information or have any
3557# questions.
3558#
3559
3560# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3561# Converts autoconf style CPU name to OpenJDK style, into
3562# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3563
3564
3565# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3566# Converts autoconf style OS name to OpenJDK style, into
3567# VAR_OS and VAR_OS_API.
3568
3569
3570# Expects $host_os $host_cpu $build_os and $build_cpu
3571# and $with_target_bits to have been setup!
3572#
3573# Translate the standard triplet(quadruplet) definition
3574# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3575# OPENJDK_BUILD_OS, etc.
3576
3577
3578# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3579# accordingly. Must be done after setting up build and target system, but before
3580# doing anything else with these values.
3581
3582
3583    # Setup the legacy variables, for controlling the old makefiles.
3584    #
3585
3586
3587
3588
3589#%%% Build and target systems %%%
3590
3591
3592
3593
3594# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3595# Add -mX to various FLAGS variables.
3596
3597
3598
3599
3600
3601
3602#
3603# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3604# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3605#
3606# This code is free software; you can redistribute it and/or modify it
3607# under the terms of the GNU General Public License version 2 only, as
3608# published by the Free Software Foundation.  Oracle designates this
3609# particular file as subject to the "Classpath" exception as provided
3610# by Oracle in the LICENSE file that accompanied this code.
3611#
3612# This code is distributed in the hope that it will be useful, but WITHOUT
3613# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3614# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3615# version 2 for more details (a copy is included in the LICENSE file that
3616# accompanied this code).
3617#
3618# You should have received a copy of the GNU General Public License version
3619# 2 along with this work; if not, write to the Free Software Foundation,
3620# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3621#
3622# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3623# or visit www.oracle.com if you need additional information or have any
3624# questions.
3625#
3626
3627
3628
3629
3630
3631
3632
3633
3634#
3635# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3637#
3638# This code is free software; you can redistribute it and/or modify it
3639# under the terms of the GNU General Public License version 2 only, as
3640# published by the Free Software Foundation.  Oracle designates this
3641# particular file as subject to the "Classpath" exception as provided
3642# by Oracle in the LICENSE file that accompanied this code.
3643#
3644# This code is distributed in the hope that it will be useful, but WITHOUT
3645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3647# version 2 for more details (a copy is included in the LICENSE file that
3648# accompanied this code).
3649#
3650# You should have received a copy of the GNU General Public License version
3651# 2 along with this work; if not, write to the Free Software Foundation,
3652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3653#
3654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3655# or visit www.oracle.com if you need additional information or have any
3656# questions.
3657#
3658
3659# $1 = compiler to test (CC or CXX)
3660# $2 = human readable name of compiler (C or C++)
3661
3662
3663
3664
3665
3666# $1 = compiler to test (CC or CXX)
3667# $2 = human readable name of compiler (C or C++)
3668# $3 = list of compiler names to search for
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681#
3682# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3684#
3685# This code is free software; you can redistribute it and/or modify it
3686# under the terms of the GNU General Public License version 2 only, as
3687# published by the Free Software Foundation.  Oracle designates this
3688# particular file as subject to the "Classpath" exception as provided
3689# by Oracle in the LICENSE file that accompanied this code.
3690#
3691# This code is distributed in the hope that it will be useful, but WITHOUT
3692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3694# version 2 for more details (a copy is included in the LICENSE file that
3695# accompanied this code).
3696#
3697# You should have received a copy of the GNU General Public License version
3698# 2 along with this work; if not, write to the Free Software Foundation,
3699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3700#
3701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3702# or visit www.oracle.com if you need additional information or have any
3703# questions.
3704#
3705
3706
3707
3708
3709
3710
3711
3712# Check if the VS env variables were setup prior to running configure.
3713# If not, then find vcvarsall.bat and run it automatically, and integrate
3714# the set env variables into the spec file.
3715
3716
3717
3718
3719
3720
3721# This line needs to be here, verbatim, after all includes and the dummy hook
3722# definitions. It is replaced with custom functionality when building
3723# custom sources.
3724#CUSTOM_AUTOCONF_INCLUDE
3725
3726# Do not change or remove the following line, it is needed for consistency checks:
3727DATE_WHEN_GENERATED=1361452590
3728
3729###############################################################################
3730#
3731# Initialization / Boot-strapping
3732#
3733# The bootstrapping process needs to solve the "chicken or the egg" problem,
3734# thus it jumps back and forth, each time gaining something needed later on.
3735#
3736###############################################################################
3737
3738# Basic initialization that must happen first of all
3739
3740# Save the original command line. This is passed to us by the wrapper configure script.
3741
3742DATE_WHEN_CONFIGURED=`LANG=C date`
3743
3744{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3745$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3746{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3747$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3748
3749
3750
3751# Start with tools that do not need have cross compilation support
3752# and can be expected to be found in the default PATH. These tools are
3753# used by configure. Nor are these tools expected to be found in the
3754# devkit from the builddeps server either, since they are
3755# needed to download the devkit.
3756
3757# First are all the simple required tools.
3758
3759    for ac_prog in basename
3760do
3761  # Extract the first word of "$ac_prog", so it can be a program name with args.
3762set dummy $ac_prog; ac_word=$2
3763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3764$as_echo_n "checking for $ac_word... " >&6; }
3765if test "${ac_cv_path_BASENAME+set}" = set; then :
3766  $as_echo_n "(cached) " >&6
3767else
3768  case $BASENAME in
3769  [\\/]* | ?:[\\/]*)
3770  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3771  ;;
3772  *)
3773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776  IFS=$as_save_IFS
3777  test -z "$as_dir" && as_dir=.
3778    for ac_exec_ext in '' $ac_executable_extensions; do
3779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3780    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3782    break 2
3783  fi
3784done
3785  done
3786IFS=$as_save_IFS
3787
3788  ;;
3789esac
3790fi
3791BASENAME=$ac_cv_path_BASENAME
3792if test -n "$BASENAME"; then
3793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3794$as_echo "$BASENAME" >&6; }
3795else
3796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
3798fi
3799
3800
3801  test -n "$BASENAME" && break
3802done
3803
3804
3805    if test "x$BASENAME" = x; then
3806        if test "xbasename" = x; then
3807          PROG_NAME=basename
3808        else
3809          PROG_NAME=basename
3810        fi
3811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3813        as_fn_error $? "Cannot continue" "$LINENO" 5
3814    fi
3815
3816
3817
3818    for ac_prog in bash
3819do
3820  # Extract the first word of "$ac_prog", so it can be a program name with args.
3821set dummy $ac_prog; ac_word=$2
3822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3823$as_echo_n "checking for $ac_word... " >&6; }
3824if test "${ac_cv_path_BASH+set}" = set; then :
3825  $as_echo_n "(cached) " >&6
3826else
3827  case $BASH in
3828  [\\/]* | ?:[\\/]*)
3829  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3830  ;;
3831  *)
3832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3833for as_dir in $PATH
3834do
3835  IFS=$as_save_IFS
3836  test -z "$as_dir" && as_dir=.
3837    for ac_exec_ext in '' $ac_executable_extensions; do
3838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3839    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841    break 2
3842  fi
3843done
3844  done
3845IFS=$as_save_IFS
3846
3847  ;;
3848esac
3849fi
3850BASH=$ac_cv_path_BASH
3851if test -n "$BASH"; then
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3853$as_echo "$BASH" >&6; }
3854else
3855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3856$as_echo "no" >&6; }
3857fi
3858
3859
3860  test -n "$BASH" && break
3861done
3862
3863
3864    if test "x$BASH" = x; then
3865        if test "xbash" = x; then
3866          PROG_NAME=bash
3867        else
3868          PROG_NAME=bash
3869        fi
3870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3872        as_fn_error $? "Cannot continue" "$LINENO" 5
3873    fi
3874
3875
3876
3877    for ac_prog in cat
3878do
3879  # Extract the first word of "$ac_prog", so it can be a program name with args.
3880set dummy $ac_prog; ac_word=$2
3881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3882$as_echo_n "checking for $ac_word... " >&6; }
3883if test "${ac_cv_path_CAT+set}" = set; then :
3884  $as_echo_n "(cached) " >&6
3885else
3886  case $CAT in
3887  [\\/]* | ?:[\\/]*)
3888  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3889  ;;
3890  *)
3891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3892for as_dir in $PATH
3893do
3894  IFS=$as_save_IFS
3895  test -z "$as_dir" && as_dir=.
3896    for ac_exec_ext in '' $ac_executable_extensions; do
3897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3898    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3900    break 2
3901  fi
3902done
3903  done
3904IFS=$as_save_IFS
3905
3906  ;;
3907esac
3908fi
3909CAT=$ac_cv_path_CAT
3910if test -n "$CAT"; then
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3912$as_echo "$CAT" >&6; }
3913else
3914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3915$as_echo "no" >&6; }
3916fi
3917
3918
3919  test -n "$CAT" && break
3920done
3921
3922
3923    if test "x$CAT" = x; then
3924        if test "xcat" = x; then
3925          PROG_NAME=cat
3926        else
3927          PROG_NAME=cat
3928        fi
3929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3931        as_fn_error $? "Cannot continue" "$LINENO" 5
3932    fi
3933
3934
3935
3936    for ac_prog in chmod
3937do
3938  # Extract the first word of "$ac_prog", so it can be a program name with args.
3939set dummy $ac_prog; ac_word=$2
3940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3941$as_echo_n "checking for $ac_word... " >&6; }
3942if test "${ac_cv_path_CHMOD+set}" = set; then :
3943  $as_echo_n "(cached) " >&6
3944else
3945  case $CHMOD in
3946  [\\/]* | ?:[\\/]*)
3947  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3948  ;;
3949  *)
3950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3951for as_dir in $PATH
3952do
3953  IFS=$as_save_IFS
3954  test -z "$as_dir" && as_dir=.
3955    for ac_exec_ext in '' $ac_executable_extensions; do
3956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3957    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3959    break 2
3960  fi
3961done
3962  done
3963IFS=$as_save_IFS
3964
3965  ;;
3966esac
3967fi
3968CHMOD=$ac_cv_path_CHMOD
3969if test -n "$CHMOD"; then
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3971$as_echo "$CHMOD" >&6; }
3972else
3973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3974$as_echo "no" >&6; }
3975fi
3976
3977
3978  test -n "$CHMOD" && break
3979done
3980
3981
3982    if test "x$CHMOD" = x; then
3983        if test "xchmod" = x; then
3984          PROG_NAME=chmod
3985        else
3986          PROG_NAME=chmod
3987        fi
3988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3990        as_fn_error $? "Cannot continue" "$LINENO" 5
3991    fi
3992
3993
3994
3995    for ac_prog in cmp
3996do
3997  # Extract the first word of "$ac_prog", so it can be a program name with args.
3998set dummy $ac_prog; ac_word=$2
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4000$as_echo_n "checking for $ac_word... " >&6; }
4001if test "${ac_cv_path_CMP+set}" = set; then :
4002  $as_echo_n "(cached) " >&6
4003else
4004  case $CMP in
4005  [\\/]* | ?:[\\/]*)
4006  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4007  ;;
4008  *)
4009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4010for as_dir in $PATH
4011do
4012  IFS=$as_save_IFS
4013  test -z "$as_dir" && as_dir=.
4014    for ac_exec_ext in '' $ac_executable_extensions; do
4015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4016    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4018    break 2
4019  fi
4020done
4021  done
4022IFS=$as_save_IFS
4023
4024  ;;
4025esac
4026fi
4027CMP=$ac_cv_path_CMP
4028if test -n "$CMP"; then
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4030$as_echo "$CMP" >&6; }
4031else
4032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4033$as_echo "no" >&6; }
4034fi
4035
4036
4037  test -n "$CMP" && break
4038done
4039
4040
4041    if test "x$CMP" = x; then
4042        if test "xcmp" = x; then
4043          PROG_NAME=cmp
4044        else
4045          PROG_NAME=cmp
4046        fi
4047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4049        as_fn_error $? "Cannot continue" "$LINENO" 5
4050    fi
4051
4052
4053
4054    for ac_prog in comm
4055do
4056  # Extract the first word of "$ac_prog", so it can be a program name with args.
4057set dummy $ac_prog; ac_word=$2
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4059$as_echo_n "checking for $ac_word... " >&6; }
4060if test "${ac_cv_path_COMM+set}" = set; then :
4061  $as_echo_n "(cached) " >&6
4062else
4063  case $COMM in
4064  [\\/]* | ?:[\\/]*)
4065  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4066  ;;
4067  *)
4068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4069for as_dir in $PATH
4070do
4071  IFS=$as_save_IFS
4072  test -z "$as_dir" && as_dir=.
4073    for ac_exec_ext in '' $ac_executable_extensions; do
4074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4075    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4077    break 2
4078  fi
4079done
4080  done
4081IFS=$as_save_IFS
4082
4083  ;;
4084esac
4085fi
4086COMM=$ac_cv_path_COMM
4087if test -n "$COMM"; then
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4089$as_echo "$COMM" >&6; }
4090else
4091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4092$as_echo "no" >&6; }
4093fi
4094
4095
4096  test -n "$COMM" && break
4097done
4098
4099
4100    if test "x$COMM" = x; then
4101        if test "xcomm" = x; then
4102          PROG_NAME=comm
4103        else
4104          PROG_NAME=comm
4105        fi
4106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4108        as_fn_error $? "Cannot continue" "$LINENO" 5
4109    fi
4110
4111
4112
4113    for ac_prog in cp
4114do
4115  # Extract the first word of "$ac_prog", so it can be a program name with args.
4116set dummy $ac_prog; ac_word=$2
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4118$as_echo_n "checking for $ac_word... " >&6; }
4119if test "${ac_cv_path_CP+set}" = set; then :
4120  $as_echo_n "(cached) " >&6
4121else
4122  case $CP in
4123  [\\/]* | ?:[\\/]*)
4124  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4125  ;;
4126  *)
4127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4128for as_dir in $PATH
4129do
4130  IFS=$as_save_IFS
4131  test -z "$as_dir" && as_dir=.
4132    for ac_exec_ext in '' $ac_executable_extensions; do
4133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4134    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4136    break 2
4137  fi
4138done
4139  done
4140IFS=$as_save_IFS
4141
4142  ;;
4143esac
4144fi
4145CP=$ac_cv_path_CP
4146if test -n "$CP"; then
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4148$as_echo "$CP" >&6; }
4149else
4150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4151$as_echo "no" >&6; }
4152fi
4153
4154
4155  test -n "$CP" && break
4156done
4157
4158
4159    if test "x$CP" = x; then
4160        if test "xcp" = x; then
4161          PROG_NAME=cp
4162        else
4163          PROG_NAME=cp
4164        fi
4165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4167        as_fn_error $? "Cannot continue" "$LINENO" 5
4168    fi
4169
4170
4171
4172    for ac_prog in cpio
4173do
4174  # Extract the first word of "$ac_prog", so it can be a program name with args.
4175set dummy $ac_prog; ac_word=$2
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4177$as_echo_n "checking for $ac_word... " >&6; }
4178if test "${ac_cv_path_CPIO+set}" = set; then :
4179  $as_echo_n "(cached) " >&6
4180else
4181  case $CPIO in
4182  [\\/]* | ?:[\\/]*)
4183  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4184  ;;
4185  *)
4186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4187for as_dir in $PATH
4188do
4189  IFS=$as_save_IFS
4190  test -z "$as_dir" && as_dir=.
4191    for ac_exec_ext in '' $ac_executable_extensions; do
4192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4193    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4195    break 2
4196  fi
4197done
4198  done
4199IFS=$as_save_IFS
4200
4201  ;;
4202esac
4203fi
4204CPIO=$ac_cv_path_CPIO
4205if test -n "$CPIO"; then
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4207$as_echo "$CPIO" >&6; }
4208else
4209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4210$as_echo "no" >&6; }
4211fi
4212
4213
4214  test -n "$CPIO" && break
4215done
4216
4217
4218    if test "x$CPIO" = x; then
4219        if test "xcpio" = x; then
4220          PROG_NAME=cpio
4221        else
4222          PROG_NAME=cpio
4223        fi
4224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4226        as_fn_error $? "Cannot continue" "$LINENO" 5
4227    fi
4228
4229
4230
4231    for ac_prog in cut
4232do
4233  # Extract the first word of "$ac_prog", so it can be a program name with args.
4234set dummy $ac_prog; ac_word=$2
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4236$as_echo_n "checking for $ac_word... " >&6; }
4237if test "${ac_cv_path_CUT+set}" = set; then :
4238  $as_echo_n "(cached) " >&6
4239else
4240  case $CUT in
4241  [\\/]* | ?:[\\/]*)
4242  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4243  ;;
4244  *)
4245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH
4247do
4248  IFS=$as_save_IFS
4249  test -z "$as_dir" && as_dir=.
4250    for ac_exec_ext in '' $ac_executable_extensions; do
4251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4252    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4254    break 2
4255  fi
4256done
4257  done
4258IFS=$as_save_IFS
4259
4260  ;;
4261esac
4262fi
4263CUT=$ac_cv_path_CUT
4264if test -n "$CUT"; then
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4266$as_echo "$CUT" >&6; }
4267else
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4269$as_echo "no" >&6; }
4270fi
4271
4272
4273  test -n "$CUT" && break
4274done
4275
4276
4277    if test "x$CUT" = x; then
4278        if test "xcut" = x; then
4279          PROG_NAME=cut
4280        else
4281          PROG_NAME=cut
4282        fi
4283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4285        as_fn_error $? "Cannot continue" "$LINENO" 5
4286    fi
4287
4288
4289
4290    for ac_prog in date
4291do
4292  # Extract the first word of "$ac_prog", so it can be a program name with args.
4293set dummy $ac_prog; ac_word=$2
4294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4295$as_echo_n "checking for $ac_word... " >&6; }
4296if test "${ac_cv_path_DATE+set}" = set; then :
4297  $as_echo_n "(cached) " >&6
4298else
4299  case $DATE in
4300  [\\/]* | ?:[\\/]*)
4301  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4302  ;;
4303  *)
4304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4305for as_dir in $PATH
4306do
4307  IFS=$as_save_IFS
4308  test -z "$as_dir" && as_dir=.
4309    for ac_exec_ext in '' $ac_executable_extensions; do
4310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4311    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4313    break 2
4314  fi
4315done
4316  done
4317IFS=$as_save_IFS
4318
4319  ;;
4320esac
4321fi
4322DATE=$ac_cv_path_DATE
4323if test -n "$DATE"; then
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4325$as_echo "$DATE" >&6; }
4326else
4327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4328$as_echo "no" >&6; }
4329fi
4330
4331
4332  test -n "$DATE" && break
4333done
4334
4335
4336    if test "x$DATE" = x; then
4337        if test "xdate" = x; then
4338          PROG_NAME=date
4339        else
4340          PROG_NAME=date
4341        fi
4342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4344        as_fn_error $? "Cannot continue" "$LINENO" 5
4345    fi
4346
4347
4348
4349    for ac_prog in gdiff diff
4350do
4351  # Extract the first word of "$ac_prog", so it can be a program name with args.
4352set dummy $ac_prog; ac_word=$2
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4354$as_echo_n "checking for $ac_word... " >&6; }
4355if test "${ac_cv_path_DIFF+set}" = set; then :
4356  $as_echo_n "(cached) " >&6
4357else
4358  case $DIFF in
4359  [\\/]* | ?:[\\/]*)
4360  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4361  ;;
4362  *)
4363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366  IFS=$as_save_IFS
4367  test -z "$as_dir" && as_dir=.
4368    for ac_exec_ext in '' $ac_executable_extensions; do
4369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4370    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372    break 2
4373  fi
4374done
4375  done
4376IFS=$as_save_IFS
4377
4378  ;;
4379esac
4380fi
4381DIFF=$ac_cv_path_DIFF
4382if test -n "$DIFF"; then
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4384$as_echo "$DIFF" >&6; }
4385else
4386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4387$as_echo "no" >&6; }
4388fi
4389
4390
4391  test -n "$DIFF" && break
4392done
4393
4394
4395    if test "x$DIFF" = x; then
4396        if test "xgdiff diff" = x; then
4397          PROG_NAME=diff
4398        else
4399          PROG_NAME=gdiff diff
4400        fi
4401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4403        as_fn_error $? "Cannot continue" "$LINENO" 5
4404    fi
4405
4406
4407
4408    for ac_prog in dirname
4409do
4410  # Extract the first word of "$ac_prog", so it can be a program name with args.
4411set dummy $ac_prog; ac_word=$2
4412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4413$as_echo_n "checking for $ac_word... " >&6; }
4414if test "${ac_cv_path_DIRNAME+set}" = set; then :
4415  $as_echo_n "(cached) " >&6
4416else
4417  case $DIRNAME in
4418  [\\/]* | ?:[\\/]*)
4419  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4420  ;;
4421  *)
4422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4423for as_dir in $PATH
4424do
4425  IFS=$as_save_IFS
4426  test -z "$as_dir" && as_dir=.
4427    for ac_exec_ext in '' $ac_executable_extensions; do
4428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4429    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4431    break 2
4432  fi
4433done
4434  done
4435IFS=$as_save_IFS
4436
4437  ;;
4438esac
4439fi
4440DIRNAME=$ac_cv_path_DIRNAME
4441if test -n "$DIRNAME"; then
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4443$as_echo "$DIRNAME" >&6; }
4444else
4445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4446$as_echo "no" >&6; }
4447fi
4448
4449
4450  test -n "$DIRNAME" && break
4451done
4452
4453
4454    if test "x$DIRNAME" = x; then
4455        if test "xdirname" = x; then
4456          PROG_NAME=dirname
4457        else
4458          PROG_NAME=dirname
4459        fi
4460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4462        as_fn_error $? "Cannot continue" "$LINENO" 5
4463    fi
4464
4465
4466
4467    for ac_prog in echo
4468do
4469  # Extract the first word of "$ac_prog", so it can be a program name with args.
4470set dummy $ac_prog; ac_word=$2
4471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
4473if test "${ac_cv_path_ECHO+set}" = set; then :
4474  $as_echo_n "(cached) " >&6
4475else
4476  case $ECHO in
4477  [\\/]* | ?:[\\/]*)
4478  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4479  ;;
4480  *)
4481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in $PATH
4483do
4484  IFS=$as_save_IFS
4485  test -z "$as_dir" && as_dir=.
4486    for ac_exec_ext in '' $ac_executable_extensions; do
4487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4488    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490    break 2
4491  fi
4492done
4493  done
4494IFS=$as_save_IFS
4495
4496  ;;
4497esac
4498fi
4499ECHO=$ac_cv_path_ECHO
4500if test -n "$ECHO"; then
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4502$as_echo "$ECHO" >&6; }
4503else
4504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509  test -n "$ECHO" && break
4510done
4511
4512
4513    if test "x$ECHO" = x; then
4514        if test "xecho" = x; then
4515          PROG_NAME=echo
4516        else
4517          PROG_NAME=echo
4518        fi
4519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4521        as_fn_error $? "Cannot continue" "$LINENO" 5
4522    fi
4523
4524
4525
4526    for ac_prog in expr
4527do
4528  # Extract the first word of "$ac_prog", so it can be a program name with args.
4529set dummy $ac_prog; ac_word=$2
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
4532if test "${ac_cv_path_EXPR+set}" = set; then :
4533  $as_echo_n "(cached) " >&6
4534else
4535  case $EXPR in
4536  [\\/]* | ?:[\\/]*)
4537  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4538  ;;
4539  *)
4540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in $PATH
4542do
4543  IFS=$as_save_IFS
4544  test -z "$as_dir" && as_dir=.
4545    for ac_exec_ext in '' $ac_executable_extensions; do
4546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4547    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4549    break 2
4550  fi
4551done
4552  done
4553IFS=$as_save_IFS
4554
4555  ;;
4556esac
4557fi
4558EXPR=$ac_cv_path_EXPR
4559if test -n "$EXPR"; then
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4561$as_echo "$EXPR" >&6; }
4562else
4563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
4565fi
4566
4567
4568  test -n "$EXPR" && break
4569done
4570
4571
4572    if test "x$EXPR" = x; then
4573        if test "xexpr" = x; then
4574          PROG_NAME=expr
4575        else
4576          PROG_NAME=expr
4577        fi
4578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4580        as_fn_error $? "Cannot continue" "$LINENO" 5
4581    fi
4582
4583
4584
4585    for ac_prog in file
4586do
4587  # Extract the first word of "$ac_prog", so it can be a program name with args.
4588set dummy $ac_prog; ac_word=$2
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4590$as_echo_n "checking for $ac_word... " >&6; }
4591if test "${ac_cv_path_FILE+set}" = set; then :
4592  $as_echo_n "(cached) " >&6
4593else
4594  case $FILE in
4595  [\\/]* | ?:[\\/]*)
4596  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4597  ;;
4598  *)
4599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4600for as_dir in $PATH
4601do
4602  IFS=$as_save_IFS
4603  test -z "$as_dir" && as_dir=.
4604    for ac_exec_ext in '' $ac_executable_extensions; do
4605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4606    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4608    break 2
4609  fi
4610done
4611  done
4612IFS=$as_save_IFS
4613
4614  ;;
4615esac
4616fi
4617FILE=$ac_cv_path_FILE
4618if test -n "$FILE"; then
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4620$as_echo "$FILE" >&6; }
4621else
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4623$as_echo "no" >&6; }
4624fi
4625
4626
4627  test -n "$FILE" && break
4628done
4629
4630
4631    if test "x$FILE" = x; then
4632        if test "xfile" = x; then
4633          PROG_NAME=file
4634        else
4635          PROG_NAME=file
4636        fi
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4639        as_fn_error $? "Cannot continue" "$LINENO" 5
4640    fi
4641
4642
4643
4644    for ac_prog in find
4645do
4646  # Extract the first word of "$ac_prog", so it can be a program name with args.
4647set dummy $ac_prog; ac_word=$2
4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
4650if test "${ac_cv_path_FIND+set}" = set; then :
4651  $as_echo_n "(cached) " >&6
4652else
4653  case $FIND in
4654  [\\/]* | ?:[\\/]*)
4655  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4656  ;;
4657  *)
4658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4659for as_dir in $PATH
4660do
4661  IFS=$as_save_IFS
4662  test -z "$as_dir" && as_dir=.
4663    for ac_exec_ext in '' $ac_executable_extensions; do
4664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4665    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4667    break 2
4668  fi
4669done
4670  done
4671IFS=$as_save_IFS
4672
4673  ;;
4674esac
4675fi
4676FIND=$ac_cv_path_FIND
4677if test -n "$FIND"; then
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4679$as_echo "$FIND" >&6; }
4680else
4681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4682$as_echo "no" >&6; }
4683fi
4684
4685
4686  test -n "$FIND" && break
4687done
4688
4689
4690    if test "x$FIND" = x; then
4691        if test "xfind" = x; then
4692          PROG_NAME=find
4693        else
4694          PROG_NAME=find
4695        fi
4696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4698        as_fn_error $? "Cannot continue" "$LINENO" 5
4699    fi
4700
4701
4702
4703    for ac_prog in head
4704do
4705  # Extract the first word of "$ac_prog", so it can be a program name with args.
4706set dummy $ac_prog; ac_word=$2
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4708$as_echo_n "checking for $ac_word... " >&6; }
4709if test "${ac_cv_path_HEAD+set}" = set; then :
4710  $as_echo_n "(cached) " >&6
4711else
4712  case $HEAD in
4713  [\\/]* | ?:[\\/]*)
4714  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4715  ;;
4716  *)
4717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4718for as_dir in $PATH
4719do
4720  IFS=$as_save_IFS
4721  test -z "$as_dir" && as_dir=.
4722    for ac_exec_ext in '' $ac_executable_extensions; do
4723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4724    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4726    break 2
4727  fi
4728done
4729  done
4730IFS=$as_save_IFS
4731
4732  ;;
4733esac
4734fi
4735HEAD=$ac_cv_path_HEAD
4736if test -n "$HEAD"; then
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4738$as_echo "$HEAD" >&6; }
4739else
4740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4741$as_echo "no" >&6; }
4742fi
4743
4744
4745  test -n "$HEAD" && break
4746done
4747
4748
4749    if test "x$HEAD" = x; then
4750        if test "xhead" = x; then
4751          PROG_NAME=head
4752        else
4753          PROG_NAME=head
4754        fi
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4757        as_fn_error $? "Cannot continue" "$LINENO" 5
4758    fi
4759
4760
4761
4762    for ac_prog in ln
4763do
4764  # Extract the first word of "$ac_prog", so it can be a program name with args.
4765set dummy $ac_prog; ac_word=$2
4766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
4768if test "${ac_cv_path_LN+set}" = set; then :
4769  $as_echo_n "(cached) " >&6
4770else
4771  case $LN in
4772  [\\/]* | ?:[\\/]*)
4773  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4774  ;;
4775  *)
4776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in $PATH
4778do
4779  IFS=$as_save_IFS
4780  test -z "$as_dir" && as_dir=.
4781    for ac_exec_ext in '' $ac_executable_extensions; do
4782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4783    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4785    break 2
4786  fi
4787done
4788  done
4789IFS=$as_save_IFS
4790
4791  ;;
4792esac
4793fi
4794LN=$ac_cv_path_LN
4795if test -n "$LN"; then
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4797$as_echo "$LN" >&6; }
4798else
4799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
4801fi
4802
4803
4804  test -n "$LN" && break
4805done
4806
4807
4808    if test "x$LN" = x; then
4809        if test "xln" = x; then
4810          PROG_NAME=ln
4811        else
4812          PROG_NAME=ln
4813        fi
4814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4816        as_fn_error $? "Cannot continue" "$LINENO" 5
4817    fi
4818
4819
4820
4821    for ac_prog in ls
4822do
4823  # Extract the first word of "$ac_prog", so it can be a program name with args.
4824set dummy $ac_prog; ac_word=$2
4825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if test "${ac_cv_path_LS+set}" = set; then :
4828  $as_echo_n "(cached) " >&6
4829else
4830  case $LS in
4831  [\\/]* | ?:[\\/]*)
4832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4833  ;;
4834  *)
4835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in $PATH
4837do
4838  IFS=$as_save_IFS
4839  test -z "$as_dir" && as_dir=.
4840    for ac_exec_ext in '' $ac_executable_extensions; do
4841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844    break 2
4845  fi
4846done
4847  done
4848IFS=$as_save_IFS
4849
4850  ;;
4851esac
4852fi
4853LS=$ac_cv_path_LS
4854if test -n "$LS"; then
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4856$as_echo "$LS" >&6; }
4857else
4858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
4862
4863  test -n "$LS" && break
4864done
4865
4866
4867    if test "x$LS" = x; then
4868        if test "xls" = x; then
4869          PROG_NAME=ls
4870        else
4871          PROG_NAME=ls
4872        fi
4873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4875        as_fn_error $? "Cannot continue" "$LINENO" 5
4876    fi
4877
4878
4879
4880    for ac_prog in mkdir
4881do
4882  # Extract the first word of "$ac_prog", so it can be a program name with args.
4883set dummy $ac_prog; ac_word=$2
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885$as_echo_n "checking for $ac_word... " >&6; }
4886if test "${ac_cv_path_MKDIR+set}" = set; then :
4887  $as_echo_n "(cached) " >&6
4888else
4889  case $MKDIR in
4890  [\\/]* | ?:[\\/]*)
4891  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4892  ;;
4893  *)
4894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895for as_dir in $PATH
4896do
4897  IFS=$as_save_IFS
4898  test -z "$as_dir" && as_dir=.
4899    for ac_exec_ext in '' $ac_executable_extensions; do
4900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4901    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903    break 2
4904  fi
4905done
4906  done
4907IFS=$as_save_IFS
4908
4909  ;;
4910esac
4911fi
4912MKDIR=$ac_cv_path_MKDIR
4913if test -n "$MKDIR"; then
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4915$as_echo "$MKDIR" >&6; }
4916else
4917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918$as_echo "no" >&6; }
4919fi
4920
4921
4922  test -n "$MKDIR" && break
4923done
4924
4925
4926    if test "x$MKDIR" = x; then
4927        if test "xmkdir" = x; then
4928          PROG_NAME=mkdir
4929        else
4930          PROG_NAME=mkdir
4931        fi
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4934        as_fn_error $? "Cannot continue" "$LINENO" 5
4935    fi
4936
4937
4938
4939    for ac_prog in mktemp
4940do
4941  # Extract the first word of "$ac_prog", so it can be a program name with args.
4942set dummy $ac_prog; ac_word=$2
4943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if test "${ac_cv_path_MKTEMP+set}" = set; then :
4946  $as_echo_n "(cached) " >&6
4947else
4948  case $MKTEMP in
4949  [\\/]* | ?:[\\/]*)
4950  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4951  ;;
4952  *)
4953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in $PATH
4955do
4956  IFS=$as_save_IFS
4957  test -z "$as_dir" && as_dir=.
4958    for ac_exec_ext in '' $ac_executable_extensions; do
4959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4960    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962    break 2
4963  fi
4964done
4965  done
4966IFS=$as_save_IFS
4967
4968  ;;
4969esac
4970fi
4971MKTEMP=$ac_cv_path_MKTEMP
4972if test -n "$MKTEMP"; then
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4974$as_echo "$MKTEMP" >&6; }
4975else
4976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
4980
4981  test -n "$MKTEMP" && break
4982done
4983
4984
4985    if test "x$MKTEMP" = x; then
4986        if test "xmktemp" = x; then
4987          PROG_NAME=mktemp
4988        else
4989          PROG_NAME=mktemp
4990        fi
4991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4993        as_fn_error $? "Cannot continue" "$LINENO" 5
4994    fi
4995
4996
4997
4998    for ac_prog in mv
4999do
5000  # Extract the first word of "$ac_prog", so it can be a program name with args.
5001set dummy $ac_prog; ac_word=$2
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5003$as_echo_n "checking for $ac_word... " >&6; }
5004if test "${ac_cv_path_MV+set}" = set; then :
5005  $as_echo_n "(cached) " >&6
5006else
5007  case $MV in
5008  [\\/]* | ?:[\\/]*)
5009  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5010  ;;
5011  *)
5012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013for as_dir in $PATH
5014do
5015  IFS=$as_save_IFS
5016  test -z "$as_dir" && as_dir=.
5017    for ac_exec_ext in '' $ac_executable_extensions; do
5018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5019    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021    break 2
5022  fi
5023done
5024  done
5025IFS=$as_save_IFS
5026
5027  ;;
5028esac
5029fi
5030MV=$ac_cv_path_MV
5031if test -n "$MV"; then
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5033$as_echo "$MV" >&6; }
5034else
5035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5036$as_echo "no" >&6; }
5037fi
5038
5039
5040  test -n "$MV" && break
5041done
5042
5043
5044    if test "x$MV" = x; then
5045        if test "xmv" = x; then
5046          PROG_NAME=mv
5047        else
5048          PROG_NAME=mv
5049        fi
5050        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5051$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5052        as_fn_error $? "Cannot continue" "$LINENO" 5
5053    fi
5054
5055
5056
5057    for ac_prog in printf
5058do
5059  # Extract the first word of "$ac_prog", so it can be a program name with args.
5060set dummy $ac_prog; ac_word=$2
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5062$as_echo_n "checking for $ac_word... " >&6; }
5063if test "${ac_cv_path_PRINTF+set}" = set; then :
5064  $as_echo_n "(cached) " >&6
5065else
5066  case $PRINTF in
5067  [\\/]* | ?:[\\/]*)
5068  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5069  ;;
5070  *)
5071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5072for as_dir in $PATH
5073do
5074  IFS=$as_save_IFS
5075  test -z "$as_dir" && as_dir=.
5076    for ac_exec_ext in '' $ac_executable_extensions; do
5077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5078    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5080    break 2
5081  fi
5082done
5083  done
5084IFS=$as_save_IFS
5085
5086  ;;
5087esac
5088fi
5089PRINTF=$ac_cv_path_PRINTF
5090if test -n "$PRINTF"; then
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5092$as_echo "$PRINTF" >&6; }
5093else
5094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099  test -n "$PRINTF" && break
5100done
5101
5102
5103    if test "x$PRINTF" = x; then
5104        if test "xprintf" = x; then
5105          PROG_NAME=printf
5106        else
5107          PROG_NAME=printf
5108        fi
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5110$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5111        as_fn_error $? "Cannot continue" "$LINENO" 5
5112    fi
5113
5114
5115
5116    for ac_prog in pwd
5117do
5118  # Extract the first word of "$ac_prog", so it can be a program name with args.
5119set dummy $ac_prog; ac_word=$2
5120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5121$as_echo_n "checking for $ac_word... " >&6; }
5122if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5123  $as_echo_n "(cached) " >&6
5124else
5125  case $THEPWDCMD in
5126  [\\/]* | ?:[\\/]*)
5127  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5128  ;;
5129  *)
5130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5131for as_dir in $PATH
5132do
5133  IFS=$as_save_IFS
5134  test -z "$as_dir" && as_dir=.
5135    for ac_exec_ext in '' $ac_executable_extensions; do
5136  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5137    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5139    break 2
5140  fi
5141done
5142  done
5143IFS=$as_save_IFS
5144
5145  ;;
5146esac
5147fi
5148THEPWDCMD=$ac_cv_path_THEPWDCMD
5149if test -n "$THEPWDCMD"; then
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5151$as_echo "$THEPWDCMD" >&6; }
5152else
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5154$as_echo "no" >&6; }
5155fi
5156
5157
5158  test -n "$THEPWDCMD" && break
5159done
5160
5161
5162    if test "x$THEPWDCMD" = x; then
5163        if test "xpwd" = x; then
5164          PROG_NAME=thepwdcmd
5165        else
5166          PROG_NAME=pwd
5167        fi
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5169$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5170        as_fn_error $? "Cannot continue" "$LINENO" 5
5171    fi
5172
5173
5174
5175    for ac_prog in rm
5176do
5177  # Extract the first word of "$ac_prog", so it can be a program name with args.
5178set dummy $ac_prog; ac_word=$2
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5180$as_echo_n "checking for $ac_word... " >&6; }
5181if test "${ac_cv_path_RM+set}" = set; then :
5182  $as_echo_n "(cached) " >&6
5183else
5184  case $RM in
5185  [\\/]* | ?:[\\/]*)
5186  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5187  ;;
5188  *)
5189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192  IFS=$as_save_IFS
5193  test -z "$as_dir" && as_dir=.
5194    for ac_exec_ext in '' $ac_executable_extensions; do
5195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5196    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198    break 2
5199  fi
5200done
5201  done
5202IFS=$as_save_IFS
5203
5204  ;;
5205esac
5206fi
5207RM=$ac_cv_path_RM
5208if test -n "$RM"; then
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5210$as_echo "$RM" >&6; }
5211else
5212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217  test -n "$RM" && break
5218done
5219
5220
5221    if test "x$RM" = x; then
5222        if test "xrm" = x; then
5223          PROG_NAME=rm
5224        else
5225          PROG_NAME=rm
5226        fi
5227        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5228$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5229        as_fn_error $? "Cannot continue" "$LINENO" 5
5230    fi
5231
5232
5233
5234    for ac_prog in sh
5235do
5236  # Extract the first word of "$ac_prog", so it can be a program name with args.
5237set dummy $ac_prog; 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 test "${ac_cv_path_SH+set}" = set; then :
5241  $as_echo_n "(cached) " >&6
5242else
5243  case $SH in
5244  [\\/]* | ?:[\\/]*)
5245  ac_cv_path_SH="$SH" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5255    ac_cv_path_SH="$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
5266SH=$ac_cv_path_SH
5267if test -n "$SH"; then
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5269$as_echo "$SH" >&6; }
5270else
5271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272$as_echo "no" >&6; }
5273fi
5274
5275
5276  test -n "$SH" && break
5277done
5278
5279
5280    if test "x$SH" = x; then
5281        if test "xsh" = x; then
5282          PROG_NAME=sh
5283        else
5284          PROG_NAME=sh
5285        fi
5286        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5287$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5288        as_fn_error $? "Cannot continue" "$LINENO" 5
5289    fi
5290
5291
5292
5293    for ac_prog in sort
5294do
5295  # Extract the first word of "$ac_prog", so it can be a program name with args.
5296set dummy $ac_prog; ac_word=$2
5297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5298$as_echo_n "checking for $ac_word... " >&6; }
5299if test "${ac_cv_path_SORT+set}" = set; then :
5300  $as_echo_n "(cached) " >&6
5301else
5302  case $SORT in
5303  [\\/]* | ?:[\\/]*)
5304  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5305  ;;
5306  *)
5307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5308for as_dir in $PATH
5309do
5310  IFS=$as_save_IFS
5311  test -z "$as_dir" && as_dir=.
5312    for ac_exec_ext in '' $ac_executable_extensions; do
5313  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5314    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5316    break 2
5317  fi
5318done
5319  done
5320IFS=$as_save_IFS
5321
5322  ;;
5323esac
5324fi
5325SORT=$ac_cv_path_SORT
5326if test -n "$SORT"; then
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5328$as_echo "$SORT" >&6; }
5329else
5330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333
5334
5335  test -n "$SORT" && break
5336done
5337
5338
5339    if test "x$SORT" = x; then
5340        if test "xsort" = x; then
5341          PROG_NAME=sort
5342        else
5343          PROG_NAME=sort
5344        fi
5345        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5346$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5347        as_fn_error $? "Cannot continue" "$LINENO" 5
5348    fi
5349
5350
5351
5352    for ac_prog in tail
5353do
5354  # Extract the first word of "$ac_prog", so it can be a program name with args.
5355set dummy $ac_prog; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if test "${ac_cv_path_TAIL+set}" = set; then :
5359  $as_echo_n "(cached) " >&6
5360else
5361  case $TAIL in
5362  [\\/]* | ?:[\\/]*)
5363  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5364  ;;
5365  *)
5366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369  IFS=$as_save_IFS
5370  test -z "$as_dir" && as_dir=.
5371    for ac_exec_ext in '' $ac_executable_extensions; do
5372  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5373    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375    break 2
5376  fi
5377done
5378  done
5379IFS=$as_save_IFS
5380
5381  ;;
5382esac
5383fi
5384TAIL=$ac_cv_path_TAIL
5385if test -n "$TAIL"; then
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5387$as_echo "$TAIL" >&6; }
5388else
5389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394  test -n "$TAIL" && break
5395done
5396
5397
5398    if test "x$TAIL" = x; then
5399        if test "xtail" = x; then
5400          PROG_NAME=tail
5401        else
5402          PROG_NAME=tail
5403        fi
5404        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5405$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5406        as_fn_error $? "Cannot continue" "$LINENO" 5
5407    fi
5408
5409
5410
5411    for ac_prog in tar
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if test "${ac_cv_path_TAR+set}" = set; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $TAR in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443TAR=$ac_cv_path_TAR
5444if test -n "$TAR"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5446$as_echo "$TAR" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$TAR" && break
5454done
5455
5456
5457    if test "x$TAR" = x; then
5458        if test "xtar" = x; then
5459          PROG_NAME=tar
5460        else
5461          PROG_NAME=tar
5462        fi
5463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5464$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5465        as_fn_error $? "Cannot continue" "$LINENO" 5
5466    fi
5467
5468
5469
5470    for ac_prog in tee
5471do
5472  # Extract the first word of "$ac_prog", so it can be a program name with args.
5473set dummy $ac_prog; ac_word=$2
5474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5475$as_echo_n "checking for $ac_word... " >&6; }
5476if test "${ac_cv_path_TEE+set}" = set; then :
5477  $as_echo_n "(cached) " >&6
5478else
5479  case $TEE in
5480  [\\/]* | ?:[\\/]*)
5481  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5482  ;;
5483  *)
5484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5485for as_dir in $PATH
5486do
5487  IFS=$as_save_IFS
5488  test -z "$as_dir" && as_dir=.
5489    for ac_exec_ext in '' $ac_executable_extensions; do
5490  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5491    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5493    break 2
5494  fi
5495done
5496  done
5497IFS=$as_save_IFS
5498
5499  ;;
5500esac
5501fi
5502TEE=$ac_cv_path_TEE
5503if test -n "$TEE"; then
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5505$as_echo "$TEE" >&6; }
5506else
5507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5508$as_echo "no" >&6; }
5509fi
5510
5511
5512  test -n "$TEE" && break
5513done
5514
5515
5516    if test "x$TEE" = x; then
5517        if test "xtee" = x; then
5518          PROG_NAME=tee
5519        else
5520          PROG_NAME=tee
5521        fi
5522        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5523$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5524        as_fn_error $? "Cannot continue" "$LINENO" 5
5525    fi
5526
5527
5528
5529    for ac_prog in touch
5530do
5531  # Extract the first word of "$ac_prog", so it can be a program name with args.
5532set dummy $ac_prog; ac_word=$2
5533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
5535if test "${ac_cv_path_TOUCH+set}" = set; then :
5536  $as_echo_n "(cached) " >&6
5537else
5538  case $TOUCH in
5539  [\\/]* | ?:[\\/]*)
5540  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5541  ;;
5542  *)
5543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546  IFS=$as_save_IFS
5547  test -z "$as_dir" && as_dir=.
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5550    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5552    break 2
5553  fi
5554done
5555  done
5556IFS=$as_save_IFS
5557
5558  ;;
5559esac
5560fi
5561TOUCH=$ac_cv_path_TOUCH
5562if test -n "$TOUCH"; then
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5564$as_echo "$TOUCH" >&6; }
5565else
5566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
5568fi
5569
5570
5571  test -n "$TOUCH" && break
5572done
5573
5574
5575    if test "x$TOUCH" = x; then
5576        if test "xtouch" = x; then
5577          PROG_NAME=touch
5578        else
5579          PROG_NAME=touch
5580        fi
5581        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5582$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5583        as_fn_error $? "Cannot continue" "$LINENO" 5
5584    fi
5585
5586
5587
5588    for ac_prog in tr
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if test "${ac_cv_path_TR+set}" = set; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $TR in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5609    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620TR=$ac_cv_path_TR
5621if test -n "$TR"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5623$as_echo "$TR" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$TR" && break
5631done
5632
5633
5634    if test "x$TR" = x; then
5635        if test "xtr" = x; then
5636          PROG_NAME=tr
5637        else
5638          PROG_NAME=tr
5639        fi
5640        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5641$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5642        as_fn_error $? "Cannot continue" "$LINENO" 5
5643    fi
5644
5645
5646
5647    for ac_prog in uname
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if test "${ac_cv_path_UNAME+set}" = set; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $UNAME in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5668    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679UNAME=$ac_cv_path_UNAME
5680if test -n "$UNAME"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5682$as_echo "$UNAME" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$UNAME" && break
5690done
5691
5692
5693    if test "x$UNAME" = x; then
5694        if test "xuname" = x; then
5695          PROG_NAME=uname
5696        else
5697          PROG_NAME=uname
5698        fi
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5700$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5701        as_fn_error $? "Cannot continue" "$LINENO" 5
5702    fi
5703
5704
5705
5706    for ac_prog in uniq
5707do
5708  # Extract the first word of "$ac_prog", so it can be a program name with args.
5709set dummy $ac_prog; ac_word=$2
5710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
5712if test "${ac_cv_path_UNIQ+set}" = set; then :
5713  $as_echo_n "(cached) " >&6
5714else
5715  case $UNIQ in
5716  [\\/]* | ?:[\\/]*)
5717  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5718  ;;
5719  *)
5720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5721for as_dir in $PATH
5722do
5723  IFS=$as_save_IFS
5724  test -z "$as_dir" && as_dir=.
5725    for ac_exec_ext in '' $ac_executable_extensions; do
5726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5727    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5729    break 2
5730  fi
5731done
5732  done
5733IFS=$as_save_IFS
5734
5735  ;;
5736esac
5737fi
5738UNIQ=$ac_cv_path_UNIQ
5739if test -n "$UNIQ"; then
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5741$as_echo "$UNIQ" >&6; }
5742else
5743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5744$as_echo "no" >&6; }
5745fi
5746
5747
5748  test -n "$UNIQ" && break
5749done
5750
5751
5752    if test "x$UNIQ" = x; then
5753        if test "xuniq" = x; then
5754          PROG_NAME=uniq
5755        else
5756          PROG_NAME=uniq
5757        fi
5758        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5759$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5760        as_fn_error $? "Cannot continue" "$LINENO" 5
5761    fi
5762
5763
5764
5765    for ac_prog in wc
5766do
5767  # Extract the first word of "$ac_prog", so it can be a program name with args.
5768set dummy $ac_prog; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
5771if test "${ac_cv_path_WC+set}" = set; then :
5772  $as_echo_n "(cached) " >&6
5773else
5774  case $WC in
5775  [\\/]* | ?:[\\/]*)
5776  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5777  ;;
5778  *)
5779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5780for as_dir in $PATH
5781do
5782  IFS=$as_save_IFS
5783  test -z "$as_dir" && as_dir=.
5784    for ac_exec_ext in '' $ac_executable_extensions; do
5785  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5786    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5788    break 2
5789  fi
5790done
5791  done
5792IFS=$as_save_IFS
5793
5794  ;;
5795esac
5796fi
5797WC=$ac_cv_path_WC
5798if test -n "$WC"; then
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5800$as_echo "$WC" >&6; }
5801else
5802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803$as_echo "no" >&6; }
5804fi
5805
5806
5807  test -n "$WC" && break
5808done
5809
5810
5811    if test "x$WC" = x; then
5812        if test "xwc" = x; then
5813          PROG_NAME=wc
5814        else
5815          PROG_NAME=wc
5816        fi
5817        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5818$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5819        as_fn_error $? "Cannot continue" "$LINENO" 5
5820    fi
5821
5822
5823
5824    for ac_prog in which
5825do
5826  # Extract the first word of "$ac_prog", so it can be a program name with args.
5827set dummy $ac_prog; ac_word=$2
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5829$as_echo_n "checking for $ac_word... " >&6; }
5830if test "${ac_cv_path_WHICH+set}" = set; then :
5831  $as_echo_n "(cached) " >&6
5832else
5833  case $WHICH in
5834  [\\/]* | ?:[\\/]*)
5835  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5836  ;;
5837  *)
5838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841  IFS=$as_save_IFS
5842  test -z "$as_dir" && as_dir=.
5843    for ac_exec_ext in '' $ac_executable_extensions; do
5844  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5845    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5847    break 2
5848  fi
5849done
5850  done
5851IFS=$as_save_IFS
5852
5853  ;;
5854esac
5855fi
5856WHICH=$ac_cv_path_WHICH
5857if test -n "$WHICH"; then
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5859$as_echo "$WHICH" >&6; }
5860else
5861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863fi
5864
5865
5866  test -n "$WHICH" && break
5867done
5868
5869
5870    if test "x$WHICH" = x; then
5871        if test "xwhich" = x; then
5872          PROG_NAME=which
5873        else
5874          PROG_NAME=which
5875        fi
5876        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5877$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5878        as_fn_error $? "Cannot continue" "$LINENO" 5
5879    fi
5880
5881
5882
5883    for ac_prog in xargs
5884do
5885  # Extract the first word of "$ac_prog", so it can be a program name with args.
5886set dummy $ac_prog; ac_word=$2
5887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5888$as_echo_n "checking for $ac_word... " >&6; }
5889if test "${ac_cv_path_XARGS+set}" = set; then :
5890  $as_echo_n "(cached) " >&6
5891else
5892  case $XARGS in
5893  [\\/]* | ?:[\\/]*)
5894  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5895  ;;
5896  *)
5897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5898for as_dir in $PATH
5899do
5900  IFS=$as_save_IFS
5901  test -z "$as_dir" && as_dir=.
5902    for ac_exec_ext in '' $ac_executable_extensions; do
5903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5904    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5906    break 2
5907  fi
5908done
5909  done
5910IFS=$as_save_IFS
5911
5912  ;;
5913esac
5914fi
5915XARGS=$ac_cv_path_XARGS
5916if test -n "$XARGS"; then
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5918$as_echo "$XARGS" >&6; }
5919else
5920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5921$as_echo "no" >&6; }
5922fi
5923
5924
5925  test -n "$XARGS" && break
5926done
5927
5928
5929    if test "x$XARGS" = x; then
5930        if test "xxargs" = x; then
5931          PROG_NAME=xargs
5932        else
5933          PROG_NAME=xargs
5934        fi
5935        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5936$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5937        as_fn_error $? "Cannot continue" "$LINENO" 5
5938    fi
5939
5940
5941
5942# Then required tools that require some special treatment.
5943for ac_prog in gawk mawk nawk awk
5944do
5945  # Extract the first word of "$ac_prog", so it can be a program name with args.
5946set dummy $ac_prog; ac_word=$2
5947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5948$as_echo_n "checking for $ac_word... " >&6; }
5949if test "${ac_cv_prog_AWK+set}" = set; then :
5950  $as_echo_n "(cached) " >&6
5951else
5952  if test -n "$AWK"; then
5953  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5954else
5955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5962    ac_cv_prog_AWK="$ac_prog"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970fi
5971fi
5972AWK=$ac_cv_prog_AWK
5973if test -n "$AWK"; then
5974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5975$as_echo "$AWK" >&6; }
5976else
5977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5978$as_echo "no" >&6; }
5979fi
5980
5981
5982  test -n "$AWK" && break
5983done
5984
5985
5986    if test "x$AWK" = x; then
5987        if test "x" = x; then
5988          PROG_NAME=awk
5989        else
5990          PROG_NAME=
5991        fi
5992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5993$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5994        as_fn_error $? "Cannot continue" "$LINENO" 5
5995    fi
5996
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5998$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5999if test "${ac_cv_path_GREP+set}" = set; then :
6000  $as_echo_n "(cached) " >&6
6001else
6002  if test -z "$GREP"; then
6003  ac_path_GREP_found=false
6004  # Loop through the user's path and test for each of PROGNAME-LIST
6005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6007do
6008  IFS=$as_save_IFS
6009  test -z "$as_dir" && as_dir=.
6010    for ac_prog in grep ggrep; do
6011    for ac_exec_ext in '' $ac_executable_extensions; do
6012      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6013      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6014# Check for GNU ac_path_GREP and select it if it is found.
6015  # Check for GNU $ac_path_GREP
6016case `"$ac_path_GREP" --version 2>&1` in
6017*GNU*)
6018  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6019*)
6020  ac_count=0
6021  $as_echo_n 0123456789 >"conftest.in"
6022  while :
6023  do
6024    cat "conftest.in" "conftest.in" >"conftest.tmp"
6025    mv "conftest.tmp" "conftest.in"
6026    cp "conftest.in" "conftest.nl"
6027    $as_echo 'GREP' >> "conftest.nl"
6028    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6029    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6030    as_fn_arith $ac_count + 1 && ac_count=$as_val
6031    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6032      # Best one so far, save it but keep looking for a better one
6033      ac_cv_path_GREP="$ac_path_GREP"
6034      ac_path_GREP_max=$ac_count
6035    fi
6036    # 10*(2^10) chars as input seems more than enough
6037    test $ac_count -gt 10 && break
6038  done
6039  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6040esac
6041
6042      $ac_path_GREP_found && break 3
6043    done
6044  done
6045  done
6046IFS=$as_save_IFS
6047  if test -z "$ac_cv_path_GREP"; then
6048    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6049  fi
6050else
6051  ac_cv_path_GREP=$GREP
6052fi
6053
6054fi
6055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6056$as_echo "$ac_cv_path_GREP" >&6; }
6057 GREP="$ac_cv_path_GREP"
6058
6059
6060
6061    if test "x$GREP" = x; then
6062        if test "x" = x; then
6063          PROG_NAME=grep
6064        else
6065          PROG_NAME=
6066        fi
6067        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6068$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6069        as_fn_error $? "Cannot continue" "$LINENO" 5
6070    fi
6071
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6073$as_echo_n "checking for egrep... " >&6; }
6074if test "${ac_cv_path_EGREP+set}" = set; then :
6075  $as_echo_n "(cached) " >&6
6076else
6077  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6078   then ac_cv_path_EGREP="$GREP -E"
6079   else
6080     if test -z "$EGREP"; then
6081  ac_path_EGREP_found=false
6082  # Loop through the user's path and test for each of PROGNAME-LIST
6083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6085do
6086  IFS=$as_save_IFS
6087  test -z "$as_dir" && as_dir=.
6088    for ac_prog in egrep; do
6089    for ac_exec_ext in '' $ac_executable_extensions; do
6090      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6091      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6092# Check for GNU ac_path_EGREP and select it if it is found.
6093  # Check for GNU $ac_path_EGREP
6094case `"$ac_path_EGREP" --version 2>&1` in
6095*GNU*)
6096  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6097*)
6098  ac_count=0
6099  $as_echo_n 0123456789 >"conftest.in"
6100  while :
6101  do
6102    cat "conftest.in" "conftest.in" >"conftest.tmp"
6103    mv "conftest.tmp" "conftest.in"
6104    cp "conftest.in" "conftest.nl"
6105    $as_echo 'EGREP' >> "conftest.nl"
6106    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6107    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6108    as_fn_arith $ac_count + 1 && ac_count=$as_val
6109    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6110      # Best one so far, save it but keep looking for a better one
6111      ac_cv_path_EGREP="$ac_path_EGREP"
6112      ac_path_EGREP_max=$ac_count
6113    fi
6114    # 10*(2^10) chars as input seems more than enough
6115    test $ac_count -gt 10 && break
6116  done
6117  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6118esac
6119
6120      $ac_path_EGREP_found && break 3
6121    done
6122  done
6123  done
6124IFS=$as_save_IFS
6125  if test -z "$ac_cv_path_EGREP"; then
6126    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6127  fi
6128else
6129  ac_cv_path_EGREP=$EGREP
6130fi
6131
6132   fi
6133fi
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6135$as_echo "$ac_cv_path_EGREP" >&6; }
6136 EGREP="$ac_cv_path_EGREP"
6137
6138
6139
6140    if test "x$EGREP" = x; then
6141        if test "x" = x; then
6142          PROG_NAME=egrep
6143        else
6144          PROG_NAME=
6145        fi
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6147$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6148        as_fn_error $? "Cannot continue" "$LINENO" 5
6149    fi
6150
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6152$as_echo_n "checking for fgrep... " >&6; }
6153if test "${ac_cv_path_FGREP+set}" = set; then :
6154  $as_echo_n "(cached) " >&6
6155else
6156  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6157   then ac_cv_path_FGREP="$GREP -F"
6158   else
6159     if test -z "$FGREP"; then
6160  ac_path_FGREP_found=false
6161  # Loop through the user's path and test for each of PROGNAME-LIST
6162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6163for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6164do
6165  IFS=$as_save_IFS
6166  test -z "$as_dir" && as_dir=.
6167    for ac_prog in fgrep; do
6168    for ac_exec_ext in '' $ac_executable_extensions; do
6169      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6170      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6171# Check for GNU ac_path_FGREP and select it if it is found.
6172  # Check for GNU $ac_path_FGREP
6173case `"$ac_path_FGREP" --version 2>&1` in
6174*GNU*)
6175  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6176*)
6177  ac_count=0
6178  $as_echo_n 0123456789 >"conftest.in"
6179  while :
6180  do
6181    cat "conftest.in" "conftest.in" >"conftest.tmp"
6182    mv "conftest.tmp" "conftest.in"
6183    cp "conftest.in" "conftest.nl"
6184    $as_echo 'FGREP' >> "conftest.nl"
6185    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6186    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6187    as_fn_arith $ac_count + 1 && ac_count=$as_val
6188    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6189      # Best one so far, save it but keep looking for a better one
6190      ac_cv_path_FGREP="$ac_path_FGREP"
6191      ac_path_FGREP_max=$ac_count
6192    fi
6193    # 10*(2^10) chars as input seems more than enough
6194    test $ac_count -gt 10 && break
6195  done
6196  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6197esac
6198
6199      $ac_path_FGREP_found && break 3
6200    done
6201  done
6202  done
6203IFS=$as_save_IFS
6204  if test -z "$ac_cv_path_FGREP"; then
6205    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6206  fi
6207else
6208  ac_cv_path_FGREP=$FGREP
6209fi
6210
6211   fi
6212fi
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6214$as_echo "$ac_cv_path_FGREP" >&6; }
6215 FGREP="$ac_cv_path_FGREP"
6216
6217
6218
6219    if test "x$FGREP" = x; then
6220        if test "x" = x; then
6221          PROG_NAME=fgrep
6222        else
6223          PROG_NAME=
6224        fi
6225        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6226$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6227        as_fn_error $? "Cannot continue" "$LINENO" 5
6228    fi
6229
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6231$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6232if test "${ac_cv_path_SED+set}" = set; then :
6233  $as_echo_n "(cached) " >&6
6234else
6235            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6236     for ac_i in 1 2 3 4 5 6 7; do
6237       ac_script="$ac_script$as_nl$ac_script"
6238     done
6239     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6240     { ac_script=; unset ac_script;}
6241     if test -z "$SED"; then
6242  ac_path_SED_found=false
6243  # Loop through the user's path and test for each of PROGNAME-LIST
6244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6245for as_dir in $PATH
6246do
6247  IFS=$as_save_IFS
6248  test -z "$as_dir" && as_dir=.
6249    for ac_prog in sed gsed; do
6250    for ac_exec_ext in '' $ac_executable_extensions; do
6251      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6252      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6253# Check for GNU ac_path_SED and select it if it is found.
6254  # Check for GNU $ac_path_SED
6255case `"$ac_path_SED" --version 2>&1` in
6256*GNU*)
6257  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6258*)
6259  ac_count=0
6260  $as_echo_n 0123456789 >"conftest.in"
6261  while :
6262  do
6263    cat "conftest.in" "conftest.in" >"conftest.tmp"
6264    mv "conftest.tmp" "conftest.in"
6265    cp "conftest.in" "conftest.nl"
6266    $as_echo '' >> "conftest.nl"
6267    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269    as_fn_arith $ac_count + 1 && ac_count=$as_val
6270    if test $ac_count -gt ${ac_path_SED_max-0}; then
6271      # Best one so far, save it but keep looking for a better one
6272      ac_cv_path_SED="$ac_path_SED"
6273      ac_path_SED_max=$ac_count
6274    fi
6275    # 10*(2^10) chars as input seems more than enough
6276    test $ac_count -gt 10 && break
6277  done
6278  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6279esac
6280
6281      $ac_path_SED_found && break 3
6282    done
6283  done
6284  done
6285IFS=$as_save_IFS
6286  if test -z "$ac_cv_path_SED"; then
6287    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6288  fi
6289else
6290  ac_cv_path_SED=$SED
6291fi
6292
6293fi
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6295$as_echo "$ac_cv_path_SED" >&6; }
6296 SED="$ac_cv_path_SED"
6297  rm -f conftest.sed
6298
6299
6300    if test "x$SED" = x; then
6301        if test "x" = x; then
6302          PROG_NAME=sed
6303        else
6304          PROG_NAME=
6305        fi
6306        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6307$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6308        as_fn_error $? "Cannot continue" "$LINENO" 5
6309    fi
6310
6311
6312for ac_prog in nawk gawk awk
6313do
6314  # Extract the first word of "$ac_prog", so it can be a program name with args.
6315set dummy $ac_prog; ac_word=$2
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6317$as_echo_n "checking for $ac_word... " >&6; }
6318if test "${ac_cv_path_NAWK+set}" = set; then :
6319  $as_echo_n "(cached) " >&6
6320else
6321  case $NAWK in
6322  [\\/]* | ?:[\\/]*)
6323  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6324  ;;
6325  *)
6326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6327for as_dir in $PATH
6328do
6329  IFS=$as_save_IFS
6330  test -z "$as_dir" && as_dir=.
6331    for ac_exec_ext in '' $ac_executable_extensions; do
6332  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6333    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6335    break 2
6336  fi
6337done
6338  done
6339IFS=$as_save_IFS
6340
6341  ;;
6342esac
6343fi
6344NAWK=$ac_cv_path_NAWK
6345if test -n "$NAWK"; then
6346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6347$as_echo "$NAWK" >&6; }
6348else
6349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
6353
6354  test -n "$NAWK" && break
6355done
6356
6357
6358    if test "x$NAWK" = x; then
6359        if test "x" = x; then
6360          PROG_NAME=nawk
6361        else
6362          PROG_NAME=
6363        fi
6364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6365$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6366        as_fn_error $? "Cannot continue" "$LINENO" 5
6367    fi
6368
6369
6370# Always force rm.
6371RM="$RM -f"
6372
6373# These are not required on all platforms
6374# Extract the first word of "cygpath", so it can be a program name with args.
6375set dummy cygpath; ac_word=$2
6376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6377$as_echo_n "checking for $ac_word... " >&6; }
6378if test "${ac_cv_path_CYGPATH+set}" = set; then :
6379  $as_echo_n "(cached) " >&6
6380else
6381  case $CYGPATH in
6382  [\\/]* | ?:[\\/]*)
6383  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6384  ;;
6385  *)
6386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH
6388do
6389  IFS=$as_save_IFS
6390  test -z "$as_dir" && as_dir=.
6391    for ac_exec_ext in '' $ac_executable_extensions; do
6392  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6393    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395    break 2
6396  fi
6397done
6398  done
6399IFS=$as_save_IFS
6400
6401  ;;
6402esac
6403fi
6404CYGPATH=$ac_cv_path_CYGPATH
6405if test -n "$CYGPATH"; then
6406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6407$as_echo "$CYGPATH" >&6; }
6408else
6409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413
6414# Extract the first word of "readlink", so it can be a program name with args.
6415set dummy readlink; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if test "${ac_cv_path_READLINK+set}" = set; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $READLINK in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6433    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444READLINK=$ac_cv_path_READLINK
6445if test -n "$READLINK"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6447$as_echo "$READLINK" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454# Extract the first word of "df", so it can be a program name with args.
6455set dummy df; ac_word=$2
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6457$as_echo_n "checking for $ac_word... " >&6; }
6458if test "${ac_cv_path_DF+set}" = set; then :
6459  $as_echo_n "(cached) " >&6
6460else
6461  case $DF in
6462  [\\/]* | ?:[\\/]*)
6463  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6464  ;;
6465  *)
6466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6467for as_dir in $PATH
6468do
6469  IFS=$as_save_IFS
6470  test -z "$as_dir" && as_dir=.
6471    for ac_exec_ext in '' $ac_executable_extensions; do
6472  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6473    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6475    break 2
6476  fi
6477done
6478  done
6479IFS=$as_save_IFS
6480
6481  ;;
6482esac
6483fi
6484DF=$ac_cv_path_DF
6485if test -n "$DF"; then
6486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6487$as_echo "$DF" >&6; }
6488else
6489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6490$as_echo "no" >&6; }
6491fi
6492
6493
6494# Extract the first word of "SetFile", so it can be a program name with args.
6495set dummy SetFile; ac_word=$2
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497$as_echo_n "checking for $ac_word... " >&6; }
6498if test "${ac_cv_path_SETFILE+set}" = set; then :
6499  $as_echo_n "(cached) " >&6
6500else
6501  case $SETFILE in
6502  [\\/]* | ?:[\\/]*)
6503  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6504  ;;
6505  *)
6506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH
6508do
6509  IFS=$as_save_IFS
6510  test -z "$as_dir" && as_dir=.
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6513    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515    break 2
6516  fi
6517done
6518  done
6519IFS=$as_save_IFS
6520
6521  ;;
6522esac
6523fi
6524SETFILE=$ac_cv_path_SETFILE
6525if test -n "$SETFILE"; then
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6527$as_echo "$SETFILE" >&6; }
6528else
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; }
6531fi
6532
6533
6534
6535
6536# Now we can determine OpenJDK build and target platforms. This is required to
6537# have early on.
6538# Make sure we can run config.sub.
6539$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6540  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6541
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6543$as_echo_n "checking build system type... " >&6; }
6544if test "${ac_cv_build+set}" = set; then :
6545  $as_echo_n "(cached) " >&6
6546else
6547  ac_build_alias=$build_alias
6548test "x$ac_build_alias" = x &&
6549  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6550test "x$ac_build_alias" = x &&
6551  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6552ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6553  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6554
6555fi
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6557$as_echo "$ac_cv_build" >&6; }
6558case $ac_cv_build in
6559*-*-*) ;;
6560*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6561esac
6562build=$ac_cv_build
6563ac_save_IFS=$IFS; IFS='-'
6564set x $ac_cv_build
6565shift
6566build_cpu=$1
6567build_vendor=$2
6568shift; shift
6569# Remember, the first character of IFS is used to create $*,
6570# except with old shells:
6571build_os=$*
6572IFS=$ac_save_IFS
6573case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6574
6575
6576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6577$as_echo_n "checking host system type... " >&6; }
6578if test "${ac_cv_host+set}" = set; then :
6579  $as_echo_n "(cached) " >&6
6580else
6581  if test "x$host_alias" = x; then
6582  ac_cv_host=$ac_cv_build
6583else
6584  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6585    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6586fi
6587
6588fi
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6590$as_echo "$ac_cv_host" >&6; }
6591case $ac_cv_host in
6592*-*-*) ;;
6593*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6594esac
6595host=$ac_cv_host
6596ac_save_IFS=$IFS; IFS='-'
6597set x $ac_cv_host
6598shift
6599host_cpu=$1
6600host_vendor=$2
6601shift; shift
6602# Remember, the first character of IFS is used to create $*,
6603# except with old shells:
6604host_os=$*
6605IFS=$ac_save_IFS
6606case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6607
6608
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6610$as_echo_n "checking target system type... " >&6; }
6611if test "${ac_cv_target+set}" = set; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  if test "x$target_alias" = x; then
6615  ac_cv_target=$ac_cv_host
6616else
6617  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6618    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6619fi
6620
6621fi
6622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6623$as_echo "$ac_cv_target" >&6; }
6624case $ac_cv_target in
6625*-*-*) ;;
6626*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6627esac
6628target=$ac_cv_target
6629ac_save_IFS=$IFS; IFS='-'
6630set x $ac_cv_target
6631shift
6632target_cpu=$1
6633target_vendor=$2
6634shift; shift
6635# Remember, the first character of IFS is used to create $*,
6636# except with old shells:
6637target_os=$*
6638IFS=$ac_save_IFS
6639case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6640
6641
6642# The aliases save the names the user supplied, while $host etc.
6643# will get canonicalized.
6644test -n "$target_alias" &&
6645  test "$program_prefix$program_suffix$program_transform_name" = \
6646    NONENONEs,x,x, &&
6647  program_prefix=${target_alias}-
6648
6649# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6650# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6651# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6652# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6653# to use the configure naming style.
6654
6655
6656
6657
6658
6659    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6660    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6661    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6662    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6663    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6664    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6665
6666
6667
6668    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6669
6670  case "$build_os" in
6671    *linux*)
6672      VAR_OS=linux
6673      VAR_OS_API=posix
6674      VAR_OS_ENV=linux
6675      ;;
6676    *solaris*)
6677      VAR_OS=solaris
6678      VAR_OS_API=posix
6679      VAR_OS_ENV=solaris
6680      ;;
6681    *darwin*)
6682      VAR_OS=macosx
6683      VAR_OS_API=posix
6684      VAR_OS_ENV=macosx
6685      ;;
6686    *bsd*)
6687      VAR_OS=bsd
6688      VAR_OS_API=posix
6689      VAR_OS_ENV=bsd
6690      ;;
6691    *cygwin*)
6692      VAR_OS=windows
6693      VAR_OS_API=winapi
6694      VAR_OS_ENV=windows.cygwin
6695      ;;
6696    *mingw*)
6697      VAR_OS=windows
6698      VAR_OS_API=winapi
6699      VAR_OS_ENV=windows.msys
6700      ;;
6701    *)
6702      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6703      ;;
6704  esac
6705
6706
6707  # First argument is the cpu name from the trip/quad
6708  case "$build_cpu" in
6709    x86_64)
6710      VAR_CPU=x86_64
6711      VAR_CPU_ARCH=x86
6712      VAR_CPU_BITS=64
6713      VAR_CPU_ENDIAN=little
6714      ;;
6715    i?86)
6716      VAR_CPU=x86
6717      VAR_CPU_ARCH=x86
6718      VAR_CPU_BITS=32
6719      VAR_CPU_ENDIAN=little
6720      ;;
6721    arm*)
6722      VAR_CPU=arm
6723      VAR_CPU_ARCH=arm
6724      VAR_CPU_BITS=32
6725      VAR_CPU_ENDIAN=little
6726      ;;
6727    powerpc)
6728      VAR_CPU=ppc
6729      VAR_CPU_ARCH=ppc
6730      VAR_CPU_BITS=32
6731      VAR_CPU_ENDIAN=big
6732       ;;
6733    powerpc64)
6734      VAR_CPU=ppc64
6735      VAR_CPU_ARCH=ppc
6736      VAR_CPU_BITS=64
6737      VAR_CPU_ENDIAN=big
6738       ;;
6739    sparc)
6740      VAR_CPU=sparc
6741      VAR_CPU_ARCH=sparc
6742      VAR_CPU_BITS=32
6743      VAR_CPU_ENDIAN=big
6744       ;;
6745    sparcv9)
6746      VAR_CPU=sparcv9
6747      VAR_CPU_ARCH=sparc
6748      VAR_CPU_BITS=64
6749      VAR_CPU_ENDIAN=big
6750       ;;
6751    *)
6752      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6753      ;;
6754  esac
6755
6756    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6757    OPENJDK_BUILD_OS="$VAR_OS"
6758    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6759    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6760    OPENJDK_BUILD_CPU="$VAR_CPU"
6761    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6762    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6763    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6764
6765
6766
6767
6768
6769
6770
6771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6772$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6774$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6775
6776    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6777
6778  case "$host_os" in
6779    *linux*)
6780      VAR_OS=linux
6781      VAR_OS_API=posix
6782      VAR_OS_ENV=linux
6783      ;;
6784    *solaris*)
6785      VAR_OS=solaris
6786      VAR_OS_API=posix
6787      VAR_OS_ENV=solaris
6788      ;;
6789    *darwin*)
6790      VAR_OS=macosx
6791      VAR_OS_API=posix
6792      VAR_OS_ENV=macosx
6793      ;;
6794    *bsd*)
6795      VAR_OS=bsd
6796      VAR_OS_API=posix
6797      VAR_OS_ENV=bsd
6798      ;;
6799    *cygwin*)
6800      VAR_OS=windows
6801      VAR_OS_API=winapi
6802      VAR_OS_ENV=windows.cygwin
6803      ;;
6804    *mingw*)
6805      VAR_OS=windows
6806      VAR_OS_API=winapi
6807      VAR_OS_ENV=windows.msys
6808      ;;
6809    *)
6810      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6811      ;;
6812  esac
6813
6814
6815  # First argument is the cpu name from the trip/quad
6816  case "$host_cpu" in
6817    x86_64)
6818      VAR_CPU=x86_64
6819      VAR_CPU_ARCH=x86
6820      VAR_CPU_BITS=64
6821      VAR_CPU_ENDIAN=little
6822      ;;
6823    i?86)
6824      VAR_CPU=x86
6825      VAR_CPU_ARCH=x86
6826      VAR_CPU_BITS=32
6827      VAR_CPU_ENDIAN=little
6828      ;;
6829    arm*)
6830      VAR_CPU=arm
6831      VAR_CPU_ARCH=arm
6832      VAR_CPU_BITS=32
6833      VAR_CPU_ENDIAN=little
6834      ;;
6835    powerpc)
6836      VAR_CPU=ppc
6837      VAR_CPU_ARCH=ppc
6838      VAR_CPU_BITS=32
6839      VAR_CPU_ENDIAN=big
6840       ;;
6841    powerpc64)
6842      VAR_CPU=ppc64
6843      VAR_CPU_ARCH=ppc
6844      VAR_CPU_BITS=64
6845      VAR_CPU_ENDIAN=big
6846       ;;
6847    sparc)
6848      VAR_CPU=sparc
6849      VAR_CPU_ARCH=sparc
6850      VAR_CPU_BITS=32
6851      VAR_CPU_ENDIAN=big
6852       ;;
6853    sparcv9)
6854      VAR_CPU=sparcv9
6855      VAR_CPU_ARCH=sparc
6856      VAR_CPU_BITS=64
6857      VAR_CPU_ENDIAN=big
6858       ;;
6859    *)
6860      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6861      ;;
6862  esac
6863
6864    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6865    OPENJDK_TARGET_OS="$VAR_OS"
6866    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6867    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6868    OPENJDK_TARGET_CPU="$VAR_CPU"
6869    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6870    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6871    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6872
6873
6874
6875
6876
6877
6878
6879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6880$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6882$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6883
6884
6885
6886# Check whether --with-target-bits was given.
6887if test "${with_target_bits+set}" = set; then :
6888  withval=$with_target_bits;
6889fi
6890
6891
6892  # We have three types of compiles:
6893  # native  == normal compilation, target system == build system
6894  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6895  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6896  #
6897  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6898    # We're doing a proper cross-compilation
6899    COMPILE_TYPE="cross"
6900  else
6901    COMPILE_TYPE="native"
6902  fi
6903
6904  if test "x$with_target_bits" != x; then
6905    if test "x$COMPILE_TYPE" = "xcross"; then
6906      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6907    fi
6908
6909    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6910      # A reduced build is requested
6911      COMPILE_TYPE="reduced"
6912      OPENJDK_TARGET_CPU_BITS=32
6913      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6914        OPENJDK_TARGET_CPU=x86
6915      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6916        OPENJDK_TARGET_CPU=sparc
6917      else
6918        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6919      fi
6920    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6921      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
6922    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6923      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6924$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6925    else
6926      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6927    fi
6928  fi
6929
6930
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6932$as_echo_n "checking compilation type... " >&6; }
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6934$as_echo "$COMPILE_TYPE" >&6; }
6935
6936
6937    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6938       REQUIRED_OS_NAME=SunOS
6939       REQUIRED_OS_VERSION=5.10
6940    fi
6941    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6942       REQUIRED_OS_NAME=Linux
6943       REQUIRED_OS_VERSION=2.6
6944    fi
6945    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6946        REQUIRED_OS_NAME=Windows
6947        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6948            REQUIRED_OS_VERSION=5.2
6949        else
6950            REQUIRED_OS_VERSION=5.1
6951        fi
6952    fi
6953    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6954        REQUIRED_OS_NAME=Darwin
6955        REQUIRED_OS_VERSION=11.2
6956    fi
6957
6958
6959
6960
6961
6962    # Also store the legacy naming of the cpu.
6963    # Ie i586 and amd64 instead of x86 and x86_64
6964    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6965    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6966      OPENJDK_TARGET_CPU_LEGACY="i586"
6967    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6968      # On all platforms except MacOSX replace x86_64 with amd64.
6969      OPENJDK_TARGET_CPU_LEGACY="amd64"
6970    fi
6971
6972
6973    # And the second legacy naming of the cpu.
6974    # Ie i386 and amd64 instead of x86 and x86_64.
6975    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6976    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6977      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6978    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6979      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6980    fi
6981
6982
6983    # This is the name of the cpu (but using i386 and amd64 instead of
6984    # x86 and x86_64, respectively), preceeded by a /, to be used when
6985    # locating libraries. On macosx, it's empty, though.
6986    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6987    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6988        OPENJDK_TARGET_CPU_LIBDIR=""
6989    fi
6990
6991
6992    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6993    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6994    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6995    OPENJDK_TARGET_CPU_ISADIR=""
6996    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6997      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6998          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6999      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7000          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7001      fi
7002    fi
7003
7004
7005    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7006    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7007    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7008      # On linux only, we replace x86 with i386.
7009      OPENJDK_TARGET_CPU_OSARCH="i386"
7010    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7011      # On all platforms except macosx, we replace x86_64 with amd64.
7012      OPENJDK_TARGET_CPU_OSARCH="amd64"
7013    fi
7014
7015
7016    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7017    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7018      OPENJDK_TARGET_CPU_JLI="i386"
7019    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7020      # On all platforms except macosx, we replace x86_64 with amd64.
7021      OPENJDK_TARGET_CPU_JLI="amd64"
7022    fi
7023    # Now setup the -D flags for building libjli.
7024    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7025    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7026      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7027        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7028      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7029        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7030      fi
7031    fi
7032
7033
7034    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7035    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7036        OPENJDK_TARGET_OS_API_DIR="solaris"
7037    fi
7038    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7039        OPENJDK_TARGET_OS_API_DIR="windows"
7040    fi
7041
7042
7043    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7044        A_LP64="LP64:="
7045        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7046        # unpack200.exe
7047        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7048            ADD_LP64="-D_LP64=1"
7049        fi
7050    fi
7051    LP64=$A_LP64
7052
7053
7054    if test "x$COMPILE_TYPE" = "xcross"; then
7055      # FIXME: ... or should this include reduced builds..?
7056      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7057    else
7058      DEFINE_CROSS_COMPILE_ARCH=""
7059    fi
7060
7061
7062
7063
7064# Continue setting up basic stuff. Most remaining code require fundamental tools.
7065
7066# Locate the directory of this script.
7067SCRIPT="$0"
7068
7069    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7070        # Follow a chain of symbolic links. Use readlink
7071        # where it exists, else fall back to horribly
7072        # complicated shell code.
7073        if test "x$READLINK_TESTED" != yes; then
7074            # On MacOSX there is a readlink tool with a different
7075            # purpose than the GNU readlink tool. Check the found readlink.
7076            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7077            if test "x$ISGNU" = x; then
7078                 # A readlink that we do not know how to use.
7079                 # Are there other non-GNU readlinks out there?
7080                 READLINK_TESTED=yes
7081                 READLINK=
7082            fi
7083        fi
7084
7085        if test "x$READLINK" != x; then
7086            SCRIPT=`$READLINK -f $SCRIPT`
7087        else
7088            # Save the current directory for restoring afterwards
7089            STARTDIR=$PWD
7090            COUNTER=0
7091            sym_link_dir=`$DIRNAME $SCRIPT`
7092            sym_link_file=`$BASENAME $SCRIPT`
7093            # Use the system pwd and not the shell builtin to resolve directory symlinks
7094            cd $sym_link_dir
7095            cd `$THEPWDCMD`
7096            sym_link_dir=`$THEPWDCMD`
7097            # Resolve file symlinks
7098            while test $COUNTER -lt 20; do
7099                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7100                if test "x$ISLINK" == x; then
7101                    # This is not a symbolic link! We are done!
7102                    break
7103                fi
7104                # Again resolve directory symlinks since the target of the just found
7105                # link could be in a different directory
7106                cd `$DIRNAME $ISLINK`
7107                sym_link_dir=`$THEPWDCMD`
7108                sym_link_file=`$BASENAME $ISLINK`
7109                let COUNTER=COUNTER+1
7110            done
7111            cd $STARTDIR
7112            SCRIPT=$sym_link_dir/$sym_link_file
7113        fi
7114    fi
7115
7116AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7117
7118# Where is the source? It is located two levels above the configure script.
7119CURDIR="$PWD"
7120cd "$AUTOCONF_DIR/../.."
7121SRC_ROOT="`$THEPWDCMD`"
7122
7123if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7124  PATH_SEP=";"
7125
7126  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7127  if test $SRC_ROOT_LENGTH -gt 100; then
7128      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7129  fi
7130
7131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7133$as_echo_n "checking cygwin release... " >&6; }
7134    CYGWIN_VERSION=`$UNAME -r`
7135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7136$as_echo "$CYGWIN_VERSION" >&6; }
7137    WINDOWS_ENV_VENDOR='cygwin'
7138    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7139
7140    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7141    if test "x$CYGWIN_VERSION_OK" = x; then
7142      { $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
7143$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;}
7144      as_fn_error $? "Cannot continue" "$LINENO" 5
7145    fi
7146    if test "x$CYGPATH" = x; then
7147        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7148    fi
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7150$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7151    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7152    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7153    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7154    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7156$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7157    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7158    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7159    if test "x$test_cygdrive_prefix" = x; then
7160        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7161    fi
7162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7164$as_echo_n "checking msys release... " >&6; }
7165    MSYS_VERSION=`$UNAME -r`
7166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7167$as_echo "$MSYS_VERSION" >&6; }
7168
7169    WINDOWS_ENV_VENDOR='msys'
7170    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7171
7172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7173$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7174    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7175    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7176
7177  windows_path="$MSYS_ROOT_PATH"
7178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7179    unix_path=`$CYGPATH -u "$windows_path"`
7180    MSYS_ROOT_PATH="$unix_path"
7181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7183    MSYS_ROOT_PATH="$unix_path"
7184  fi
7185
7186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7187$as_echo "$MSYS_ROOT_PATH" >&6; }
7188    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7189  else
7190    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7191  fi
7192
7193  # Test if windows or unix (cygwin/msys) find is first in path.
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7195$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7196  FIND_BINARY_OUTPUT=`find --version 2>&1`
7197  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7199$as_echo "unix style" >&6; }
7200  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7202$as_echo "Windows" >&6; }
7203    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7204$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7205    { $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
7206$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7207    as_fn_error $? "Cannot continue" "$LINENO" 5
7208  else
7209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7210$as_echo "unknown" >&6; }
7211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7212$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7213  fi
7214
7215else
7216  PATH_SEP=":"
7217fi
7218
7219
7220
7221cd "$CURDIR"
7222
7223
7224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7225
7226  # Input might be given as Windows format, start by converting to
7227  # unix format.
7228  path="$SRC_ROOT"
7229  new_path=`$CYGPATH -u "$path"`
7230
7231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7234  # "foo.exe" is OK but "foo" is an error.
7235  #
7236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7237  # It is also a way to make sure we got the proper file name for the real test later on.
7238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7239  if test "x$test_shortpath" = x; then
7240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7241$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7242    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7243  fi
7244
7245  # Call helper function which possibly converts this using DOS-style short mode.
7246  # If so, the updated path is stored in $new_path.
7247
7248  input_path="$new_path"
7249  # Check if we need to convert this using DOS-style short mode. If the path
7250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7251  # take no chances and rewrite it.
7252  # Note: m4 eats our [], so we need to use [ and ] instead.
7253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7254  if test "x$has_forbidden_chars" != x; then
7255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7259      # Going to short mode and back again did indeed matter. Since short mode is
7260      # case insensitive, let's make it lowercase to improve readability.
7261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7262      # Now convert it back to Unix-stile (cygpath)
7263      input_path=`$CYGPATH -u "$shortmode_path"`
7264      new_path="$input_path"
7265    fi
7266  fi
7267
7268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7269  if test "x$test_cygdrive_prefix" = x; then
7270    # As a simple fix, exclude /usr/bin since it's not a real path.
7271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7273      # a path prefixed by /cygdrive for fixpath to work.
7274      new_path="$CYGWIN_ROOT_PATH$input_path"
7275    fi
7276  fi
7277
7278
7279  if test "x$path" != "x$new_path"; then
7280    SRC_ROOT="$new_path"
7281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7282$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7283  fi
7284
7285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7286
7287  path="$SRC_ROOT"
7288  has_colon=`$ECHO $path | $GREP ^.:`
7289  new_path="$path"
7290  if test "x$has_colon" = x; then
7291    # Not in mixed or Windows style, start by that.
7292    new_path=`cmd //c echo $path`
7293  fi
7294
7295
7296  input_path="$new_path"
7297  # Check if we need to convert this using DOS-style short mode. If the path
7298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7299  # take no chances and rewrite it.
7300  # Note: m4 eats our [], so we need to use [ and ] instead.
7301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7302  if test "x$has_forbidden_chars" != x; then
7303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7305  fi
7306
7307
7308  windows_path="$new_path"
7309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7310    unix_path=`$CYGPATH -u "$windows_path"`
7311    new_path="$unix_path"
7312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7314    new_path="$unix_path"
7315  fi
7316
7317  if test "x$path" != "x$new_path"; then
7318    SRC_ROOT="$new_path"
7319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7320$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7321  fi
7322
7323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7325
7326  else
7327    # We're on a posix platform. Hooray! :)
7328    path="$SRC_ROOT"
7329
7330    if test ! -f "$path" && test ! -d "$path"; then
7331      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7332    fi
7333
7334    has_space=`$ECHO "$path" | $GREP " "`
7335    if test "x$has_space" != x; then
7336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7337$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7338      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7339    fi
7340  fi
7341
7342
7343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7344
7345  # Input might be given as Windows format, start by converting to
7346  # unix format.
7347  path="$CURDIR"
7348  new_path=`$CYGPATH -u "$path"`
7349
7350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7353  # "foo.exe" is OK but "foo" is an error.
7354  #
7355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7356  # It is also a way to make sure we got the proper file name for the real test later on.
7357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7358  if test "x$test_shortpath" = x; then
7359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7360$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7361    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7362  fi
7363
7364  # Call helper function which possibly converts this using DOS-style short mode.
7365  # If so, the updated path is stored in $new_path.
7366
7367  input_path="$new_path"
7368  # Check if we need to convert this using DOS-style short mode. If the path
7369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7370  # take no chances and rewrite it.
7371  # Note: m4 eats our [], so we need to use [ and ] instead.
7372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7373  if test "x$has_forbidden_chars" != x; then
7374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7378      # Going to short mode and back again did indeed matter. Since short mode is
7379      # case insensitive, let's make it lowercase to improve readability.
7380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7381      # Now convert it back to Unix-stile (cygpath)
7382      input_path=`$CYGPATH -u "$shortmode_path"`
7383      new_path="$input_path"
7384    fi
7385  fi
7386
7387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7388  if test "x$test_cygdrive_prefix" = x; then
7389    # As a simple fix, exclude /usr/bin since it's not a real path.
7390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7392      # a path prefixed by /cygdrive for fixpath to work.
7393      new_path="$CYGWIN_ROOT_PATH$input_path"
7394    fi
7395  fi
7396
7397
7398  if test "x$path" != "x$new_path"; then
7399    CURDIR="$new_path"
7400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7401$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7402  fi
7403
7404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7405
7406  path="$CURDIR"
7407  has_colon=`$ECHO $path | $GREP ^.:`
7408  new_path="$path"
7409  if test "x$has_colon" = x; then
7410    # Not in mixed or Windows style, start by that.
7411    new_path=`cmd //c echo $path`
7412  fi
7413
7414
7415  input_path="$new_path"
7416  # Check if we need to convert this using DOS-style short mode. If the path
7417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7418  # take no chances and rewrite it.
7419  # Note: m4 eats our [], so we need to use [ and ] instead.
7420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7421  if test "x$has_forbidden_chars" != x; then
7422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7424  fi
7425
7426
7427  windows_path="$new_path"
7428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7429    unix_path=`$CYGPATH -u "$windows_path"`
7430    new_path="$unix_path"
7431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7433    new_path="$unix_path"
7434  fi
7435
7436  if test "x$path" != "x$new_path"; then
7437    CURDIR="$new_path"
7438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7439$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7440  fi
7441
7442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7444
7445  else
7446    # We're on a posix platform. Hooray! :)
7447    path="$CURDIR"
7448
7449    if test ! -f "$path" && test ! -d "$path"; then
7450      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7451    fi
7452
7453    has_space=`$ECHO "$path" | $GREP " "`
7454    if test "x$has_space" != x; then
7455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7456$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7457      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7458    fi
7459  fi
7460
7461
7462if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7463    # Add extra search paths on solaris for utilities like ar and as etc...
7464    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7465fi
7466
7467# You can force the sys-root if the sys-root encoded into the cross compiler tools
7468# is not correct.
7469
7470# Check whether --with-sys-root was given.
7471if test "${with_sys_root+set}" = set; then :
7472  withval=$with_sys_root;
7473fi
7474
7475
7476if test "x$with_sys_root" != x; then
7477  SYS_ROOT=$with_sys_root
7478else
7479  SYS_ROOT=/
7480fi
7481
7482
7483
7484# Check whether --with-tools-dir was given.
7485if test "${with_tools_dir+set}" = set; then :
7486  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7487fi
7488
7489
7490
7491# Check whether --with-devkit was given.
7492if test "${with_devkit+set}" = set; then :
7493  withval=$with_devkit;
7494    if test "x$with_sys_root" != x; then
7495      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7496    fi
7497    if test "x$with_tools_dir" != x; then
7498      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7499    fi
7500    TOOLS_DIR=$with_devkit/bin
7501    SYS_ROOT=$with_devkit/$host_alias/libc
7502
7503fi
7504
7505
7506
7507
7508# Setup default logging of stdout and stderr to build.log in the output root.
7509BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7510BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7511BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7512
7513
7514
7515
7516
7517# Check if it's a pure open build or if custom sources are to be used.
7518
7519  # Check whether --enable-openjdk-only was given.
7520if test "${enable_openjdk_only+set}" = set; then :
7521  enableval=$enable_openjdk_only;
7522else
7523  enable_openjdk_only="no"
7524fi
7525
7526
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7528$as_echo_n "checking for presence of closed sources... " >&6; }
7529  if test -d "$SRC_ROOT/jdk/src/closed"; then
7530    CLOSED_SOURCE_PRESENT=yes
7531  else
7532    CLOSED_SOURCE_PRESENT=no
7533  fi
7534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7535$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7536
7537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7538$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7539  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7541$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7542
7543  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7544    OPENJDK=true
7545    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7546      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7547$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7548    fi
7549  else
7550    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7551      OPENJDK=true
7552    else
7553      OPENJDK=false
7554    fi
7555  fi
7556
7557  if test "x$OPENJDK" = "xtrue"; then
7558    SET_OPENJDK="OPENJDK=true"
7559  fi
7560
7561
7562
7563
7564# These are needed to be able to create a configuration name (and thus the output directory)
7565
7566###############################################################################
7567#
7568# Check which variant of the JDK that we want to build.
7569# Currently we have:
7570#    normal:   standard edition
7571# but the custom make system may add other variants
7572#
7573# Effectively the JDK variant gives a name to a specific set of
7574# modules to compile into the JDK. In the future, these modules
7575# might even be Jigsaw modules.
7576#
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7578$as_echo_n "checking which variant of the JDK to build... " >&6; }
7579
7580# Check whether --with-jdk-variant was given.
7581if test "${with_jdk_variant+set}" = set; then :
7582  withval=$with_jdk_variant;
7583fi
7584
7585
7586if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7587    JDK_VARIANT="normal"
7588else
7589    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7590fi
7591
7592
7593
7594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7595$as_echo "$JDK_VARIANT" >&6; }
7596
7597
7598
7599###############################################################################
7600#
7601# Check which variants of the JVM that we want to build.
7602# Currently we have:
7603#    server: normal interpreter and a tiered C1/C2 compiler
7604#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7605#    minimal1: reduced form of client with optional VM services and features stripped out
7606#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7607#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7608#    zero: no machine code interpreter, no compiler
7609#    zeroshark: zero interpreter and shark/llvm compiler backend
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7611$as_echo_n "checking which variants of the JVM to build... " >&6; }
7612
7613# Check whether --with-jvm-variants was given.
7614if test "${with_jvm_variants+set}" = set; then :
7615  withval=$with_jvm_variants;
7616fi
7617
7618
7619if test "x$with_jvm_variants" = x; then
7620     with_jvm_variants="server"
7621fi
7622
7623JVM_VARIANTS=",$with_jvm_variants,"
7624TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7625
7626if test "x$TEST_VARIANTS" != "x,"; then
7627   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7628fi
7629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7630$as_echo "$with_jvm_variants" >&6; }
7631
7632JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7633JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7634JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7635JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7636JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7637JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7638
7639if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7640    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7641        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7642    fi
7643fi
7644if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7645    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7646        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7647    fi
7648fi
7649if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7650    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7651        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7652    fi
7653fi
7654
7655# Replace the commas with AND for use in the build directory name.
7656ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7657COUNT_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/'`
7658if test "x$COUNT_VARIANTS" != "x,1"; then
7659    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7660else
7661    BUILDING_MULTIPLE_JVM_VARIANTS=no
7662fi
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7673   MACOSX_UNIVERSAL="true"
7674fi
7675
7676
7677
7678
7679
7680###############################################################################
7681#
7682# Set the debug level
7683#    release: no debug information, all optimizations, no asserts.
7684#    fastdebug: debug information (-g), all optimizations, all asserts
7685#    slowdebug: debug information (-g), no optimizations, all asserts
7686#
7687DEBUG_LEVEL="release"
7688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7689$as_echo_n "checking which debug level to use... " >&6; }
7690# Check whether --enable-debug was given.
7691if test "${enable_debug+set}" = set; then :
7692  enableval=$enable_debug;
7693        ENABLE_DEBUG="${enableval}"
7694        DEBUG_LEVEL="fastdebug"
7695
7696else
7697  ENABLE_DEBUG="no"
7698fi
7699
7700
7701
7702# Check whether --with-debug-level was given.
7703if test "${with_debug_level+set}" = set; then :
7704  withval=$with_debug_level;
7705        DEBUG_LEVEL="${withval}"
7706        if test "x$ENABLE_DEBUG" = xyes; then
7707			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7708        fi
7709
7710fi
7711
7712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7713$as_echo "$DEBUG_LEVEL" >&6; }
7714
7715if test "x$DEBUG_LEVEL" != xrelease && \
7716   test "x$DEBUG_LEVEL" != xfastdebug && \
7717   test "x$DEBUG_LEVEL" != xslowdebug; then
7718   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7719fi
7720
7721
7722###############################################################################
7723#
7724# Setup legacy vars/targets and new vars to deal with different debug levels.
7725#
7726
7727case $DEBUG_LEVEL in
7728      release )
7729          VARIANT="OPT"
7730          FASTDEBUG="false"
7731          DEBUG_CLASSFILES="false"
7732          BUILD_VARIANT_RELEASE=""
7733          HOTSPOT_DEBUG_LEVEL="product"
7734          HOTSPOT_EXPORT="product"
7735           ;;
7736      fastdebug )
7737          VARIANT="DBG"
7738          FASTDEBUG="true"
7739          DEBUG_CLASSFILES="true"
7740          BUILD_VARIANT_RELEASE="-fastdebug"
7741          HOTSPOT_DEBUG_LEVEL="fastdebug"
7742          HOTSPOT_EXPORT="fastdebug"
7743           ;;
7744      slowdebug )
7745          VARIANT="DBG"
7746          FASTDEBUG="false"
7747          DEBUG_CLASSFILES="true"
7748          BUILD_VARIANT_RELEASE="-debug"
7749          HOTSPOT_DEBUG_LEVEL="jvmg"
7750          HOTSPOT_EXPORT="debug"
7751           ;;
7752esac
7753
7754#####
7755# Generate the legacy makefile targets for hotspot.
7756# The hotspot api for selecting the build artifacts, really, needs to be improved.
7757# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7758# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7759# But until then ...
7760HOTSPOT_TARGET=""
7761
7762if test "x$JVM_VARIANT_SERVER" = xtrue; then
7763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7764fi
7765
7766if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7767    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7768fi
7769
7770if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7771    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7772fi
7773
7774if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7775    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7776fi
7777
7778if test "x$JVM_VARIANT_ZERO" = xtrue; then
7779    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7780fi
7781
7782if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7783    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7784fi
7785
7786HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7787
7788# On Macosx universal binaries are produced, but they only contain
7789# 64 bit intel. This invalidates control of which jvms are built
7790# from configure, but only server is valid anyway. Fix this
7791# when hotspot makefiles are rewritten.
7792if test "x$MACOSX_UNIVERSAL" = xtrue; then
7793    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7794fi
7795
7796#####
7797
7798
7799
7800
7801
7802
7803
7804
7805# With basic setup done, call the custom early hook.
7806
7807
7808# To properly create a configuration name, we need to have the OpenJDK target
7809# and options (variants and debug level) parsed.
7810
7811
7812
7813# Check whether --with-conf-name was given.
7814if test "${with_conf_name+set}" = set; then :
7815  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7816fi
7817
7818
7819# Test from where we are running configure, in or outside of src root.
7820# To enable comparison of directories, CURDIR needs to be symlink free
7821# just like SRC_ROOT already is
7822NOSYM_CURDIR="$CURDIR"
7823
7824    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7825        # Follow a chain of symbolic links. Use readlink
7826        # where it exists, else fall back to horribly
7827        # complicated shell code.
7828        if test "x$READLINK_TESTED" != yes; then
7829            # On MacOSX there is a readlink tool with a different
7830            # purpose than the GNU readlink tool. Check the found readlink.
7831            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7832            if test "x$ISGNU" = x; then
7833                 # A readlink that we do not know how to use.
7834                 # Are there other non-GNU readlinks out there?
7835                 READLINK_TESTED=yes
7836                 READLINK=
7837            fi
7838        fi
7839
7840        if test "x$READLINK" != x; then
7841            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7842        else
7843            # Save the current directory for restoring afterwards
7844            STARTDIR=$PWD
7845            COUNTER=0
7846            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7847            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7848            # Use the system pwd and not the shell builtin to resolve directory symlinks
7849            cd $sym_link_dir
7850            cd `$THEPWDCMD`
7851            sym_link_dir=`$THEPWDCMD`
7852            # Resolve file symlinks
7853            while test $COUNTER -lt 20; do
7854                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7855                if test "x$ISLINK" == x; then
7856                    # This is not a symbolic link! We are done!
7857                    break
7858                fi
7859                # Again resolve directory symlinks since the target of the just found
7860                # link could be in a different directory
7861                cd `$DIRNAME $ISLINK`
7862                sym_link_dir=`$THEPWDCMD`
7863                sym_link_file=`$BASENAME $ISLINK`
7864                let COUNTER=COUNTER+1
7865            done
7866            cd $STARTDIR
7867            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7868        fi
7869    fi
7870
7871if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7872        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7873        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7874    # We are running configure from the src root.
7875    # Create a default ./build/target-variant-debuglevel output root.
7876    if test "x${CONF_NAME}" = x; then
7877        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7878    fi
7879    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7880    $MKDIR -p "$OUTPUT_ROOT"
7881    if test ! -d "$OUTPUT_ROOT"; then
7882        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7883    fi
7884else
7885    # We are running configure from outside of the src dir.
7886    # Then use the current directory as output dir!
7887    # If configuration is situated in normal build directory, just use the build
7888    # directory name as configuration name, otherwise use the complete path.
7889    if test "x${CONF_NAME}" = x; then
7890        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7891    fi
7892    OUTPUT_ROOT="$CURDIR"
7893
7894    # WARNING: This might be a bad thing to do. You need to be sure you want to
7895    # have a configuration in this directory. Do some sanity checks!
7896
7897    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7898      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7899      # other files
7900      files_present=`$LS $OUTPUT_ROOT`
7901      # Configure has already touched config.log and confdefs.h in the current dir when this check
7902      # is performed.
7903      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7904                                             | $TR -d '\n'`
7905      if test "x$filtered_files" != x; then
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7907$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7909$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7911$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7913$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7915$as_echo "$as_me: seriously mess up just about everything." >&6;}
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7917$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7919$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7920        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7921      fi
7922    fi
7923fi
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7925$as_echo_n "checking what configuration name to use... " >&6; }
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7927$as_echo "$CONF_NAME" >&6; }
7928
7929
7930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7931
7932  # Input might be given as Windows format, start by converting to
7933  # unix format.
7934  path="$OUTPUT_ROOT"
7935  new_path=`$CYGPATH -u "$path"`
7936
7937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7940  # "foo.exe" is OK but "foo" is an error.
7941  #
7942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7943  # It is also a way to make sure we got the proper file name for the real test later on.
7944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7945  if test "x$test_shortpath" = x; then
7946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7947$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7948    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7949  fi
7950
7951  # Call helper function which possibly converts this using DOS-style short mode.
7952  # If so, the updated path is stored in $new_path.
7953
7954  input_path="$new_path"
7955  # Check if we need to convert this using DOS-style short mode. If the path
7956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7957  # take no chances and rewrite it.
7958  # Note: m4 eats our [], so we need to use [ and ] instead.
7959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7960  if test "x$has_forbidden_chars" != x; then
7961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7965      # Going to short mode and back again did indeed matter. Since short mode is
7966      # case insensitive, let's make it lowercase to improve readability.
7967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7968      # Now convert it back to Unix-stile (cygpath)
7969      input_path=`$CYGPATH -u "$shortmode_path"`
7970      new_path="$input_path"
7971    fi
7972  fi
7973
7974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7975  if test "x$test_cygdrive_prefix" = x; then
7976    # As a simple fix, exclude /usr/bin since it's not a real path.
7977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7979      # a path prefixed by /cygdrive for fixpath to work.
7980      new_path="$CYGWIN_ROOT_PATH$input_path"
7981    fi
7982  fi
7983
7984
7985  if test "x$path" != "x$new_path"; then
7986    OUTPUT_ROOT="$new_path"
7987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7988$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7989  fi
7990
7991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7992
7993  path="$OUTPUT_ROOT"
7994  has_colon=`$ECHO $path | $GREP ^.:`
7995  new_path="$path"
7996  if test "x$has_colon" = x; then
7997    # Not in mixed or Windows style, start by that.
7998    new_path=`cmd //c echo $path`
7999  fi
8000
8001
8002  input_path="$new_path"
8003  # Check if we need to convert this using DOS-style short mode. If the path
8004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8005  # take no chances and rewrite it.
8006  # Note: m4 eats our [], so we need to use [ and ] instead.
8007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8008  if test "x$has_forbidden_chars" != x; then
8009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8011  fi
8012
8013
8014  windows_path="$new_path"
8015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8016    unix_path=`$CYGPATH -u "$windows_path"`
8017    new_path="$unix_path"
8018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8020    new_path="$unix_path"
8021  fi
8022
8023  if test "x$path" != "x$new_path"; then
8024    OUTPUT_ROOT="$new_path"
8025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8026$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8027  fi
8028
8029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8031
8032  else
8033    # We're on a posix platform. Hooray! :)
8034    path="$OUTPUT_ROOT"
8035
8036    if test ! -f "$path" && test ! -d "$path"; then
8037      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8038    fi
8039
8040    has_space=`$ECHO "$path" | $GREP " "`
8041    if test "x$has_space" != x; then
8042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8043$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8044      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8045    fi
8046  fi
8047
8048
8049SPEC=$OUTPUT_ROOT/spec.gmk
8050
8051CONF_NAME=$CONF_NAME
8052
8053OUTPUT_ROOT=$OUTPUT_ROOT
8054
8055
8056# Most of the probed defines are put into config.h
8057ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8058
8059# The spec.gmk file contains all variables for the make system.
8060ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8061
8062# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8063ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8064
8065# The bootcycle-spec.gmk file contains support for boot cycle builds.
8066ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8067
8068# The compare.sh is used to compare the build output to other builds.
8069ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8070
8071# Spec.sh is currently used by compare-objects.sh
8072ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8073
8074# The generated Makefile knows where the spec.gmk is and where the source is.
8075# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8076# which will look for generated configurations
8077ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8078
8079
8080# Save the arguments given to us
8081echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8082
8083
8084# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8085
8086    for ac_prog in apt-get yum port pkgutil pkgadd
8087do
8088  # Extract the first word of "$ac_prog", so it can be a program name with args.
8089set dummy $ac_prog; ac_word=$2
8090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8091$as_echo_n "checking for $ac_word... " >&6; }
8092if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8093  $as_echo_n "(cached) " >&6
8094else
8095  if test -n "$PKGHANDLER"; then
8096  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8097else
8098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8099for as_dir in $PATH
8100do
8101  IFS=$as_save_IFS
8102  test -z "$as_dir" && as_dir=.
8103    for ac_exec_ext in '' $ac_executable_extensions; do
8104  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8105    ac_cv_prog_PKGHANDLER="$ac_prog"
8106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8107    break 2
8108  fi
8109done
8110  done
8111IFS=$as_save_IFS
8112
8113fi
8114fi
8115PKGHANDLER=$ac_cv_prog_PKGHANDLER
8116if test -n "$PKGHANDLER"; then
8117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8118$as_echo "$PKGHANDLER" >&6; }
8119else
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8121$as_echo "no" >&6; }
8122fi
8123
8124
8125  test -n "$PKGHANDLER" && break
8126done
8127
8128
8129
8130# Setup tools that requires more complex handling, or that is not needed by the configure script.
8131
8132
8133  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8134  if test "x$MAKE" != x; then
8135    # User has supplied a make, test it.
8136    if test ! -f "$MAKE"; then
8137      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8138    fi
8139
8140  MAKE_CANDIDATE=""$MAKE""
8141  DESCRIPTION="user supplied MAKE=$MAKE"
8142  if test "x$MAKE_CANDIDATE" != x; then
8143    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8144$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8145    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8146    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8147    if test "x$IS_GNU_MAKE" = x; then
8148      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8149$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8150    else
8151      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8152      if test "x$IS_MODERN_MAKE" = x; then
8153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8154$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8155      else
8156        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8157          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8158            MAKE_EXPECTED_ENV='cygwin'
8159          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8160            MAKE_EXPECTED_ENV='msys'
8161          else
8162            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8163          fi
8164          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8165          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8166        else
8167          # Not relevant for non-Windows
8168          IS_MAKE_CORRECT_ENV=true
8169        fi
8170        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8171          { $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
8172$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;}
8173        else
8174          FOUND_MAKE=$MAKE_CANDIDATE
8175
8176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8177
8178  # First separate the path from the arguments. This will split at the first
8179  # space.
8180  complete="$FOUND_MAKE"
8181  path="${complete%% *}"
8182  tmp="$complete EOL"
8183  arguments="${tmp#* }"
8184
8185  # Input might be given as Windows format, start by converting to
8186  # unix format.
8187  new_path=`$CYGPATH -u "$path"`
8188
8189  # Now try to locate executable using which
8190  new_path=`$WHICH "$new_path" 2> /dev/null`
8191  # bat and cmd files are not always considered executable in cygwin causing which
8192  # to not find them
8193  if test "x$new_path" = x \
8194           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8195           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8196    new_path=`$CYGPATH -u "$path"`
8197  fi
8198  if test "x$new_path" = x; then
8199    # Oops. Which didn't find the executable.
8200    # The splitting of arguments from the executable at a space might have been incorrect,
8201    # since paths with space are more likely in Windows. Give it another try with the whole
8202    # argument.
8203    path="$complete"
8204    arguments="EOL"
8205    new_path=`$CYGPATH -u "$path"`
8206    new_path=`$WHICH "$new_path" 2> /dev/null`
8207    # bat and cmd files are not always considered executable in cygwin causing which
8208    # to not find them
8209    if test "x$new_path" = x \
8210             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8211             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8212      new_path=`$CYGPATH -u "$path"`
8213    fi
8214    if test "x$new_path" = x; then
8215      # It's still not found. Now this is an unrecoverable error.
8216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8218      has_space=`$ECHO "$complete" | $GREP " "`
8219      if test "x$has_space" != x; then
8220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8222      fi
8223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8224    fi
8225  fi
8226
8227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8230  # "foo.exe" is OK but "foo" is an error.
8231  #
8232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8233  # It is also a way to make sure we got the proper file name for the real test later on.
8234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8235  if test "x$test_shortpath" = x; then
8236    # Short path failed, file does not exist as specified.
8237    # Try adding .exe or .cmd
8238    if test -f "${new_path}.exe"; then
8239       input_to_shortpath="${new_path}.exe"
8240    elif test -f "${new_path}.cmd"; then
8241       input_to_shortpath="${new_path}.cmd"
8242    else
8243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8244$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8245      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8246$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8247      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8248    fi
8249  else
8250    input_to_shortpath="$new_path"
8251  fi
8252
8253  # Call helper function which possibly converts this using DOS-style short mode.
8254  # If so, the updated path is stored in $new_path.
8255  new_path="$input_to_shortpath"
8256
8257  input_path="$input_to_shortpath"
8258  # Check if we need to convert this using DOS-style short mode. If the path
8259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8260  # take no chances and rewrite it.
8261  # Note: m4 eats our [], so we need to use [ and ] instead.
8262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8263  if test "x$has_forbidden_chars" != x; then
8264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8268      # Going to short mode and back again did indeed matter. Since short mode is
8269      # case insensitive, let's make it lowercase to improve readability.
8270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8271      # Now convert it back to Unix-stile (cygpath)
8272      input_path=`$CYGPATH -u "$shortmode_path"`
8273      new_path="$input_path"
8274    fi
8275  fi
8276
8277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8278  if test "x$test_cygdrive_prefix" = x; then
8279    # As a simple fix, exclude /usr/bin since it's not a real path.
8280    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8282      # a path prefixed by /cygdrive for fixpath to work.
8283      new_path="$CYGWIN_ROOT_PATH$input_path"
8284    fi
8285  fi
8286
8287  # remove trailing .exe if any
8288  new_path="${new_path/%.exe/}"
8289
8290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8291
8292  # First separate the path from the arguments. This will split at the first
8293  # space.
8294  complete="$FOUND_MAKE"
8295  path="${complete%% *}"
8296  tmp="$complete EOL"
8297  arguments="${tmp#* }"
8298
8299  # Input might be given as Windows format, start by converting to
8300  # unix format.
8301  new_path="$path"
8302
8303  windows_path="$new_path"
8304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8305    unix_path=`$CYGPATH -u "$windows_path"`
8306    new_path="$unix_path"
8307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8309    new_path="$unix_path"
8310  fi
8311
8312
8313  # Now try to locate executable using which
8314  new_path=`$WHICH "$new_path" 2> /dev/null`
8315
8316  if test "x$new_path" = x; then
8317    # Oops. Which didn't find the executable.
8318    # The splitting of arguments from the executable at a space might have been incorrect,
8319    # since paths with space are more likely in Windows. Give it another try with the whole
8320    # argument.
8321    path="$complete"
8322    arguments="EOL"
8323    new_path="$path"
8324
8325  windows_path="$new_path"
8326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8327    unix_path=`$CYGPATH -u "$windows_path"`
8328    new_path="$unix_path"
8329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8331    new_path="$unix_path"
8332  fi
8333
8334
8335    new_path=`$WHICH "$new_path" 2> /dev/null`
8336
8337    if test "x$new_path" = x; then
8338      # It's still not found. Now this is an unrecoverable error.
8339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8340$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8341      has_space=`$ECHO "$complete" | $GREP " "`
8342      if test "x$has_space" != x; then
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8345      fi
8346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8347    fi
8348  fi
8349
8350  # Now new_path has a complete unix path to the binary
8351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8352    # Keep paths in /bin as-is, but remove trailing .exe if any
8353    new_path="${new_path/%.exe/}"
8354    # Do not save /bin paths to all_fixpath_prefixes!
8355  else
8356    # Not in mixed or Windows style, start by that.
8357    new_path=`cmd //c echo $new_path`
8358
8359  input_path="$new_path"
8360  # Check if we need to convert this using DOS-style short mode. If the path
8361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8362  # take no chances and rewrite it.
8363  # Note: m4 eats our [], so we need to use [ and ] instead.
8364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8365  if test "x$has_forbidden_chars" != x; then
8366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8368  fi
8369
8370    # Output is in $new_path
8371
8372  windows_path="$new_path"
8373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8374    unix_path=`$CYGPATH -u "$windows_path"`
8375    new_path="$unix_path"
8376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8378    new_path="$unix_path"
8379  fi
8380
8381    # remove trailing .exe if any
8382    new_path="${new_path/%.exe/}"
8383
8384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8386  fi
8387
8388  else
8389    # We're on a posix platform. Hooray! :)
8390    # First separate the path from the arguments. This will split at the first
8391    # space.
8392    complete="$FOUND_MAKE"
8393    path="${complete%% *}"
8394    tmp="$complete EOL"
8395    arguments="${tmp#* }"
8396
8397    # Cannot rely on the command "which" here since it doesn't always work.
8398    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8399    if test -z "$is_absolute_path"; then
8400      # Path to executable is not absolute. Find it.
8401      IFS_save="$IFS"
8402      IFS=:
8403      for p in $PATH; do
8404        if test -f "$p/$path" && test -x "$p/$path"; then
8405          new_path="$p/$path"
8406          break
8407        fi
8408      done
8409      IFS="$IFS_save"
8410    else
8411      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8412$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8413      new_path="$path"
8414    fi
8415
8416    if test "x$new_path" = x; then
8417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8418$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8419        has_space=`$ECHO "$complete" | $GREP " "`
8420        if test "x$has_space" != x; then
8421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8423        fi
8424        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8425      fi
8426  fi
8427
8428      # Now join together the path and the arguments once again
8429      if test "x$arguments" != xEOL; then
8430        new_complete="$new_path ${arguments% *}"
8431      else
8432        new_complete="$new_path"
8433      fi
8434
8435  if test "x$complete" != "x$new_complete"; then
8436      FOUND_MAKE="$new_complete"
8437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8438$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8439    fi
8440
8441        fi
8442      fi
8443    fi
8444  fi
8445
8446    if test "x$FOUND_MAKE" = x; then
8447      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8448    fi
8449  else
8450    # Try our hardest to locate a correct version of GNU make
8451    for ac_prog in gmake
8452do
8453  # Extract the first word of "$ac_prog", so it can be a program name with args.
8454set dummy $ac_prog; ac_word=$2
8455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8456$as_echo_n "checking for $ac_word... " >&6; }
8457if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8458  $as_echo_n "(cached) " >&6
8459else
8460  case $CHECK_GMAKE in
8461  [\\/]* | ?:[\\/]*)
8462  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8463  ;;
8464  *)
8465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466for as_dir in $PATH
8467do
8468  IFS=$as_save_IFS
8469  test -z "$as_dir" && as_dir=.
8470    for ac_exec_ext in '' $ac_executable_extensions; do
8471  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8472    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8474    break 2
8475  fi
8476done
8477  done
8478IFS=$as_save_IFS
8479
8480  ;;
8481esac
8482fi
8483CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8484if test -n "$CHECK_GMAKE"; then
8485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8486$as_echo "$CHECK_GMAKE" >&6; }
8487else
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8489$as_echo "no" >&6; }
8490fi
8491
8492
8493  test -n "$CHECK_GMAKE" && break
8494done
8495
8496
8497  MAKE_CANDIDATE=""$CHECK_GMAKE""
8498  DESCRIPTION="gmake in PATH"
8499  if test "x$MAKE_CANDIDATE" != x; then
8500    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8501$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8502    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8503    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8504    if test "x$IS_GNU_MAKE" = x; then
8505      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8506$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8507    else
8508      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8509      if test "x$IS_MODERN_MAKE" = x; then
8510        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8511$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8512      else
8513        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8514          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8515            MAKE_EXPECTED_ENV='cygwin'
8516          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8517            MAKE_EXPECTED_ENV='msys'
8518          else
8519            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8520          fi
8521          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8522          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8523        else
8524          # Not relevant for non-Windows
8525          IS_MAKE_CORRECT_ENV=true
8526        fi
8527        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8528          { $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
8529$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;}
8530        else
8531          FOUND_MAKE=$MAKE_CANDIDATE
8532
8533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534
8535  # First separate the path from the arguments. This will split at the first
8536  # space.
8537  complete="$FOUND_MAKE"
8538  path="${complete%% *}"
8539  tmp="$complete EOL"
8540  arguments="${tmp#* }"
8541
8542  # Input might be given as Windows format, start by converting to
8543  # unix format.
8544  new_path=`$CYGPATH -u "$path"`
8545
8546  # Now try to locate executable using which
8547  new_path=`$WHICH "$new_path" 2> /dev/null`
8548  # bat and cmd files are not always considered executable in cygwin causing which
8549  # to not find them
8550  if test "x$new_path" = x \
8551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8553    new_path=`$CYGPATH -u "$path"`
8554  fi
8555  if test "x$new_path" = x; then
8556    # Oops. Which didn't find the executable.
8557    # The splitting of arguments from the executable at a space might have been incorrect,
8558    # since paths with space are more likely in Windows. Give it another try with the whole
8559    # argument.
8560    path="$complete"
8561    arguments="EOL"
8562    new_path=`$CYGPATH -u "$path"`
8563    new_path=`$WHICH "$new_path" 2> /dev/null`
8564    # bat and cmd files are not always considered executable in cygwin causing which
8565    # to not find them
8566    if test "x$new_path" = x \
8567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8569      new_path=`$CYGPATH -u "$path"`
8570    fi
8571    if test "x$new_path" = x; then
8572      # It's still not found. Now this is an unrecoverable error.
8573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8575      has_space=`$ECHO "$complete" | $GREP " "`
8576      if test "x$has_space" != x; then
8577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8579      fi
8580      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8581    fi
8582  fi
8583
8584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8587  # "foo.exe" is OK but "foo" is an error.
8588  #
8589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8590  # It is also a way to make sure we got the proper file name for the real test later on.
8591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8592  if test "x$test_shortpath" = x; then
8593    # Short path failed, file does not exist as specified.
8594    # Try adding .exe or .cmd
8595    if test -f "${new_path}.exe"; then
8596       input_to_shortpath="${new_path}.exe"
8597    elif test -f "${new_path}.cmd"; then
8598       input_to_shortpath="${new_path}.cmd"
8599    else
8600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8604      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8605    fi
8606  else
8607    input_to_shortpath="$new_path"
8608  fi
8609
8610  # Call helper function which possibly converts this using DOS-style short mode.
8611  # If so, the updated path is stored in $new_path.
8612  new_path="$input_to_shortpath"
8613
8614  input_path="$input_to_shortpath"
8615  # Check if we need to convert this using DOS-style short mode. If the path
8616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8617  # take no chances and rewrite it.
8618  # Note: m4 eats our [], so we need to use [ and ] instead.
8619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8620  if test "x$has_forbidden_chars" != x; then
8621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8625      # Going to short mode and back again did indeed matter. Since short mode is
8626      # case insensitive, let's make it lowercase to improve readability.
8627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8628      # Now convert it back to Unix-stile (cygpath)
8629      input_path=`$CYGPATH -u "$shortmode_path"`
8630      new_path="$input_path"
8631    fi
8632  fi
8633
8634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8635  if test "x$test_cygdrive_prefix" = x; then
8636    # As a simple fix, exclude /usr/bin since it's not a real path.
8637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8639      # a path prefixed by /cygdrive for fixpath to work.
8640      new_path="$CYGWIN_ROOT_PATH$input_path"
8641    fi
8642  fi
8643
8644  # remove trailing .exe if any
8645  new_path="${new_path/%.exe/}"
8646
8647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8648
8649  # First separate the path from the arguments. This will split at the first
8650  # space.
8651  complete="$FOUND_MAKE"
8652  path="${complete%% *}"
8653  tmp="$complete EOL"
8654  arguments="${tmp#* }"
8655
8656  # Input might be given as Windows format, start by converting to
8657  # unix format.
8658  new_path="$path"
8659
8660  windows_path="$new_path"
8661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8662    unix_path=`$CYGPATH -u "$windows_path"`
8663    new_path="$unix_path"
8664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8666    new_path="$unix_path"
8667  fi
8668
8669
8670  # Now try to locate executable using which
8671  new_path=`$WHICH "$new_path" 2> /dev/null`
8672
8673  if test "x$new_path" = x; then
8674    # Oops. Which didn't find the executable.
8675    # The splitting of arguments from the executable at a space might have been incorrect,
8676    # since paths with space are more likely in Windows. Give it another try with the whole
8677    # argument.
8678    path="$complete"
8679    arguments="EOL"
8680    new_path="$path"
8681
8682  windows_path="$new_path"
8683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8684    unix_path=`$CYGPATH -u "$windows_path"`
8685    new_path="$unix_path"
8686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8688    new_path="$unix_path"
8689  fi
8690
8691
8692    new_path=`$WHICH "$new_path" 2> /dev/null`
8693
8694    if test "x$new_path" = x; then
8695      # It's still not found. Now this is an unrecoverable error.
8696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8697$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8698      has_space=`$ECHO "$complete" | $GREP " "`
8699      if test "x$has_space" != x; then
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8702      fi
8703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8704    fi
8705  fi
8706
8707  # Now new_path has a complete unix path to the binary
8708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8709    # Keep paths in /bin as-is, but remove trailing .exe if any
8710    new_path="${new_path/%.exe/}"
8711    # Do not save /bin paths to all_fixpath_prefixes!
8712  else
8713    # Not in mixed or Windows style, start by that.
8714    new_path=`cmd //c echo $new_path`
8715
8716  input_path="$new_path"
8717  # Check if we need to convert this using DOS-style short mode. If the path
8718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8719  # take no chances and rewrite it.
8720  # Note: m4 eats our [], so we need to use [ and ] instead.
8721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8722  if test "x$has_forbidden_chars" != x; then
8723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8725  fi
8726
8727    # Output is in $new_path
8728
8729  windows_path="$new_path"
8730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8731    unix_path=`$CYGPATH -u "$windows_path"`
8732    new_path="$unix_path"
8733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8735    new_path="$unix_path"
8736  fi
8737
8738    # remove trailing .exe if any
8739    new_path="${new_path/%.exe/}"
8740
8741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8743  fi
8744
8745  else
8746    # We're on a posix platform. Hooray! :)
8747    # First separate the path from the arguments. This will split at the first
8748    # space.
8749    complete="$FOUND_MAKE"
8750    path="${complete%% *}"
8751    tmp="$complete EOL"
8752    arguments="${tmp#* }"
8753
8754    # Cannot rely on the command "which" here since it doesn't always work.
8755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8756    if test -z "$is_absolute_path"; then
8757      # Path to executable is not absolute. Find it.
8758      IFS_save="$IFS"
8759      IFS=:
8760      for p in $PATH; do
8761        if test -f "$p/$path" && test -x "$p/$path"; then
8762          new_path="$p/$path"
8763          break
8764        fi
8765      done
8766      IFS="$IFS_save"
8767    else
8768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8769$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8770      new_path="$path"
8771    fi
8772
8773    if test "x$new_path" = x; then
8774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8775$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8776        has_space=`$ECHO "$complete" | $GREP " "`
8777        if test "x$has_space" != x; then
8778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8780        fi
8781        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8782      fi
8783  fi
8784
8785      # Now join together the path and the arguments once again
8786      if test "x$arguments" != xEOL; then
8787        new_complete="$new_path ${arguments% *}"
8788      else
8789        new_complete="$new_path"
8790      fi
8791
8792  if test "x$complete" != "x$new_complete"; then
8793      FOUND_MAKE="$new_complete"
8794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8795$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8796    fi
8797
8798        fi
8799      fi
8800    fi
8801  fi
8802
8803
8804    if test "x$FOUND_MAKE" = x; then
8805      for ac_prog in make
8806do
8807  # Extract the first word of "$ac_prog", so it can be a program name with args.
8808set dummy $ac_prog; ac_word=$2
8809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8810$as_echo_n "checking for $ac_word... " >&6; }
8811if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8812  $as_echo_n "(cached) " >&6
8813else
8814  case $CHECK_MAKE in
8815  [\\/]* | ?:[\\/]*)
8816  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8817  ;;
8818  *)
8819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8820for as_dir in $PATH
8821do
8822  IFS=$as_save_IFS
8823  test -z "$as_dir" && as_dir=.
8824    for ac_exec_ext in '' $ac_executable_extensions; do
8825  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8826    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8828    break 2
8829  fi
8830done
8831  done
8832IFS=$as_save_IFS
8833
8834  ;;
8835esac
8836fi
8837CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8838if test -n "$CHECK_MAKE"; then
8839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8840$as_echo "$CHECK_MAKE" >&6; }
8841else
8842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8843$as_echo "no" >&6; }
8844fi
8845
8846
8847  test -n "$CHECK_MAKE" && break
8848done
8849
8850
8851  MAKE_CANDIDATE=""$CHECK_MAKE""
8852  DESCRIPTION="make in PATH"
8853  if test "x$MAKE_CANDIDATE" != x; then
8854    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8855$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8856    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8857    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8858    if test "x$IS_GNU_MAKE" = x; then
8859      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8860$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8861    else
8862      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8863      if test "x$IS_MODERN_MAKE" = x; then
8864        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
8865$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
8866      else
8867        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8868          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8869            MAKE_EXPECTED_ENV='cygwin'
8870          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8871            MAKE_EXPECTED_ENV='msys'
8872          else
8873            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8874          fi
8875          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8876          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8877        else
8878          # Not relevant for non-Windows
8879          IS_MAKE_CORRECT_ENV=true
8880        fi
8881        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8882          { $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
8883$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;}
8884        else
8885          FOUND_MAKE=$MAKE_CANDIDATE
8886
8887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8888
8889  # First separate the path from the arguments. This will split at the first
8890  # space.
8891  complete="$FOUND_MAKE"
8892  path="${complete%% *}"
8893  tmp="$complete EOL"
8894  arguments="${tmp#* }"
8895
8896  # Input might be given as Windows format, start by converting to
8897  # unix format.
8898  new_path=`$CYGPATH -u "$path"`
8899
8900  # Now try to locate executable using which
8901  new_path=`$WHICH "$new_path" 2> /dev/null`
8902  # bat and cmd files are not always considered executable in cygwin causing which
8903  # to not find them
8904  if test "x$new_path" = x \
8905           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8906           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8907    new_path=`$CYGPATH -u "$path"`
8908  fi
8909  if test "x$new_path" = x; then
8910    # Oops. Which didn't find the executable.
8911    # The splitting of arguments from the executable at a space might have been incorrect,
8912    # since paths with space are more likely in Windows. Give it another try with the whole
8913    # argument.
8914    path="$complete"
8915    arguments="EOL"
8916    new_path=`$CYGPATH -u "$path"`
8917    new_path=`$WHICH "$new_path" 2> /dev/null`
8918    # bat and cmd files are not always considered executable in cygwin causing which
8919    # to not find them
8920    if test "x$new_path" = x \
8921             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8922             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8923      new_path=`$CYGPATH -u "$path"`
8924    fi
8925    if test "x$new_path" = x; then
8926      # It's still not found. Now this is an unrecoverable error.
8927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8928$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8929      has_space=`$ECHO "$complete" | $GREP " "`
8930      if test "x$has_space" != x; then
8931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8933      fi
8934      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8935    fi
8936  fi
8937
8938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8941  # "foo.exe" is OK but "foo" is an error.
8942  #
8943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8944  # It is also a way to make sure we got the proper file name for the real test later on.
8945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8946  if test "x$test_shortpath" = x; then
8947    # Short path failed, file does not exist as specified.
8948    # Try adding .exe or .cmd
8949    if test -f "${new_path}.exe"; then
8950       input_to_shortpath="${new_path}.exe"
8951    elif test -f "${new_path}.cmd"; then
8952       input_to_shortpath="${new_path}.cmd"
8953    else
8954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8955$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8958      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8959    fi
8960  else
8961    input_to_shortpath="$new_path"
8962  fi
8963
8964  # Call helper function which possibly converts this using DOS-style short mode.
8965  # If so, the updated path is stored in $new_path.
8966  new_path="$input_to_shortpath"
8967
8968  input_path="$input_to_shortpath"
8969  # Check if we need to convert this using DOS-style short mode. If the path
8970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8971  # take no chances and rewrite it.
8972  # Note: m4 eats our [], so we need to use [ and ] instead.
8973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8974  if test "x$has_forbidden_chars" != x; then
8975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8979      # Going to short mode and back again did indeed matter. Since short mode is
8980      # case insensitive, let's make it lowercase to improve readability.
8981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8982      # Now convert it back to Unix-stile (cygpath)
8983      input_path=`$CYGPATH -u "$shortmode_path"`
8984      new_path="$input_path"
8985    fi
8986  fi
8987
8988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8989  if test "x$test_cygdrive_prefix" = x; then
8990    # As a simple fix, exclude /usr/bin since it's not a real path.
8991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8993      # a path prefixed by /cygdrive for fixpath to work.
8994      new_path="$CYGWIN_ROOT_PATH$input_path"
8995    fi
8996  fi
8997
8998  # remove trailing .exe if any
8999  new_path="${new_path/%.exe/}"
9000
9001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9002
9003  # First separate the path from the arguments. This will split at the first
9004  # space.
9005  complete="$FOUND_MAKE"
9006  path="${complete%% *}"
9007  tmp="$complete EOL"
9008  arguments="${tmp#* }"
9009
9010  # Input might be given as Windows format, start by converting to
9011  # unix format.
9012  new_path="$path"
9013
9014  windows_path="$new_path"
9015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9016    unix_path=`$CYGPATH -u "$windows_path"`
9017    new_path="$unix_path"
9018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9020    new_path="$unix_path"
9021  fi
9022
9023
9024  # Now try to locate executable using which
9025  new_path=`$WHICH "$new_path" 2> /dev/null`
9026
9027  if test "x$new_path" = x; then
9028    # Oops. Which didn't find the executable.
9029    # The splitting of arguments from the executable at a space might have been incorrect,
9030    # since paths with space are more likely in Windows. Give it another try with the whole
9031    # argument.
9032    path="$complete"
9033    arguments="EOL"
9034    new_path="$path"
9035
9036  windows_path="$new_path"
9037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9038    unix_path=`$CYGPATH -u "$windows_path"`
9039    new_path="$unix_path"
9040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9042    new_path="$unix_path"
9043  fi
9044
9045
9046    new_path=`$WHICH "$new_path" 2> /dev/null`
9047
9048    if test "x$new_path" = x; then
9049      # It's still not found. Now this is an unrecoverable error.
9050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9052      has_space=`$ECHO "$complete" | $GREP " "`
9053      if test "x$has_space" != x; then
9054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9056      fi
9057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9058    fi
9059  fi
9060
9061  # Now new_path has a complete unix path to the binary
9062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9063    # Keep paths in /bin as-is, but remove trailing .exe if any
9064    new_path="${new_path/%.exe/}"
9065    # Do not save /bin paths to all_fixpath_prefixes!
9066  else
9067    # Not in mixed or Windows style, start by that.
9068    new_path=`cmd //c echo $new_path`
9069
9070  input_path="$new_path"
9071  # Check if we need to convert this using DOS-style short mode. If the path
9072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9073  # take no chances and rewrite it.
9074  # Note: m4 eats our [], so we need to use [ and ] instead.
9075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9076  if test "x$has_forbidden_chars" != x; then
9077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9079  fi
9080
9081    # Output is in $new_path
9082
9083  windows_path="$new_path"
9084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9085    unix_path=`$CYGPATH -u "$windows_path"`
9086    new_path="$unix_path"
9087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9089    new_path="$unix_path"
9090  fi
9091
9092    # remove trailing .exe if any
9093    new_path="${new_path/%.exe/}"
9094
9095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9097  fi
9098
9099  else
9100    # We're on a posix platform. Hooray! :)
9101    # First separate the path from the arguments. This will split at the first
9102    # space.
9103    complete="$FOUND_MAKE"
9104    path="${complete%% *}"
9105    tmp="$complete EOL"
9106    arguments="${tmp#* }"
9107
9108    # Cannot rely on the command "which" here since it doesn't always work.
9109    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9110    if test -z "$is_absolute_path"; then
9111      # Path to executable is not absolute. Find it.
9112      IFS_save="$IFS"
9113      IFS=:
9114      for p in $PATH; do
9115        if test -f "$p/$path" && test -x "$p/$path"; then
9116          new_path="$p/$path"
9117          break
9118        fi
9119      done
9120      IFS="$IFS_save"
9121    else
9122      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9123$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9124      new_path="$path"
9125    fi
9126
9127    if test "x$new_path" = x; then
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9129$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9130        has_space=`$ECHO "$complete" | $GREP " "`
9131        if test "x$has_space" != x; then
9132          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9134        fi
9135        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9136      fi
9137  fi
9138
9139      # Now join together the path and the arguments once again
9140      if test "x$arguments" != xEOL; then
9141        new_complete="$new_path ${arguments% *}"
9142      else
9143        new_complete="$new_path"
9144      fi
9145
9146  if test "x$complete" != "x$new_complete"; then
9147      FOUND_MAKE="$new_complete"
9148      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9149$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9150    fi
9151
9152        fi
9153      fi
9154    fi
9155  fi
9156
9157    fi
9158
9159    if test "x$FOUND_MAKE" = x; then
9160      if test "x$TOOLS_DIR" != x; then
9161        # We have a tools-dir, check that as well before giving up.
9162        OLD_PATH=$PATH
9163        PATH=$TOOLS_DIR:$PATH
9164        for ac_prog in gmake
9165do
9166  # Extract the first word of "$ac_prog", so it can be a program name with args.
9167set dummy $ac_prog; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $CHECK_TOOLSDIR_GMAKE in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9185    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9197if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9199$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9207done
9208
9209
9210  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9211  DESCRIPTION="gmake in tools-dir"
9212  if test "x$MAKE_CANDIDATE" != x; then
9213    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9214$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9215    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9216    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9217    if test "x$IS_GNU_MAKE" = x; then
9218      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9219$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9220    else
9221      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9222      if test "x$IS_MODERN_MAKE" = x; then
9223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9224$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9225      else
9226        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9227          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9228            MAKE_EXPECTED_ENV='cygwin'
9229          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9230            MAKE_EXPECTED_ENV='msys'
9231          else
9232            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9233          fi
9234          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9235          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9236        else
9237          # Not relevant for non-Windows
9238          IS_MAKE_CORRECT_ENV=true
9239        fi
9240        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9241          { $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
9242$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;}
9243        else
9244          FOUND_MAKE=$MAKE_CANDIDATE
9245
9246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9247
9248  # First separate the path from the arguments. This will split at the first
9249  # space.
9250  complete="$FOUND_MAKE"
9251  path="${complete%% *}"
9252  tmp="$complete EOL"
9253  arguments="${tmp#* }"
9254
9255  # Input might be given as Windows format, start by converting to
9256  # unix format.
9257  new_path=`$CYGPATH -u "$path"`
9258
9259  # Now try to locate executable using which
9260  new_path=`$WHICH "$new_path" 2> /dev/null`
9261  # bat and cmd files are not always considered executable in cygwin causing which
9262  # to not find them
9263  if test "x$new_path" = x \
9264           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9265           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9266    new_path=`$CYGPATH -u "$path"`
9267  fi
9268  if test "x$new_path" = x; then
9269    # Oops. Which didn't find the executable.
9270    # The splitting of arguments from the executable at a space might have been incorrect,
9271    # since paths with space are more likely in Windows. Give it another try with the whole
9272    # argument.
9273    path="$complete"
9274    arguments="EOL"
9275    new_path=`$CYGPATH -u "$path"`
9276    new_path=`$WHICH "$new_path" 2> /dev/null`
9277    # bat and cmd files are not always considered executable in cygwin causing which
9278    # to not find them
9279    if test "x$new_path" = x \
9280             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9281             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9282      new_path=`$CYGPATH -u "$path"`
9283    fi
9284    if test "x$new_path" = x; then
9285      # It's still not found. Now this is an unrecoverable error.
9286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9288      has_space=`$ECHO "$complete" | $GREP " "`
9289      if test "x$has_space" != x; then
9290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9292      fi
9293      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9294    fi
9295  fi
9296
9297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9300  # "foo.exe" is OK but "foo" is an error.
9301  #
9302  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9303  # It is also a way to make sure we got the proper file name for the real test later on.
9304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9305  if test "x$test_shortpath" = x; then
9306    # Short path failed, file does not exist as specified.
9307    # Try adding .exe or .cmd
9308    if test -f "${new_path}.exe"; then
9309       input_to_shortpath="${new_path}.exe"
9310    elif test -f "${new_path}.cmd"; then
9311       input_to_shortpath="${new_path}.cmd"
9312    else
9313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9318    fi
9319  else
9320    input_to_shortpath="$new_path"
9321  fi
9322
9323  # Call helper function which possibly converts this using DOS-style short mode.
9324  # If so, the updated path is stored in $new_path.
9325  new_path="$input_to_shortpath"
9326
9327  input_path="$input_to_shortpath"
9328  # Check if we need to convert this using DOS-style short mode. If the path
9329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9330  # take no chances and rewrite it.
9331  # Note: m4 eats our [], so we need to use [ and ] instead.
9332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9333  if test "x$has_forbidden_chars" != x; then
9334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9338      # Going to short mode and back again did indeed matter. Since short mode is
9339      # case insensitive, let's make it lowercase to improve readability.
9340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9341      # Now convert it back to Unix-stile (cygpath)
9342      input_path=`$CYGPATH -u "$shortmode_path"`
9343      new_path="$input_path"
9344    fi
9345  fi
9346
9347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9348  if test "x$test_cygdrive_prefix" = x; then
9349    # As a simple fix, exclude /usr/bin since it's not a real path.
9350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9352      # a path prefixed by /cygdrive for fixpath to work.
9353      new_path="$CYGWIN_ROOT_PATH$input_path"
9354    fi
9355  fi
9356
9357  # remove trailing .exe if any
9358  new_path="${new_path/%.exe/}"
9359
9360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9361
9362  # First separate the path from the arguments. This will split at the first
9363  # space.
9364  complete="$FOUND_MAKE"
9365  path="${complete%% *}"
9366  tmp="$complete EOL"
9367  arguments="${tmp#* }"
9368
9369  # Input might be given as Windows format, start by converting to
9370  # unix format.
9371  new_path="$path"
9372
9373  windows_path="$new_path"
9374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9375    unix_path=`$CYGPATH -u "$windows_path"`
9376    new_path="$unix_path"
9377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9379    new_path="$unix_path"
9380  fi
9381
9382
9383  # Now try to locate executable using which
9384  new_path=`$WHICH "$new_path" 2> /dev/null`
9385
9386  if test "x$new_path" = x; then
9387    # Oops. Which didn't find the executable.
9388    # The splitting of arguments from the executable at a space might have been incorrect,
9389    # since paths with space are more likely in Windows. Give it another try with the whole
9390    # argument.
9391    path="$complete"
9392    arguments="EOL"
9393    new_path="$path"
9394
9395  windows_path="$new_path"
9396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9397    unix_path=`$CYGPATH -u "$windows_path"`
9398    new_path="$unix_path"
9399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9401    new_path="$unix_path"
9402  fi
9403
9404
9405    new_path=`$WHICH "$new_path" 2> /dev/null`
9406
9407    if test "x$new_path" = x; then
9408      # It's still not found. Now this is an unrecoverable error.
9409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9411      has_space=`$ECHO "$complete" | $GREP " "`
9412      if test "x$has_space" != x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9414$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9415      fi
9416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9417    fi
9418  fi
9419
9420  # Now new_path has a complete unix path to the binary
9421  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9422    # Keep paths in /bin as-is, but remove trailing .exe if any
9423    new_path="${new_path/%.exe/}"
9424    # Do not save /bin paths to all_fixpath_prefixes!
9425  else
9426    # Not in mixed or Windows style, start by that.
9427    new_path=`cmd //c echo $new_path`
9428
9429  input_path="$new_path"
9430  # Check if we need to convert this using DOS-style short mode. If the path
9431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9432  # take no chances and rewrite it.
9433  # Note: m4 eats our [], so we need to use [ and ] instead.
9434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9435  if test "x$has_forbidden_chars" != x; then
9436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9438  fi
9439
9440    # Output is in $new_path
9441
9442  windows_path="$new_path"
9443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9444    unix_path=`$CYGPATH -u "$windows_path"`
9445    new_path="$unix_path"
9446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9448    new_path="$unix_path"
9449  fi
9450
9451    # remove trailing .exe if any
9452    new_path="${new_path/%.exe/}"
9453
9454    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9455    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9456  fi
9457
9458  else
9459    # We're on a posix platform. Hooray! :)
9460    # First separate the path from the arguments. This will split at the first
9461    # space.
9462    complete="$FOUND_MAKE"
9463    path="${complete%% *}"
9464    tmp="$complete EOL"
9465    arguments="${tmp#* }"
9466
9467    # Cannot rely on the command "which" here since it doesn't always work.
9468    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9469    if test -z "$is_absolute_path"; then
9470      # Path to executable is not absolute. Find it.
9471      IFS_save="$IFS"
9472      IFS=:
9473      for p in $PATH; do
9474        if test -f "$p/$path" && test -x "$p/$path"; then
9475          new_path="$p/$path"
9476          break
9477        fi
9478      done
9479      IFS="$IFS_save"
9480    else
9481      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9482$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9483      new_path="$path"
9484    fi
9485
9486    if test "x$new_path" = x; then
9487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9489        has_space=`$ECHO "$complete" | $GREP " "`
9490        if test "x$has_space" != x; then
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9493        fi
9494        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9495      fi
9496  fi
9497
9498      # Now join together the path and the arguments once again
9499      if test "x$arguments" != xEOL; then
9500        new_complete="$new_path ${arguments% *}"
9501      else
9502        new_complete="$new_path"
9503      fi
9504
9505  if test "x$complete" != "x$new_complete"; then
9506      FOUND_MAKE="$new_complete"
9507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9508$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9509    fi
9510
9511        fi
9512      fi
9513    fi
9514  fi
9515
9516        if test "x$FOUND_MAKE" = x; then
9517          for ac_prog in make
9518do
9519  # Extract the first word of "$ac_prog", so it can be a program name with args.
9520set dummy $ac_prog; ac_word=$2
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9522$as_echo_n "checking for $ac_word... " >&6; }
9523if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9524  $as_echo_n "(cached) " >&6
9525else
9526  case $CHECK_TOOLSDIR_MAKE in
9527  [\\/]* | ?:[\\/]*)
9528  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9529  ;;
9530  *)
9531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532for as_dir in $PATH
9533do
9534  IFS=$as_save_IFS
9535  test -z "$as_dir" && as_dir=.
9536    for ac_exec_ext in '' $ac_executable_extensions; do
9537  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9538    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540    break 2
9541  fi
9542done
9543  done
9544IFS=$as_save_IFS
9545
9546  ;;
9547esac
9548fi
9549CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9550if test -n "$CHECK_TOOLSDIR_MAKE"; then
9551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9552$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9553else
9554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9555$as_echo "no" >&6; }
9556fi
9557
9558
9559  test -n "$CHECK_TOOLSDIR_MAKE" && break
9560done
9561
9562
9563  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9564  DESCRIPTION="make in tools-dir"
9565  if test "x$MAKE_CANDIDATE" != x; then
9566    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9567$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9568    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9569    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9570    if test "x$IS_GNU_MAKE" = x; then
9571      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9572$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9573    else
9574      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9575      if test "x$IS_MODERN_MAKE" = x; then
9576        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
9577$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
9578      else
9579        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9580          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9581            MAKE_EXPECTED_ENV='cygwin'
9582          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9583            MAKE_EXPECTED_ENV='msys'
9584          else
9585            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9586          fi
9587          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9588          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9589        else
9590          # Not relevant for non-Windows
9591          IS_MAKE_CORRECT_ENV=true
9592        fi
9593        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9594          { $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
9595$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;}
9596        else
9597          FOUND_MAKE=$MAKE_CANDIDATE
9598
9599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9600
9601  # First separate the path from the arguments. This will split at the first
9602  # space.
9603  complete="$FOUND_MAKE"
9604  path="${complete%% *}"
9605  tmp="$complete EOL"
9606  arguments="${tmp#* }"
9607
9608  # Input might be given as Windows format, start by converting to
9609  # unix format.
9610  new_path=`$CYGPATH -u "$path"`
9611
9612  # Now try to locate executable using which
9613  new_path=`$WHICH "$new_path" 2> /dev/null`
9614  # bat and cmd files are not always considered executable in cygwin causing which
9615  # to not find them
9616  if test "x$new_path" = x \
9617           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9618           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9619    new_path=`$CYGPATH -u "$path"`
9620  fi
9621  if test "x$new_path" = x; then
9622    # Oops. Which didn't find the executable.
9623    # The splitting of arguments from the executable at a space might have been incorrect,
9624    # since paths with space are more likely in Windows. Give it another try with the whole
9625    # argument.
9626    path="$complete"
9627    arguments="EOL"
9628    new_path=`$CYGPATH -u "$path"`
9629    new_path=`$WHICH "$new_path" 2> /dev/null`
9630    # bat and cmd files are not always considered executable in cygwin causing which
9631    # to not find them
9632    if test "x$new_path" = x \
9633             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9634             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9635      new_path=`$CYGPATH -u "$path"`
9636    fi
9637    if test "x$new_path" = x; then
9638      # It's still not found. Now this is an unrecoverable error.
9639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9641      has_space=`$ECHO "$complete" | $GREP " "`
9642      if test "x$has_space" != x; then
9643        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9644$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9645      fi
9646      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9647    fi
9648  fi
9649
9650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9653  # "foo.exe" is OK but "foo" is an error.
9654  #
9655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9656  # It is also a way to make sure we got the proper file name for the real test later on.
9657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9658  if test "x$test_shortpath" = x; then
9659    # Short path failed, file does not exist as specified.
9660    # Try adding .exe or .cmd
9661    if test -f "${new_path}.exe"; then
9662       input_to_shortpath="${new_path}.exe"
9663    elif test -f "${new_path}.cmd"; then
9664       input_to_shortpath="${new_path}.cmd"
9665    else
9666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9668      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9669$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9671    fi
9672  else
9673    input_to_shortpath="$new_path"
9674  fi
9675
9676  # Call helper function which possibly converts this using DOS-style short mode.
9677  # If so, the updated path is stored in $new_path.
9678  new_path="$input_to_shortpath"
9679
9680  input_path="$input_to_shortpath"
9681  # Check if we need to convert this using DOS-style short mode. If the path
9682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9683  # take no chances and rewrite it.
9684  # Note: m4 eats our [], so we need to use [ and ] instead.
9685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9686  if test "x$has_forbidden_chars" != x; then
9687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9691      # Going to short mode and back again did indeed matter. Since short mode is
9692      # case insensitive, let's make it lowercase to improve readability.
9693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9694      # Now convert it back to Unix-stile (cygpath)
9695      input_path=`$CYGPATH -u "$shortmode_path"`
9696      new_path="$input_path"
9697    fi
9698  fi
9699
9700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9701  if test "x$test_cygdrive_prefix" = x; then
9702    # As a simple fix, exclude /usr/bin since it's not a real path.
9703    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9705      # a path prefixed by /cygdrive for fixpath to work.
9706      new_path="$CYGWIN_ROOT_PATH$input_path"
9707    fi
9708  fi
9709
9710  # remove trailing .exe if any
9711  new_path="${new_path/%.exe/}"
9712
9713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9714
9715  # First separate the path from the arguments. This will split at the first
9716  # space.
9717  complete="$FOUND_MAKE"
9718  path="${complete%% *}"
9719  tmp="$complete EOL"
9720  arguments="${tmp#* }"
9721
9722  # Input might be given as Windows format, start by converting to
9723  # unix format.
9724  new_path="$path"
9725
9726  windows_path="$new_path"
9727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9728    unix_path=`$CYGPATH -u "$windows_path"`
9729    new_path="$unix_path"
9730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9732    new_path="$unix_path"
9733  fi
9734
9735
9736  # Now try to locate executable using which
9737  new_path=`$WHICH "$new_path" 2> /dev/null`
9738
9739  if test "x$new_path" = x; then
9740    # Oops. Which didn't find the executable.
9741    # The splitting of arguments from the executable at a space might have been incorrect,
9742    # since paths with space are more likely in Windows. Give it another try with the whole
9743    # argument.
9744    path="$complete"
9745    arguments="EOL"
9746    new_path="$path"
9747
9748  windows_path="$new_path"
9749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9750    unix_path=`$CYGPATH -u "$windows_path"`
9751    new_path="$unix_path"
9752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9754    new_path="$unix_path"
9755  fi
9756
9757
9758    new_path=`$WHICH "$new_path" 2> /dev/null`
9759
9760    if test "x$new_path" = x; then
9761      # It's still not found. Now this is an unrecoverable error.
9762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9764      has_space=`$ECHO "$complete" | $GREP " "`
9765      if test "x$has_space" != x; then
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9768      fi
9769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9770    fi
9771  fi
9772
9773  # Now new_path has a complete unix path to the binary
9774  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9775    # Keep paths in /bin as-is, but remove trailing .exe if any
9776    new_path="${new_path/%.exe/}"
9777    # Do not save /bin paths to all_fixpath_prefixes!
9778  else
9779    # Not in mixed or Windows style, start by that.
9780    new_path=`cmd //c echo $new_path`
9781
9782  input_path="$new_path"
9783  # Check if we need to convert this using DOS-style short mode. If the path
9784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9785  # take no chances and rewrite it.
9786  # Note: m4 eats our [], so we need to use [ and ] instead.
9787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9788  if test "x$has_forbidden_chars" != x; then
9789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9791  fi
9792
9793    # Output is in $new_path
9794
9795  windows_path="$new_path"
9796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9797    unix_path=`$CYGPATH -u "$windows_path"`
9798    new_path="$unix_path"
9799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9801    new_path="$unix_path"
9802  fi
9803
9804    # remove trailing .exe if any
9805    new_path="${new_path/%.exe/}"
9806
9807    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9808    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9809  fi
9810
9811  else
9812    # We're on a posix platform. Hooray! :)
9813    # First separate the path from the arguments. This will split at the first
9814    # space.
9815    complete="$FOUND_MAKE"
9816    path="${complete%% *}"
9817    tmp="$complete EOL"
9818    arguments="${tmp#* }"
9819
9820    # Cannot rely on the command "which" here since it doesn't always work.
9821    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9822    if test -z "$is_absolute_path"; then
9823      # Path to executable is not absolute. Find it.
9824      IFS_save="$IFS"
9825      IFS=:
9826      for p in $PATH; do
9827        if test -f "$p/$path" && test -x "$p/$path"; then
9828          new_path="$p/$path"
9829          break
9830        fi
9831      done
9832      IFS="$IFS_save"
9833    else
9834      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9835$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9836      new_path="$path"
9837    fi
9838
9839    if test "x$new_path" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9841$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9842        has_space=`$ECHO "$complete" | $GREP " "`
9843        if test "x$has_space" != x; then
9844          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9846        fi
9847        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9848      fi
9849  fi
9850
9851      # Now join together the path and the arguments once again
9852      if test "x$arguments" != xEOL; then
9853        new_complete="$new_path ${arguments% *}"
9854      else
9855        new_complete="$new_path"
9856      fi
9857
9858  if test "x$complete" != "x$new_complete"; then
9859      FOUND_MAKE="$new_complete"
9860      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9861$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9862    fi
9863
9864        fi
9865      fi
9866    fi
9867  fi
9868
9869        fi
9870        PATH=$OLD_PATH
9871      fi
9872    fi
9873
9874    if test "x$FOUND_MAKE" = x; then
9875      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
9876    fi
9877  fi
9878
9879  MAKE=$FOUND_MAKE
9880
9881  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9882$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9883
9884
9885
9886    # Test if find supports -delete
9887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9888$as_echo_n "checking if find supports -delete... " >&6; }
9889    FIND_DELETE="-delete"
9890
9891    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9892
9893    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9894
9895    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9896    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9897        # No, it does not.
9898        rm $DELETEDIR/TestIfFindSupportsDelete
9899        FIND_DELETE="-exec rm \{\} \+"
9900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9901$as_echo "no" >&6; }
9902    else
9903        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9904$as_echo "yes" >&6; }
9905    fi
9906    rmdir $DELETEDIR
9907
9908
9909
9910# These tools might not be installed by default,
9911# need hint on how to install them.
9912
9913    for ac_prog in unzip
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if test "${ac_cv_path_UNZIP+set}" = set; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $UNZIP in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9934    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945UNZIP=$ac_cv_path_UNZIP
9946if test -n "$UNZIP"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9948$as_echo "$UNZIP" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$UNZIP" && break
9956done
9957
9958
9959    if test "x$UNZIP" = x; then
9960        if test "xunzip" = x; then
9961          PROG_NAME=unzip
9962        else
9963          PROG_NAME=unzip
9964        fi
9965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9967        as_fn_error $? "Cannot continue" "$LINENO" 5
9968    fi
9969
9970
9971
9972    for ac_prog in zip
9973do
9974  # Extract the first word of "$ac_prog", so it can be a program name with args.
9975set dummy $ac_prog; ac_word=$2
9976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9977$as_echo_n "checking for $ac_word... " >&6; }
9978if test "${ac_cv_path_ZIP+set}" = set; then :
9979  $as_echo_n "(cached) " >&6
9980else
9981  case $ZIP in
9982  [\\/]* | ?:[\\/]*)
9983  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9984  ;;
9985  *)
9986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9987for as_dir in $PATH
9988do
9989  IFS=$as_save_IFS
9990  test -z "$as_dir" && as_dir=.
9991    for ac_exec_ext in '' $ac_executable_extensions; do
9992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9993    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9995    break 2
9996  fi
9997done
9998  done
9999IFS=$as_save_IFS
10000
10001  ;;
10002esac
10003fi
10004ZIP=$ac_cv_path_ZIP
10005if test -n "$ZIP"; then
10006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10007$as_echo "$ZIP" >&6; }
10008else
10009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
10011fi
10012
10013
10014  test -n "$ZIP" && break
10015done
10016
10017
10018    if test "x$ZIP" = x; then
10019        if test "xzip" = x; then
10020          PROG_NAME=zip
10021        else
10022          PROG_NAME=zip
10023        fi
10024        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10025$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10026        as_fn_error $? "Cannot continue" "$LINENO" 5
10027    fi
10028
10029
10030
10031# Non-required basic tools
10032
10033# Extract the first word of "ldd", so it can be a program name with args.
10034set dummy ldd; ac_word=$2
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036$as_echo_n "checking for $ac_word... " >&6; }
10037if test "${ac_cv_path_LDD+set}" = set; then :
10038  $as_echo_n "(cached) " >&6
10039else
10040  case $LDD in
10041  [\\/]* | ?:[\\/]*)
10042  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10043  ;;
10044  *)
10045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046for as_dir in $PATH
10047do
10048  IFS=$as_save_IFS
10049  test -z "$as_dir" && as_dir=.
10050    for ac_exec_ext in '' $ac_executable_extensions; do
10051  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10052    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054    break 2
10055  fi
10056done
10057  done
10058IFS=$as_save_IFS
10059
10060  ;;
10061esac
10062fi
10063LDD=$ac_cv_path_LDD
10064if test -n "$LDD"; then
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10066$as_echo "$LDD" >&6; }
10067else
10068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073if test "x$LDD" = "x"; then
10074    # List shared lib dependencies is used for
10075    # debug output and checking for forbidden dependencies.
10076    # We can build without it.
10077    LDD="true"
10078fi
10079# Extract the first word of "otool", so it can be a program name with args.
10080set dummy otool; ac_word=$2
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10082$as_echo_n "checking for $ac_word... " >&6; }
10083if test "${ac_cv_path_OTOOL+set}" = set; then :
10084  $as_echo_n "(cached) " >&6
10085else
10086  case $OTOOL in
10087  [\\/]* | ?:[\\/]*)
10088  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10089  ;;
10090  *)
10091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10092for as_dir in $PATH
10093do
10094  IFS=$as_save_IFS
10095  test -z "$as_dir" && as_dir=.
10096    for ac_exec_ext in '' $ac_executable_extensions; do
10097  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10098    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10100    break 2
10101  fi
10102done
10103  done
10104IFS=$as_save_IFS
10105
10106  ;;
10107esac
10108fi
10109OTOOL=$ac_cv_path_OTOOL
10110if test -n "$OTOOL"; then
10111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10112$as_echo "$OTOOL" >&6; }
10113else
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118
10119if test "x$OTOOL" = "x"; then
10120   OTOOL="true"
10121fi
10122for ac_prog in readelf greadelf
10123do
10124  # Extract the first word of "$ac_prog", so it can be a program name with args.
10125set dummy $ac_prog; ac_word=$2
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10127$as_echo_n "checking for $ac_word... " >&6; }
10128if test "${ac_cv_path_READELF+set}" = set; then :
10129  $as_echo_n "(cached) " >&6
10130else
10131  case $READELF in
10132  [\\/]* | ?:[\\/]*)
10133  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10134  ;;
10135  *)
10136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10137for as_dir in $PATH
10138do
10139  IFS=$as_save_IFS
10140  test -z "$as_dir" && as_dir=.
10141    for ac_exec_ext in '' $ac_executable_extensions; do
10142  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10143    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10145    break 2
10146  fi
10147done
10148  done
10149IFS=$as_save_IFS
10150
10151  ;;
10152esac
10153fi
10154READELF=$ac_cv_path_READELF
10155if test -n "$READELF"; then
10156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10157$as_echo "$READELF" >&6; }
10158else
10159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160$as_echo "no" >&6; }
10161fi
10162
10163
10164  test -n "$READELF" && break
10165done
10166
10167# Extract the first word of "hg", so it can be a program name with args.
10168set dummy hg; ac_word=$2
10169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10170$as_echo_n "checking for $ac_word... " >&6; }
10171if test "${ac_cv_path_HG+set}" = set; then :
10172  $as_echo_n "(cached) " >&6
10173else
10174  case $HG in
10175  [\\/]* | ?:[\\/]*)
10176  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10177  ;;
10178  *)
10179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10180for as_dir in $PATH
10181do
10182  IFS=$as_save_IFS
10183  test -z "$as_dir" && as_dir=.
10184    for ac_exec_ext in '' $ac_executable_extensions; do
10185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10186    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10188    break 2
10189  fi
10190done
10191  done
10192IFS=$as_save_IFS
10193
10194  ;;
10195esac
10196fi
10197HG=$ac_cv_path_HG
10198if test -n "$HG"; then
10199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10200$as_echo "$HG" >&6; }
10201else
10202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204fi
10205
10206
10207# Extract the first word of "stat", so it can be a program name with args.
10208set dummy stat; ac_word=$2
10209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10210$as_echo_n "checking for $ac_word... " >&6; }
10211if test "${ac_cv_path_STAT+set}" = set; then :
10212  $as_echo_n "(cached) " >&6
10213else
10214  case $STAT in
10215  [\\/]* | ?:[\\/]*)
10216  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10217  ;;
10218  *)
10219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10220for as_dir in $PATH
10221do
10222  IFS=$as_save_IFS
10223  test -z "$as_dir" && as_dir=.
10224    for ac_exec_ext in '' $ac_executable_extensions; do
10225  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10226    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10228    break 2
10229  fi
10230done
10231  done
10232IFS=$as_save_IFS
10233
10234  ;;
10235esac
10236fi
10237STAT=$ac_cv_path_STAT
10238if test -n "$STAT"; then
10239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10240$as_echo "$STAT" >&6; }
10241else
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
10244fi
10245
10246
10247# Extract the first word of "time", so it can be a program name with args.
10248set dummy time; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if test "${ac_cv_path_TIME+set}" = set; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $TIME in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10266    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277TIME=$ac_cv_path_TIME
10278if test -n "$TIME"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10280$as_echo "$TIME" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287
10288if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10289
10290    for ac_prog in comm
10291do
10292  # Extract the first word of "$ac_prog", so it can be a program name with args.
10293set dummy $ac_prog; ac_word=$2
10294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10295$as_echo_n "checking for $ac_word... " >&6; }
10296if test "${ac_cv_path_COMM+set}" = set; then :
10297  $as_echo_n "(cached) " >&6
10298else
10299  case $COMM in
10300  [\\/]* | ?:[\\/]*)
10301  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10302  ;;
10303  *)
10304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10305for as_dir in $PATH
10306do
10307  IFS=$as_save_IFS
10308  test -z "$as_dir" && as_dir=.
10309    for ac_exec_ext in '' $ac_executable_extensions; do
10310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10311    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10313    break 2
10314  fi
10315done
10316  done
10317IFS=$as_save_IFS
10318
10319  ;;
10320esac
10321fi
10322COMM=$ac_cv_path_COMM
10323if test -n "$COMM"; then
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10325$as_echo "$COMM" >&6; }
10326else
10327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329fi
10330
10331
10332  test -n "$COMM" && break
10333done
10334
10335
10336    if test "x$COMM" = x; then
10337        if test "xcomm" = x; then
10338          PROG_NAME=comm
10339        else
10340          PROG_NAME=comm
10341        fi
10342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10344        as_fn_error $? "Cannot continue" "$LINENO" 5
10345    fi
10346
10347
10348fi
10349
10350
10351# Check if pkg-config is available.
10352
10353
10354if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10355	if test -n "$ac_tool_prefix"; then
10356  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10357set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359$as_echo_n "checking for $ac_word... " >&6; }
10360if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10361  $as_echo_n "(cached) " >&6
10362else
10363  case $PKG_CONFIG in
10364  [\\/]* | ?:[\\/]*)
10365  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10366  ;;
10367  *)
10368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369for as_dir in $PATH
10370do
10371  IFS=$as_save_IFS
10372  test -z "$as_dir" && as_dir=.
10373    for ac_exec_ext in '' $ac_executable_extensions; do
10374  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10375    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377    break 2
10378  fi
10379done
10380  done
10381IFS=$as_save_IFS
10382
10383  ;;
10384esac
10385fi
10386PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10387if test -n "$PKG_CONFIG"; then
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10389$as_echo "$PKG_CONFIG" >&6; }
10390else
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393fi
10394
10395
10396fi
10397if test -z "$ac_cv_path_PKG_CONFIG"; then
10398  ac_pt_PKG_CONFIG=$PKG_CONFIG
10399  # Extract the first word of "pkg-config", so it can be a program name with args.
10400set dummy pkg-config; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $ac_pt_PKG_CONFIG in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10418    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10430if test -n "$ac_pt_PKG_CONFIG"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10432$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438  if test "x$ac_pt_PKG_CONFIG" = x; then
10439    PKG_CONFIG=""
10440  else
10441    case $cross_compiling:$ac_tool_warned in
10442yes:)
10443{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10444$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10445ac_tool_warned=yes ;;
10446esac
10447    PKG_CONFIG=$ac_pt_PKG_CONFIG
10448  fi
10449else
10450  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10451fi
10452
10453fi
10454if test -n "$PKG_CONFIG"; then
10455	_pkg_min_version=0.9.0
10456	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10457$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10458	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10459		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10460$as_echo "yes" >&6; }
10461	else
10462		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10463$as_echo "no" >&6; }
10464		PKG_CONFIG=""
10465	fi
10466
10467fi
10468
10469# After basic tools have been setup, we can check build os specific details.
10470
10471###############################################################################
10472
10473# Note that this is the build platform OS version!
10474
10475OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10476OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10477OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10478OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10479
10480
10481
10482
10483
10484# Setup builddeps, for automatic downloading of tools we need.
10485# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10486# boot-jdk setup, but we need to have basic tools setup first.
10487
10488
10489# Check whether --with-builddeps-conf was given.
10490if test "${with_builddeps_conf+set}" = set; then :
10491  withval=$with_builddeps_conf;
10492fi
10493
10494
10495
10496# Check whether --with-builddeps-server was given.
10497if test "${with_builddeps_server+set}" = set; then :
10498  withval=$with_builddeps_server;
10499fi
10500
10501
10502
10503# Check whether --with-builddeps-dir was given.
10504if test "${with_builddeps_dir+set}" = set; then :
10505  withval=$with_builddeps_dir;
10506else
10507  with_builddeps_dir=/localhome/builddeps
10508fi
10509
10510
10511
10512# Check whether --with-builddeps-group was given.
10513if test "${with_builddeps_group+set}" = set; then :
10514  withval=$with_builddeps_group;
10515fi
10516
10517
10518
10519
10520    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10521        if test "x$with_builddeps_conf" != x; then
10522            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10523$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10524            builddepsfile=$with_builddeps_conf
10525            if test -s $builddepsfile; then
10526                . $builddepsfile
10527                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10528$as_echo "loaded!" >&6; }
10529            else
10530               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10531           fi
10532        else
10533            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10534$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10535            builddepsfile=`mktemp`
10536            touch $builddepsfile
10537            # Put all found confs into a single file.
10538            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10539            # Source the file to acquire the variables
10540            if test -s $builddepsfile; then
10541                . $builddepsfile
10542                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10543$as_echo "found at least one!" >&6; }
10544            else
10545               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10546           fi
10547        fi
10548        # Create build and target names that use _ instead of "-" and ".".
10549        # This is necessary to use them in variable names.
10550        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10551        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10552        # Extract rewrite information for build and target
10553        eval rewritten_build=\${REWRITE_${build_var}}
10554        if test "x$rewritten_build" = x; then
10555            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10556            echo Build stays the same $rewritten_build
10557        else
10558            echo Rewriting build for builddeps into $rewritten_build
10559        fi
10560        eval rewritten_target=\${REWRITE_${target_var}}
10561        if test "x$rewritten_target" = x; then
10562            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10563            echo Target stays the same $rewritten_target
10564        else
10565            echo Rewriting target for builddeps into $rewritten_target
10566        fi
10567        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10568        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10569    fi
10570    for ac_prog in 7z unzip
10571do
10572  # Extract the first word of "$ac_prog", so it can be a program name with args.
10573set dummy $ac_prog; ac_word=$2
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10575$as_echo_n "checking for $ac_word... " >&6; }
10576if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10577  $as_echo_n "(cached) " >&6
10578else
10579  if test -n "$BDEPS_UNZIP"; then
10580  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10581else
10582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10589    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597fi
10598fi
10599BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10600if test -n "$BDEPS_UNZIP"; then
10601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10602$as_echo "$BDEPS_UNZIP" >&6; }
10603else
10604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10605$as_echo "no" >&6; }
10606fi
10607
10608
10609  test -n "$BDEPS_UNZIP" && break
10610done
10611
10612    if test "x$BDEPS_UNZIP" = x7z; then
10613        BDEPS_UNZIP="7z x"
10614    fi
10615
10616    for ac_prog in wget lftp ftp
10617do
10618  # Extract the first word of "$ac_prog", so it can be a program name with args.
10619set dummy $ac_prog; ac_word=$2
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10621$as_echo_n "checking for $ac_word... " >&6; }
10622if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10623  $as_echo_n "(cached) " >&6
10624else
10625  if test -n "$BDEPS_FTP"; then
10626  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10627else
10628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10629for as_dir in $PATH
10630do
10631  IFS=$as_save_IFS
10632  test -z "$as_dir" && as_dir=.
10633    for ac_exec_ext in '' $ac_executable_extensions; do
10634  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10635    ac_cv_prog_BDEPS_FTP="$ac_prog"
10636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10637    break 2
10638  fi
10639done
10640  done
10641IFS=$as_save_IFS
10642
10643fi
10644fi
10645BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10646if test -n "$BDEPS_FTP"; then
10647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10648$as_echo "$BDEPS_FTP" >&6; }
10649else
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651$as_echo "no" >&6; }
10652fi
10653
10654
10655  test -n "$BDEPS_FTP" && break
10656done
10657
10658
10659
10660###############################################################################
10661#
10662# Determine OpenJDK variants, options and version numbers.
10663#
10664###############################################################################
10665
10666# We need build & target for this.
10667
10668
10669###############################################################################
10670#
10671# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10672# We always build headless support.
10673#
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10675$as_echo_n "checking headful support... " >&6; }
10676# Check whether --enable-headful was given.
10677if test "${enable_headful+set}" = set; then :
10678  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10679else
10680  SUPPORT_HEADFUL=yes
10681fi
10682
10683
10684SUPPORT_HEADLESS=yes
10685BUILD_HEADLESS="BUILD_HEADLESS:=true"
10686
10687if test "x$SUPPORT_HEADFUL" = xyes; then
10688    # We are building both headful and headless.
10689    headful_msg="inlude support for both headful and headless"
10690fi
10691
10692if test "x$SUPPORT_HEADFUL" = xno; then
10693    # Thus we are building headless only.
10694    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10695    headful_msg="headless only"
10696fi
10697
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10699$as_echo "$headful_msg" >&6; }
10700
10701
10702
10703
10704
10705# Control wether Hotspot runs Queens test after build.
10706# Check whether --enable-hotspot-test-in-build was given.
10707if test "${enable_hotspot_test_in_build+set}" = set; then :
10708  enableval=$enable_hotspot_test_in_build;
10709else
10710  enable_hotspot_test_in_build=no
10711fi
10712
10713if test "x$enable_hotspot_test_in_build" = "xyes"; then
10714    TEST_IN_BUILD=true
10715else
10716    TEST_IN_BUILD=false
10717fi
10718
10719
10720###############################################################################
10721#
10722# Choose cacerts source file
10723#
10724
10725# Check whether --with-cacerts-file was given.
10726if test "${with_cacerts_file+set}" = set; then :
10727  withval=$with_cacerts_file;
10728fi
10729
10730if test "x$with_cacerts_file" != x; then
10731    CACERTS_FILE=$with_cacerts_file
10732else
10733    if test "x$OPENJDK" = "xtrue"; then
10734        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10735    else
10736        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10737    fi
10738fi
10739
10740
10741###############################################################################
10742#
10743# Enable or disable unlimited crypto
10744#
10745# Check whether --enable-unlimited-crypto was given.
10746if test "${enable_unlimited_crypto+set}" = set; then :
10747  enableval=$enable_unlimited_crypto;
10748else
10749  enable_unlimited_crypto=no
10750fi
10751
10752if test "x$enable_unlimited_crypto" = "xyes"; then
10753    UNLIMITED_CRYPTO=true
10754else
10755    UNLIMITED_CRYPTO=false
10756fi
10757
10758
10759###############################################################################
10760#
10761# Compress jars
10762#
10763COMPRESS_JARS=false
10764
10765
10766
10767
10768# Source the version numbers
10769. $AUTOCONF_DIR/version-numbers
10770
10771# Get the settings from parameters
10772
10773# Check whether --with-milestone was given.
10774if test "${with_milestone+set}" = set; then :
10775  withval=$with_milestone;
10776fi
10777
10778if test "x$with_milestone" = xyes; then
10779  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10780elif test "x$with_milestone" != x; then
10781    MILESTONE="$with_milestone"
10782fi
10783if test "x$MILESTONE" = x; then
10784  MILESTONE=internal
10785fi
10786
10787
10788# Check whether --with-build-number was given.
10789if test "${with_build_number+set}" = set; then :
10790  withval=$with_build_number;
10791fi
10792
10793if test "x$with_build_number" = xyes; then
10794  as_fn_error $? "Build number must have a value" "$LINENO" 5
10795elif test "x$with_build_number" != x; then
10796  JDK_BUILD_NUMBER="$with_build_number"
10797fi
10798if test "x$JDK_BUILD_NUMBER" = x; then
10799  JDK_BUILD_NUMBER=b00
10800fi
10801
10802
10803# Check whether --with-user-release-suffix was given.
10804if test "${with_user_release_suffix+set}" = set; then :
10805  withval=$with_user_release_suffix;
10806fi
10807
10808if test "x$with_user_release_suffix" = xyes; then
10809  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10810elif test "x$with_user_release_suffix" != x; then
10811  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10812else
10813  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10814  # Avoid [:alnum:] since it depends on the locale.
10815  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10816  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10817fi
10818
10819
10820# Now set the JDK version, milestone, build number etc.
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835COPYRIGHT_YEAR=`date +'%Y'`
10836
10837
10838if test "x$JDK_UPDATE_VERSION" != x; then
10839  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10840else
10841  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10842fi
10843
10844
10845COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10846
10847
10848
10849###############################################################################
10850#
10851# Setup BootJDK, used to bootstrap the build.
10852#
10853###############################################################################
10854
10855
10856BOOT_JDK_FOUND=no
10857
10858# Check whether --with-boot-jdk was given.
10859if test "${with_boot_jdk+set}" = set; then :
10860  withval=$with_boot_jdk;
10861fi
10862
10863
10864# We look for the Boot JDK through various means, going from more certain to
10865# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10866# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10867# must check if this is indeed valid; otherwise we'll continue looking.
10868
10869# Test: Is bootjdk explicitely set by command line arguments?
10870
10871  if test "x$BOOT_JDK_FOUND" = xno; then
10872    # Now execute the test
10873
10874if test "x$with_boot_jdk" != x; then
10875    BOOT_JDK=$with_boot_jdk
10876    BOOT_JDK_FOUND=maybe
10877    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10878$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10879fi
10880
10881
10882    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10883    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10884      # Do we have a bin/java?
10885      if test ! -x "$BOOT_JDK/bin/java"; then
10886        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10888        BOOT_JDK_FOUND=no
10889      else
10890        # Do we have a bin/javac?
10891        if test ! -x "$BOOT_JDK/bin/javac"; then
10892          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10894          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10895$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10896          BOOT_JDK_FOUND=no
10897        else
10898          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10899          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10900            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10902            BOOT_JDK_FOUND=no
10903          else
10904            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10906
10907            # Extra M4 quote needed to protect [] in grep expression.
10908            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10909            if test "x$FOUND_VERSION_78" = x; then
10910              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10912              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10913$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10914              BOOT_JDK_FOUND=no
10915            else
10916              # We're done! :-)
10917              BOOT_JDK_FOUND=yes
10918
10919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10920
10921  # Input might be given as Windows format, start by converting to
10922  # unix format.
10923  path="$BOOT_JDK"
10924  new_path=`$CYGPATH -u "$path"`
10925
10926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10929  # "foo.exe" is OK but "foo" is an error.
10930  #
10931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10932  # It is also a way to make sure we got the proper file name for the real test later on.
10933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10934  if test "x$test_shortpath" = x; then
10935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10936$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10937    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10938  fi
10939
10940  # Call helper function which possibly converts this using DOS-style short mode.
10941  # If so, the updated path is stored in $new_path.
10942
10943  input_path="$new_path"
10944  # Check if we need to convert this using DOS-style short mode. If the path
10945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10946  # take no chances and rewrite it.
10947  # Note: m4 eats our [], so we need to use [ and ] instead.
10948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10949  if test "x$has_forbidden_chars" != x; then
10950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10954      # Going to short mode and back again did indeed matter. Since short mode is
10955      # case insensitive, let's make it lowercase to improve readability.
10956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10957      # Now convert it back to Unix-stile (cygpath)
10958      input_path=`$CYGPATH -u "$shortmode_path"`
10959      new_path="$input_path"
10960    fi
10961  fi
10962
10963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10964  if test "x$test_cygdrive_prefix" = x; then
10965    # As a simple fix, exclude /usr/bin since it's not a real path.
10966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10968      # a path prefixed by /cygdrive for fixpath to work.
10969      new_path="$CYGWIN_ROOT_PATH$input_path"
10970    fi
10971  fi
10972
10973
10974  if test "x$path" != "x$new_path"; then
10975    BOOT_JDK="$new_path"
10976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10978  fi
10979
10980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10981
10982  path="$BOOT_JDK"
10983  has_colon=`$ECHO $path | $GREP ^.:`
10984  new_path="$path"
10985  if test "x$has_colon" = x; then
10986    # Not in mixed or Windows style, start by that.
10987    new_path=`cmd //c echo $path`
10988  fi
10989
10990
10991  input_path="$new_path"
10992  # Check if we need to convert this using DOS-style short mode. If the path
10993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10994  # take no chances and rewrite it.
10995  # Note: m4 eats our [], so we need to use [ and ] instead.
10996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10997  if test "x$has_forbidden_chars" != x; then
10998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11000  fi
11001
11002
11003  windows_path="$new_path"
11004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11005    unix_path=`$CYGPATH -u "$windows_path"`
11006    new_path="$unix_path"
11007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11009    new_path="$unix_path"
11010  fi
11011
11012  if test "x$path" != "x$new_path"; then
11013    BOOT_JDK="$new_path"
11014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11015$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11016  fi
11017
11018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11020
11021  else
11022    # We're on a posix platform. Hooray! :)
11023    path="$BOOT_JDK"
11024
11025    if test ! -f "$path" && test ! -d "$path"; then
11026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11027    fi
11028
11029    has_space=`$ECHO "$path" | $GREP " "`
11030    if test "x$has_space" != x; then
11031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11033      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11034    fi
11035  fi
11036
11037              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11038$as_echo_n "checking for Boot JDK... " >&6; }
11039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11040$as_echo "$BOOT_JDK" >&6; }
11041              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11042$as_echo_n "checking Boot JDK version... " >&6; }
11043              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11045$as_echo "$BOOT_JDK_VERSION" >&6; }
11046            fi # end check jdk version
11047          fi # end check rt.jar
11048        fi # end check javac
11049      fi # end check java
11050    fi # end check boot jdk found
11051  fi
11052
11053if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11054  # Having specified an argument which is incorrect will produce an instant failure;
11055  # we should not go on looking
11056  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11057fi
11058
11059# Test: Is bootjdk available from builddeps?
11060
11061  if test "x$BOOT_JDK_FOUND" = xno; then
11062    # Now execute the test
11063
11064
11065
11066    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11067        # Source the builddeps file again, to make sure it uses the latest variables!
11068        . $builddepsfile
11069        # Look for a target and build machine specific resource!
11070        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11071        if test "x$resource" = x; then
11072            # Ok, lets instead look for a target specific resource
11073            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11074        fi
11075        if test "x$resource" = x; then
11076            # Ok, lets instead look for a build specific resource
11077            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11078        fi
11079        if test "x$resource" = x; then
11080            # Ok, lets instead look for a generic resource
11081            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11082            resource=${builddep_bootjdk}
11083        fi
11084        if test "x$resource" != x; then
11085            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11086$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11087	    # If the resource in the builddeps.conf file is an existing directory,
11088	    # for example /java/linux/cups
11089	    if test -d ${resource}; then
11090	       depdir=${resource}
11091	    else
11092
11093# bootjdk is for example mymodule
11094# $resource is for example libs/general/libmymod_1_2_3.zip
11095# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11096# $with_builddeps_dir is for example /localhome/builddeps
11097# depdir is the name of the variable into which we store the depdir, eg MYMOD
11098# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11099# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11100    filename=`basename $resource`
11101    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11102    filebase=${filename%%.*}
11103    extension=${filename#*.}
11104    installdir=$with_builddeps_dir/$filebase
11105    if test ! -f $installdir/$filename.unpacked; then
11106        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11107$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11108        if test ! -d $installdir; then
11109            mkdir -p $installdir
11110        fi
11111        if test ! -d $installdir; then
11112            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11113        fi
11114        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11115        touch $tmpfile
11116        if test ! -f $tmpfile; then
11117            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11118        fi
11119
11120    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11121    # $tmpfile is the local file name for the downloaded file.
11122    VALID_TOOL=no
11123    if test "x$BDEPS_FTP" = xwget; then
11124       VALID_TOOL=yes
11125       wget -O $tmpfile $with_builddeps_server/$resource
11126    fi
11127    if test "x$BDEPS_FTP" = xlftp; then
11128       VALID_TOOL=yes
11129       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11130    fi
11131    if test "x$BDEPS_FTP" = xftp; then
11132        VALID_TOOL=yes
11133        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11134        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11135        FTPUSERPWD=${FTPSERVER%%@*}
11136        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11137            FTPUSER=${userpwd%%:*}
11138            FTPPWD=${userpwd#*@}
11139            FTPSERVER=${FTPSERVER#*@}
11140        else
11141            FTPUSER=ftp
11142            FTPPWD=ftp
11143        fi
11144        # the "pass" command does not work on some
11145        # ftp clients (read ftp.exe) but if it works,
11146        # passive mode is better!
11147        (\
11148            echo "user $FTPUSER $FTPPWD"        ;\
11149            echo "pass"                         ;\
11150            echo "bin"                          ;\
11151            echo "get $FTPPATH $tmpfile"              ;\
11152        ) | ftp -in $FTPSERVER
11153    fi
11154    if test "x$VALID_TOOL" != xyes; then
11155       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11156    fi
11157
11158        mv $tmpfile $installdir/$filename
11159        if test ! -s $installdir/$filename; then
11160            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11161        fi
11162        case "$extension" in
11163            zip)  echo "Unzipping $installdir/$filename..."
11164               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11165            ;;
11166            tar.gz) echo "Untaring $installdir/$filename..."
11167               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11168            ;;
11169            tgz) echo "Untaring $installdir/$filename..."
11170               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11171            ;;
11172            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11173            ;;
11174        esac
11175    fi
11176    if test -f $installdir/$filename.unpacked; then
11177        depdir=$installdir
11178    fi
11179
11180	    fi
11181            # Source the builddeps file again, because in the previous command, the depdir
11182            # was updated to point at the current build dependency install directory.
11183            . $builddepsfile
11184            # Now extract variables from the builddeps.conf files.
11185            theroot=${builddep_bootjdk_ROOT}
11186            thecflags=${builddep_bootjdk_CFLAGS}
11187            thelibs=${builddep_bootjdk_LIBS}
11188            if test "x$depdir" = x; then
11189                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11190            fi
11191            BOOT_JDK=$depdir
11192            if test "x$theroot" != x; then
11193               BOOT_JDK="$theroot"
11194            fi
11195            if test "x$thecflags" != x; then
11196               BOOT_JDK_CFLAGS="$thecflags"
11197            fi
11198            if test "x$thelibs" != x; then
11199               BOOT_JDK_LIBS="$thelibs"
11200            fi
11201            BOOT_JDK_FOUND=maybe
11202            else BOOT_JDK_FOUND=no
11203
11204        fi
11205        else BOOT_JDK_FOUND=no
11206
11207    fi
11208
11209
11210
11211    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11212    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11213      # Do we have a bin/java?
11214      if test ! -x "$BOOT_JDK/bin/java"; then
11215        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11217        BOOT_JDK_FOUND=no
11218      else
11219        # Do we have a bin/javac?
11220        if test ! -x "$BOOT_JDK/bin/javac"; then
11221          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11223          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11224$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11225          BOOT_JDK_FOUND=no
11226        else
11227          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11228          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11231            BOOT_JDK_FOUND=no
11232          else
11233            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11235
11236            # Extra M4 quote needed to protect [] in grep expression.
11237            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11238            if test "x$FOUND_VERSION_78" = x; then
11239              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11241              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11242$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11243              BOOT_JDK_FOUND=no
11244            else
11245              # We're done! :-)
11246              BOOT_JDK_FOUND=yes
11247
11248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11249
11250  # Input might be given as Windows format, start by converting to
11251  # unix format.
11252  path="$BOOT_JDK"
11253  new_path=`$CYGPATH -u "$path"`
11254
11255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11258  # "foo.exe" is OK but "foo" is an error.
11259  #
11260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11261  # It is also a way to make sure we got the proper file name for the real test later on.
11262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11263  if test "x$test_shortpath" = x; then
11264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11267  fi
11268
11269  # Call helper function which possibly converts this using DOS-style short mode.
11270  # If so, the updated path is stored in $new_path.
11271
11272  input_path="$new_path"
11273  # Check if we need to convert this using DOS-style short mode. If the path
11274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11275  # take no chances and rewrite it.
11276  # Note: m4 eats our [], so we need to use [ and ] instead.
11277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11278  if test "x$has_forbidden_chars" != x; then
11279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11283      # Going to short mode and back again did indeed matter. Since short mode is
11284      # case insensitive, let's make it lowercase to improve readability.
11285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11286      # Now convert it back to Unix-stile (cygpath)
11287      input_path=`$CYGPATH -u "$shortmode_path"`
11288      new_path="$input_path"
11289    fi
11290  fi
11291
11292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11293  if test "x$test_cygdrive_prefix" = x; then
11294    # As a simple fix, exclude /usr/bin since it's not a real path.
11295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11297      # a path prefixed by /cygdrive for fixpath to work.
11298      new_path="$CYGWIN_ROOT_PATH$input_path"
11299    fi
11300  fi
11301
11302
11303  if test "x$path" != "x$new_path"; then
11304    BOOT_JDK="$new_path"
11305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11307  fi
11308
11309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11310
11311  path="$BOOT_JDK"
11312  has_colon=`$ECHO $path | $GREP ^.:`
11313  new_path="$path"
11314  if test "x$has_colon" = x; then
11315    # Not in mixed or Windows style, start by that.
11316    new_path=`cmd //c echo $path`
11317  fi
11318
11319
11320  input_path="$new_path"
11321  # Check if we need to convert this using DOS-style short mode. If the path
11322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11323  # take no chances and rewrite it.
11324  # Note: m4 eats our [], so we need to use [ and ] instead.
11325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11326  if test "x$has_forbidden_chars" != x; then
11327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11329  fi
11330
11331
11332  windows_path="$new_path"
11333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11334    unix_path=`$CYGPATH -u "$windows_path"`
11335    new_path="$unix_path"
11336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11338    new_path="$unix_path"
11339  fi
11340
11341  if test "x$path" != "x$new_path"; then
11342    BOOT_JDK="$new_path"
11343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11345  fi
11346
11347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11349
11350  else
11351    # We're on a posix platform. Hooray! :)
11352    path="$BOOT_JDK"
11353
11354    if test ! -f "$path" && test ! -d "$path"; then
11355      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11356    fi
11357
11358    has_space=`$ECHO "$path" | $GREP " "`
11359    if test "x$has_space" != x; then
11360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11361$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11362      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11363    fi
11364  fi
11365
11366              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11367$as_echo_n "checking for Boot JDK... " >&6; }
11368              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11369$as_echo "$BOOT_JDK" >&6; }
11370              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11371$as_echo_n "checking Boot JDK version... " >&6; }
11372              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11374$as_echo "$BOOT_JDK_VERSION" >&6; }
11375            fi # end check jdk version
11376          fi # end check rt.jar
11377        fi # end check javac
11378      fi # end check java
11379    fi # end check boot jdk found
11380  fi
11381
11382
11383# Test: Is $JAVA_HOME set?
11384
11385  if test "x$BOOT_JDK_FOUND" = xno; then
11386    # Now execute the test
11387
11388    if test "x$JAVA_HOME" != x; then
11389        JAVA_HOME_PROCESSED="$JAVA_HOME"
11390
11391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11392
11393  # Input might be given as Windows format, start by converting to
11394  # unix format.
11395  path="$JAVA_HOME_PROCESSED"
11396  new_path=`$CYGPATH -u "$path"`
11397
11398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11401  # "foo.exe" is OK but "foo" is an error.
11402  #
11403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11404  # It is also a way to make sure we got the proper file name for the real test later on.
11405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11406  if test "x$test_shortpath" = x; then
11407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11408$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11409    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11410  fi
11411
11412  # Call helper function which possibly converts this using DOS-style short mode.
11413  # If so, the updated path is stored in $new_path.
11414
11415  input_path="$new_path"
11416  # Check if we need to convert this using DOS-style short mode. If the path
11417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11418  # take no chances and rewrite it.
11419  # Note: m4 eats our [], so we need to use [ and ] instead.
11420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11421  if test "x$has_forbidden_chars" != x; then
11422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11426      # Going to short mode and back again did indeed matter. Since short mode is
11427      # case insensitive, let's make it lowercase to improve readability.
11428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11429      # Now convert it back to Unix-stile (cygpath)
11430      input_path=`$CYGPATH -u "$shortmode_path"`
11431      new_path="$input_path"
11432    fi
11433  fi
11434
11435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11436  if test "x$test_cygdrive_prefix" = x; then
11437    # As a simple fix, exclude /usr/bin since it's not a real path.
11438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11440      # a path prefixed by /cygdrive for fixpath to work.
11441      new_path="$CYGWIN_ROOT_PATH$input_path"
11442    fi
11443  fi
11444
11445
11446  if test "x$path" != "x$new_path"; then
11447    JAVA_HOME_PROCESSED="$new_path"
11448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11449$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11450  fi
11451
11452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11453
11454  path="$JAVA_HOME_PROCESSED"
11455  has_colon=`$ECHO $path | $GREP ^.:`
11456  new_path="$path"
11457  if test "x$has_colon" = x; then
11458    # Not in mixed or Windows style, start by that.
11459    new_path=`cmd //c echo $path`
11460  fi
11461
11462
11463  input_path="$new_path"
11464  # Check if we need to convert this using DOS-style short mode. If the path
11465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11466  # take no chances and rewrite it.
11467  # Note: m4 eats our [], so we need to use [ and ] instead.
11468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11469  if test "x$has_forbidden_chars" != x; then
11470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11472  fi
11473
11474
11475  windows_path="$new_path"
11476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11477    unix_path=`$CYGPATH -u "$windows_path"`
11478    new_path="$unix_path"
11479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11481    new_path="$unix_path"
11482  fi
11483
11484  if test "x$path" != "x$new_path"; then
11485    JAVA_HOME_PROCESSED="$new_path"
11486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11487$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11488  fi
11489
11490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11492
11493  else
11494    # We're on a posix platform. Hooray! :)
11495    path="$JAVA_HOME_PROCESSED"
11496
11497    if test ! -f "$path" && test ! -d "$path"; then
11498      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11499    fi
11500
11501    has_space=`$ECHO "$path" | $GREP " "`
11502    if test "x$has_space" != x; then
11503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11504$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11505      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11506    fi
11507  fi
11508
11509        if test ! -d "$JAVA_HOME_PROCESSED"; then
11510            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11511$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11512        else
11513          # Aha, the user has set a JAVA_HOME
11514          # let us use that as the Boot JDK.
11515          BOOT_JDK="$JAVA_HOME_PROCESSED"
11516          BOOT_JDK_FOUND=maybe
11517          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11518$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11519        fi
11520    fi
11521
11522
11523    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11524    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11525      # Do we have a bin/java?
11526      if test ! -x "$BOOT_JDK/bin/java"; then
11527        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11529        BOOT_JDK_FOUND=no
11530      else
11531        # Do we have a bin/javac?
11532        if test ! -x "$BOOT_JDK/bin/javac"; then
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11534$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11535          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11536$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11537          BOOT_JDK_FOUND=no
11538        else
11539          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11540          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11541            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11543            BOOT_JDK_FOUND=no
11544          else
11545            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11546            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11547
11548            # Extra M4 quote needed to protect [] in grep expression.
11549            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11550            if test "x$FOUND_VERSION_78" = x; then
11551              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11553              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11554$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11555              BOOT_JDK_FOUND=no
11556            else
11557              # We're done! :-)
11558              BOOT_JDK_FOUND=yes
11559
11560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11561
11562  # Input might be given as Windows format, start by converting to
11563  # unix format.
11564  path="$BOOT_JDK"
11565  new_path=`$CYGPATH -u "$path"`
11566
11567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11570  # "foo.exe" is OK but "foo" is an error.
11571  #
11572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11573  # It is also a way to make sure we got the proper file name for the real test later on.
11574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11575  if test "x$test_shortpath" = x; then
11576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11578    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11579  fi
11580
11581  # Call helper function which possibly converts this using DOS-style short mode.
11582  # If so, the updated path is stored in $new_path.
11583
11584  input_path="$new_path"
11585  # Check if we need to convert this using DOS-style short mode. If the path
11586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11587  # take no chances and rewrite it.
11588  # Note: m4 eats our [], so we need to use [ and ] instead.
11589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11590  if test "x$has_forbidden_chars" != x; then
11591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11595      # Going to short mode and back again did indeed matter. Since short mode is
11596      # case insensitive, let's make it lowercase to improve readability.
11597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11598      # Now convert it back to Unix-stile (cygpath)
11599      input_path=`$CYGPATH -u "$shortmode_path"`
11600      new_path="$input_path"
11601    fi
11602  fi
11603
11604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11605  if test "x$test_cygdrive_prefix" = x; then
11606    # As a simple fix, exclude /usr/bin since it's not a real path.
11607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11609      # a path prefixed by /cygdrive for fixpath to work.
11610      new_path="$CYGWIN_ROOT_PATH$input_path"
11611    fi
11612  fi
11613
11614
11615  if test "x$path" != "x$new_path"; then
11616    BOOT_JDK="$new_path"
11617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11618$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11619  fi
11620
11621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11622
11623  path="$BOOT_JDK"
11624  has_colon=`$ECHO $path | $GREP ^.:`
11625  new_path="$path"
11626  if test "x$has_colon" = x; then
11627    # Not in mixed or Windows style, start by that.
11628    new_path=`cmd //c echo $path`
11629  fi
11630
11631
11632  input_path="$new_path"
11633  # Check if we need to convert this using DOS-style short mode. If the path
11634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11635  # take no chances and rewrite it.
11636  # Note: m4 eats our [], so we need to use [ and ] instead.
11637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11638  if test "x$has_forbidden_chars" != x; then
11639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11641  fi
11642
11643
11644  windows_path="$new_path"
11645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11646    unix_path=`$CYGPATH -u "$windows_path"`
11647    new_path="$unix_path"
11648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11650    new_path="$unix_path"
11651  fi
11652
11653  if test "x$path" != "x$new_path"; then
11654    BOOT_JDK="$new_path"
11655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11656$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11657  fi
11658
11659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11661
11662  else
11663    # We're on a posix platform. Hooray! :)
11664    path="$BOOT_JDK"
11665
11666    if test ! -f "$path" && test ! -d "$path"; then
11667      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11668    fi
11669
11670    has_space=`$ECHO "$path" | $GREP " "`
11671    if test "x$has_space" != x; then
11672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11673$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11674      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11675    fi
11676  fi
11677
11678              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11679$as_echo_n "checking for Boot JDK... " >&6; }
11680              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11681$as_echo "$BOOT_JDK" >&6; }
11682              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11683$as_echo_n "checking Boot JDK version... " >&6; }
11684              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11686$as_echo "$BOOT_JDK_VERSION" >&6; }
11687            fi # end check jdk version
11688          fi # end check rt.jar
11689        fi # end check javac
11690      fi # end check java
11691    fi # end check boot jdk found
11692  fi
11693
11694
11695# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11696
11697  if test "x$BOOT_JDK_FOUND" = xno; then
11698    # Now execute the test
11699
11700    if test -x /usr/libexec/java_home; then
11701        BOOT_JDK=`/usr/libexec/java_home`
11702        BOOT_JDK_FOUND=maybe
11703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11704$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11705    fi
11706
11707
11708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11710      # Do we have a bin/java?
11711      if test ! -x "$BOOT_JDK/bin/java"; then
11712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11714        BOOT_JDK_FOUND=no
11715      else
11716        # Do we have a bin/javac?
11717        if test ! -x "$BOOT_JDK/bin/javac"; then
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11722          BOOT_JDK_FOUND=no
11723        else
11724          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11725          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11728            BOOT_JDK_FOUND=no
11729          else
11730            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11731            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11732
11733            # Extra M4 quote needed to protect [] in grep expression.
11734            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11735            if test "x$FOUND_VERSION_78" = x; then
11736              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11738              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11739$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11740              BOOT_JDK_FOUND=no
11741            else
11742              # We're done! :-)
11743              BOOT_JDK_FOUND=yes
11744
11745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11746
11747  # Input might be given as Windows format, start by converting to
11748  # unix format.
11749  path="$BOOT_JDK"
11750  new_path=`$CYGPATH -u "$path"`
11751
11752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11755  # "foo.exe" is OK but "foo" is an error.
11756  #
11757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11758  # It is also a way to make sure we got the proper file name for the real test later on.
11759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11760  if test "x$test_shortpath" = x; then
11761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11764  fi
11765
11766  # Call helper function which possibly converts this using DOS-style short mode.
11767  # If so, the updated path is stored in $new_path.
11768
11769  input_path="$new_path"
11770  # Check if we need to convert this using DOS-style short mode. If the path
11771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11772  # take no chances and rewrite it.
11773  # Note: m4 eats our [], so we need to use [ and ] instead.
11774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11775  if test "x$has_forbidden_chars" != x; then
11776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11780      # Going to short mode and back again did indeed matter. Since short mode is
11781      # case insensitive, let's make it lowercase to improve readability.
11782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11783      # Now convert it back to Unix-stile (cygpath)
11784      input_path=`$CYGPATH -u "$shortmode_path"`
11785      new_path="$input_path"
11786    fi
11787  fi
11788
11789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11790  if test "x$test_cygdrive_prefix" = x; then
11791    # As a simple fix, exclude /usr/bin since it's not a real path.
11792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11794      # a path prefixed by /cygdrive for fixpath to work.
11795      new_path="$CYGWIN_ROOT_PATH$input_path"
11796    fi
11797  fi
11798
11799
11800  if test "x$path" != "x$new_path"; then
11801    BOOT_JDK="$new_path"
11802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11804  fi
11805
11806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11807
11808  path="$BOOT_JDK"
11809  has_colon=`$ECHO $path | $GREP ^.:`
11810  new_path="$path"
11811  if test "x$has_colon" = x; then
11812    # Not in mixed or Windows style, start by that.
11813    new_path=`cmd //c echo $path`
11814  fi
11815
11816
11817  input_path="$new_path"
11818  # Check if we need to convert this using DOS-style short mode. If the path
11819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11820  # take no chances and rewrite it.
11821  # Note: m4 eats our [], so we need to use [ and ] instead.
11822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11823  if test "x$has_forbidden_chars" != x; then
11824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11826  fi
11827
11828
11829  windows_path="$new_path"
11830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11831    unix_path=`$CYGPATH -u "$windows_path"`
11832    new_path="$unix_path"
11833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11835    new_path="$unix_path"
11836  fi
11837
11838  if test "x$path" != "x$new_path"; then
11839    BOOT_JDK="$new_path"
11840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11842  fi
11843
11844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11846
11847  else
11848    # We're on a posix platform. Hooray! :)
11849    path="$BOOT_JDK"
11850
11851    if test ! -f "$path" && test ! -d "$path"; then
11852      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11853    fi
11854
11855    has_space=`$ECHO "$path" | $GREP " "`
11856    if test "x$has_space" != x; then
11857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11859      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11860    fi
11861  fi
11862
11863              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11864$as_echo_n "checking for Boot JDK... " >&6; }
11865              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11866$as_echo "$BOOT_JDK" >&6; }
11867              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11868$as_echo_n "checking Boot JDK version... " >&6; }
11869              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11870              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11871$as_echo "$BOOT_JDK_VERSION" >&6; }
11872            fi # end check jdk version
11873          fi # end check rt.jar
11874        fi # end check javac
11875      fi # end check java
11876    fi # end check boot jdk found
11877  fi
11878
11879
11880# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11881
11882  if test "x$BOOT_JDK_FOUND" = xno; then
11883    # Now execute the test
11884
11885    # Extract the first word of "javac", so it can be a program name with args.
11886set dummy javac; ac_word=$2
11887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11888$as_echo_n "checking for $ac_word... " >&6; }
11889if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  case $JAVAC_CHECK in
11893  [\\/]* | ?:[\\/]*)
11894  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11895  ;;
11896  *)
11897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11898for as_dir in $PATH
11899do
11900  IFS=$as_save_IFS
11901  test -z "$as_dir" && as_dir=.
11902    for ac_exec_ext in '' $ac_executable_extensions; do
11903  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11904    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11906    break 2
11907  fi
11908done
11909  done
11910IFS=$as_save_IFS
11911
11912  ;;
11913esac
11914fi
11915JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11916if test -n "$JAVAC_CHECK"; then
11917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11918$as_echo "$JAVAC_CHECK" >&6; }
11919else
11920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11921$as_echo "no" >&6; }
11922fi
11923
11924
11925    # Extract the first word of "java", so it can be a program name with args.
11926set dummy java; ac_word=$2
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11928$as_echo_n "checking for $ac_word... " >&6; }
11929if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11930  $as_echo_n "(cached) " >&6
11931else
11932  case $JAVA_CHECK in
11933  [\\/]* | ?:[\\/]*)
11934  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11935  ;;
11936  *)
11937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11938for as_dir in $PATH
11939do
11940  IFS=$as_save_IFS
11941  test -z "$as_dir" && as_dir=.
11942    for ac_exec_ext in '' $ac_executable_extensions; do
11943  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11944    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11946    break 2
11947  fi
11948done
11949  done
11950IFS=$as_save_IFS
11951
11952  ;;
11953esac
11954fi
11955JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11956if test -n "$JAVA_CHECK"; then
11957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11958$as_echo "$JAVA_CHECK" >&6; }
11959else
11960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11961$as_echo "no" >&6; }
11962fi
11963
11964
11965    BINARY="$JAVAC_CHECK"
11966    if test "x$JAVAC_CHECK" = x; then
11967        BINARY="$JAVA_CHECK"
11968    fi
11969    if test "x$BINARY" != x; then
11970        # So there is a java(c) binary, it might be part of a JDK.
11971        # Lets find the JDK/JRE directory by following symbolic links.
11972        # Linux/GNU systems often have links from /usr/bin/java to
11973        # /etc/alternatives/java to the real JDK binary.
11974
11975    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11976        # Follow a chain of symbolic links. Use readlink
11977        # where it exists, else fall back to horribly
11978        # complicated shell code.
11979        if test "x$READLINK_TESTED" != yes; then
11980            # On MacOSX there is a readlink tool with a different
11981            # purpose than the GNU readlink tool. Check the found readlink.
11982            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11983            if test "x$ISGNU" = x; then
11984                 # A readlink that we do not know how to use.
11985                 # Are there other non-GNU readlinks out there?
11986                 READLINK_TESTED=yes
11987                 READLINK=
11988            fi
11989        fi
11990
11991        if test "x$READLINK" != x; then
11992            BINARY=`$READLINK -f $BINARY`
11993        else
11994            # Save the current directory for restoring afterwards
11995            STARTDIR=$PWD
11996            COUNTER=0
11997            sym_link_dir=`$DIRNAME $BINARY`
11998            sym_link_file=`$BASENAME $BINARY`
11999            # Use the system pwd and not the shell builtin to resolve directory symlinks
12000            cd $sym_link_dir
12001            cd `$THEPWDCMD`
12002            sym_link_dir=`$THEPWDCMD`
12003            # Resolve file symlinks
12004            while test $COUNTER -lt 20; do
12005                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12006                if test "x$ISLINK" == x; then
12007                    # This is not a symbolic link! We are done!
12008                    break
12009                fi
12010                # Again resolve directory symlinks since the target of the just found
12011                # link could be in a different directory
12012                cd `$DIRNAME $ISLINK`
12013                sym_link_dir=`$THEPWDCMD`
12014                sym_link_file=`$BASENAME $ISLINK`
12015                let COUNTER=COUNTER+1
12016            done
12017            cd $STARTDIR
12018            BINARY=$sym_link_dir/$sym_link_file
12019        fi
12020    fi
12021
12022        BOOT_JDK=`dirname "$BINARY"`
12023        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12024        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12025            # Looks like we found ourselves an JDK
12026            BOOT_JDK_FOUND=maybe
12027            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12028$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12029        fi
12030    fi
12031
12032
12033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12035      # Do we have a bin/java?
12036      if test ! -x "$BOOT_JDK/bin/java"; then
12037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12039        BOOT_JDK_FOUND=no
12040      else
12041        # Do we have a bin/javac?
12042        if test ! -x "$BOOT_JDK/bin/javac"; then
12043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12047          BOOT_JDK_FOUND=no
12048        else
12049          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12050          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12051            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12053            BOOT_JDK_FOUND=no
12054          else
12055            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12056            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12057
12058            # Extra M4 quote needed to protect [] in grep expression.
12059            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12060            if test "x$FOUND_VERSION_78" = x; then
12061              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12063              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12064$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12065              BOOT_JDK_FOUND=no
12066            else
12067              # We're done! :-)
12068              BOOT_JDK_FOUND=yes
12069
12070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12071
12072  # Input might be given as Windows format, start by converting to
12073  # unix format.
12074  path="$BOOT_JDK"
12075  new_path=`$CYGPATH -u "$path"`
12076
12077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12080  # "foo.exe" is OK but "foo" is an error.
12081  #
12082  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12083  # It is also a way to make sure we got the proper file name for the real test later on.
12084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12085  if test "x$test_shortpath" = x; then
12086    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12087$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12088    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12089  fi
12090
12091  # Call helper function which possibly converts this using DOS-style short mode.
12092  # If so, the updated path is stored in $new_path.
12093
12094  input_path="$new_path"
12095  # Check if we need to convert this using DOS-style short mode. If the path
12096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12097  # take no chances and rewrite it.
12098  # Note: m4 eats our [], so we need to use [ and ] instead.
12099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12100  if test "x$has_forbidden_chars" != x; then
12101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12102    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12103    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12104    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12105      # Going to short mode and back again did indeed matter. Since short mode is
12106      # case insensitive, let's make it lowercase to improve readability.
12107      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12108      # Now convert it back to Unix-stile (cygpath)
12109      input_path=`$CYGPATH -u "$shortmode_path"`
12110      new_path="$input_path"
12111    fi
12112  fi
12113
12114  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12115  if test "x$test_cygdrive_prefix" = x; then
12116    # As a simple fix, exclude /usr/bin since it's not a real path.
12117    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12118      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12119      # a path prefixed by /cygdrive for fixpath to work.
12120      new_path="$CYGWIN_ROOT_PATH$input_path"
12121    fi
12122  fi
12123
12124
12125  if test "x$path" != "x$new_path"; then
12126    BOOT_JDK="$new_path"
12127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12129  fi
12130
12131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12132
12133  path="$BOOT_JDK"
12134  has_colon=`$ECHO $path | $GREP ^.:`
12135  new_path="$path"
12136  if test "x$has_colon" = x; then
12137    # Not in mixed or Windows style, start by that.
12138    new_path=`cmd //c echo $path`
12139  fi
12140
12141
12142  input_path="$new_path"
12143  # Check if we need to convert this using DOS-style short mode. If the path
12144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12145  # take no chances and rewrite it.
12146  # Note: m4 eats our [], so we need to use [ and ] instead.
12147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12148  if test "x$has_forbidden_chars" != x; then
12149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12150    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12151  fi
12152
12153
12154  windows_path="$new_path"
12155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12156    unix_path=`$CYGPATH -u "$windows_path"`
12157    new_path="$unix_path"
12158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12160    new_path="$unix_path"
12161  fi
12162
12163  if test "x$path" != "x$new_path"; then
12164    BOOT_JDK="$new_path"
12165    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12166$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12167  fi
12168
12169  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12170  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12171
12172  else
12173    # We're on a posix platform. Hooray! :)
12174    path="$BOOT_JDK"
12175
12176    if test ! -f "$path" && test ! -d "$path"; then
12177      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12178    fi
12179
12180    has_space=`$ECHO "$path" | $GREP " "`
12181    if test "x$has_space" != x; then
12182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12184      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12185    fi
12186  fi
12187
12188              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12189$as_echo_n "checking for Boot JDK... " >&6; }
12190              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12191$as_echo "$BOOT_JDK" >&6; }
12192              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12193$as_echo_n "checking Boot JDK version... " >&6; }
12194              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12196$as_echo "$BOOT_JDK_VERSION" >&6; }
12197            fi # end check jdk version
12198          fi # end check rt.jar
12199        fi # end check javac
12200      fi # end check java
12201    fi # end check boot jdk found
12202  fi
12203
12204
12205# Test: Is there a JDK installed in default, well-known locations?
12206
12207  if test "x$BOOT_JDK_FOUND" = xno; then
12208    # Now execute the test
12209
12210  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12211
12212  if test "x$BOOT_JDK_FOUND" = xno; then
12213    # Now execute the test
12214
12215  if test "x$ProgramW6432" != x; then
12216    VIRTUAL_DIR="$ProgramW6432/Java"
12217
12218  windows_path="$VIRTUAL_DIR"
12219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12220    unix_path=`$CYGPATH -u "$windows_path"`
12221    VIRTUAL_DIR="$unix_path"
12222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12224    VIRTUAL_DIR="$unix_path"
12225  fi
12226
12227
12228  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12229  BOOT_JDK_SUFFIX=""
12230  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12231  if test "x$ALL_JDKS_FOUND" != x; then
12232    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12233
12234  if test "x$BOOT_JDK_FOUND" = xno; then
12235    # Now execute the test
12236
12237        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12238        if test -d "$BOOT_JDK"; then
12239          BOOT_JDK_FOUND=maybe
12240          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12241$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12242        fi
12243
12244
12245    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12246    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12247      # Do we have a bin/java?
12248      if test ! -x "$BOOT_JDK/bin/java"; then
12249        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12251        BOOT_JDK_FOUND=no
12252      else
12253        # Do we have a bin/javac?
12254        if test ! -x "$BOOT_JDK/bin/javac"; then
12255          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12257          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12258$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12259          BOOT_JDK_FOUND=no
12260        else
12261          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12262          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12263            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12265            BOOT_JDK_FOUND=no
12266          else
12267            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12268            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12269
12270            # Extra M4 quote needed to protect [] in grep expression.
12271            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12272            if test "x$FOUND_VERSION_78" = x; then
12273              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12275              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12276$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12277              BOOT_JDK_FOUND=no
12278            else
12279              # We're done! :-)
12280              BOOT_JDK_FOUND=yes
12281
12282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12283
12284  # Input might be given as Windows format, start by converting to
12285  # unix format.
12286  path="$BOOT_JDK"
12287  new_path=`$CYGPATH -u "$path"`
12288
12289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12292  # "foo.exe" is OK but "foo" is an error.
12293  #
12294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12295  # It is also a way to make sure we got the proper file name for the real test later on.
12296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12297  if test "x$test_shortpath" = x; then
12298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12299$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12300    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12301  fi
12302
12303  # Call helper function which possibly converts this using DOS-style short mode.
12304  # If so, the updated path is stored in $new_path.
12305
12306  input_path="$new_path"
12307  # Check if we need to convert this using DOS-style short mode. If the path
12308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12309  # take no chances and rewrite it.
12310  # Note: m4 eats our [], so we need to use [ and ] instead.
12311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12312  if test "x$has_forbidden_chars" != x; then
12313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12317      # Going to short mode and back again did indeed matter. Since short mode is
12318      # case insensitive, let's make it lowercase to improve readability.
12319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12320      # Now convert it back to Unix-stile (cygpath)
12321      input_path=`$CYGPATH -u "$shortmode_path"`
12322      new_path="$input_path"
12323    fi
12324  fi
12325
12326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12327  if test "x$test_cygdrive_prefix" = x; then
12328    # As a simple fix, exclude /usr/bin since it's not a real path.
12329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12331      # a path prefixed by /cygdrive for fixpath to work.
12332      new_path="$CYGWIN_ROOT_PATH$input_path"
12333    fi
12334  fi
12335
12336
12337  if test "x$path" != "x$new_path"; then
12338    BOOT_JDK="$new_path"
12339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12340$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12341  fi
12342
12343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12344
12345  path="$BOOT_JDK"
12346  has_colon=`$ECHO $path | $GREP ^.:`
12347  new_path="$path"
12348  if test "x$has_colon" = x; then
12349    # Not in mixed or Windows style, start by that.
12350    new_path=`cmd //c echo $path`
12351  fi
12352
12353
12354  input_path="$new_path"
12355  # Check if we need to convert this using DOS-style short mode. If the path
12356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12357  # take no chances and rewrite it.
12358  # Note: m4 eats our [], so we need to use [ and ] instead.
12359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12360  if test "x$has_forbidden_chars" != x; then
12361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12363  fi
12364
12365
12366  windows_path="$new_path"
12367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12368    unix_path=`$CYGPATH -u "$windows_path"`
12369    new_path="$unix_path"
12370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12372    new_path="$unix_path"
12373  fi
12374
12375  if test "x$path" != "x$new_path"; then
12376    BOOT_JDK="$new_path"
12377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12379  fi
12380
12381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12383
12384  else
12385    # We're on a posix platform. Hooray! :)
12386    path="$BOOT_JDK"
12387
12388    if test ! -f "$path" && test ! -d "$path"; then
12389      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12390    fi
12391
12392    has_space=`$ECHO "$path" | $GREP " "`
12393    if test "x$has_space" != x; then
12394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12395$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12396      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12397    fi
12398  fi
12399
12400              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12401$as_echo_n "checking for Boot JDK... " >&6; }
12402              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12403$as_echo "$BOOT_JDK" >&6; }
12404              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12405$as_echo_n "checking Boot JDK version... " >&6; }
12406              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12408$as_echo "$BOOT_JDK_VERSION" >&6; }
12409            fi # end check jdk version
12410          fi # end check rt.jar
12411        fi # end check javac
12412      fi # end check java
12413    fi # end check boot jdk found
12414  fi
12415
12416    done
12417  fi
12418
12419  fi
12420
12421
12422    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12423    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12424      # Do we have a bin/java?
12425      if test ! -x "$BOOT_JDK/bin/java"; then
12426        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12428        BOOT_JDK_FOUND=no
12429      else
12430        # Do we have a bin/javac?
12431        if test ! -x "$BOOT_JDK/bin/javac"; then
12432          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12434          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12435$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12436          BOOT_JDK_FOUND=no
12437        else
12438          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12439          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12440            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12442            BOOT_JDK_FOUND=no
12443          else
12444            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12445            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12446
12447            # Extra M4 quote needed to protect [] in grep expression.
12448            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12449            if test "x$FOUND_VERSION_78" = x; then
12450              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12452              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12453$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12454              BOOT_JDK_FOUND=no
12455            else
12456              # We're done! :-)
12457              BOOT_JDK_FOUND=yes
12458
12459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12460
12461  # Input might be given as Windows format, start by converting to
12462  # unix format.
12463  path="$BOOT_JDK"
12464  new_path=`$CYGPATH -u "$path"`
12465
12466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12469  # "foo.exe" is OK but "foo" is an error.
12470  #
12471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12472  # It is also a way to make sure we got the proper file name for the real test later on.
12473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12474  if test "x$test_shortpath" = x; then
12475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12476$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12477    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12478  fi
12479
12480  # Call helper function which possibly converts this using DOS-style short mode.
12481  # If so, the updated path is stored in $new_path.
12482
12483  input_path="$new_path"
12484  # Check if we need to convert this using DOS-style short mode. If the path
12485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12486  # take no chances and rewrite it.
12487  # Note: m4 eats our [], so we need to use [ and ] instead.
12488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12489  if test "x$has_forbidden_chars" != x; then
12490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12494      # Going to short mode and back again did indeed matter. Since short mode is
12495      # case insensitive, let's make it lowercase to improve readability.
12496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12497      # Now convert it back to Unix-stile (cygpath)
12498      input_path=`$CYGPATH -u "$shortmode_path"`
12499      new_path="$input_path"
12500    fi
12501  fi
12502
12503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12504  if test "x$test_cygdrive_prefix" = x; then
12505    # As a simple fix, exclude /usr/bin since it's not a real path.
12506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12508      # a path prefixed by /cygdrive for fixpath to work.
12509      new_path="$CYGWIN_ROOT_PATH$input_path"
12510    fi
12511  fi
12512
12513
12514  if test "x$path" != "x$new_path"; then
12515    BOOT_JDK="$new_path"
12516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12517$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12518  fi
12519
12520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12521
12522  path="$BOOT_JDK"
12523  has_colon=`$ECHO $path | $GREP ^.:`
12524  new_path="$path"
12525  if test "x$has_colon" = x; then
12526    # Not in mixed or Windows style, start by that.
12527    new_path=`cmd //c echo $path`
12528  fi
12529
12530
12531  input_path="$new_path"
12532  # Check if we need to convert this using DOS-style short mode. If the path
12533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12534  # take no chances and rewrite it.
12535  # Note: m4 eats our [], so we need to use [ and ] instead.
12536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12537  if test "x$has_forbidden_chars" != x; then
12538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12540  fi
12541
12542
12543  windows_path="$new_path"
12544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12545    unix_path=`$CYGPATH -u "$windows_path"`
12546    new_path="$unix_path"
12547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12549    new_path="$unix_path"
12550  fi
12551
12552  if test "x$path" != "x$new_path"; then
12553    BOOT_JDK="$new_path"
12554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12555$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12556  fi
12557
12558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12560
12561  else
12562    # We're on a posix platform. Hooray! :)
12563    path="$BOOT_JDK"
12564
12565    if test ! -f "$path" && test ! -d "$path"; then
12566      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12567    fi
12568
12569    has_space=`$ECHO "$path" | $GREP " "`
12570    if test "x$has_space" != x; then
12571      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12573      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12574    fi
12575  fi
12576
12577              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12578$as_echo_n "checking for Boot JDK... " >&6; }
12579              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12580$as_echo "$BOOT_JDK" >&6; }
12581              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12582$as_echo_n "checking Boot JDK version... " >&6; }
12583              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12584              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12585$as_echo "$BOOT_JDK_VERSION" >&6; }
12586            fi # end check jdk version
12587          fi # end check rt.jar
12588        fi # end check javac
12589      fi # end check java
12590    fi # end check boot jdk found
12591  fi
12592
12593
12594  if test "x$BOOT_JDK_FOUND" = xno; then
12595    # Now execute the test
12596
12597  if test "x$PROGRAMW6432" != x; then
12598    VIRTUAL_DIR="$PROGRAMW6432/Java"
12599
12600  windows_path="$VIRTUAL_DIR"
12601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12602    unix_path=`$CYGPATH -u "$windows_path"`
12603    VIRTUAL_DIR="$unix_path"
12604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12606    VIRTUAL_DIR="$unix_path"
12607  fi
12608
12609
12610  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12611  BOOT_JDK_SUFFIX=""
12612  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12613  if test "x$ALL_JDKS_FOUND" != x; then
12614    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12615
12616  if test "x$BOOT_JDK_FOUND" = xno; then
12617    # Now execute the test
12618
12619        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12620        if test -d "$BOOT_JDK"; then
12621          BOOT_JDK_FOUND=maybe
12622          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12623$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12624        fi
12625
12626
12627    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12628    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12629      # Do we have a bin/java?
12630      if test ! -x "$BOOT_JDK/bin/java"; then
12631        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12633        BOOT_JDK_FOUND=no
12634      else
12635        # Do we have a bin/javac?
12636        if test ! -x "$BOOT_JDK/bin/javac"; then
12637          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12639          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12640$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12641          BOOT_JDK_FOUND=no
12642        else
12643          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12644          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12645            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12647            BOOT_JDK_FOUND=no
12648          else
12649            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12650            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12651
12652            # Extra M4 quote needed to protect [] in grep expression.
12653            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12654            if test "x$FOUND_VERSION_78" = x; then
12655              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12657              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12658$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12659              BOOT_JDK_FOUND=no
12660            else
12661              # We're done! :-)
12662              BOOT_JDK_FOUND=yes
12663
12664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12665
12666  # Input might be given as Windows format, start by converting to
12667  # unix format.
12668  path="$BOOT_JDK"
12669  new_path=`$CYGPATH -u "$path"`
12670
12671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12674  # "foo.exe" is OK but "foo" is an error.
12675  #
12676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12677  # It is also a way to make sure we got the proper file name for the real test later on.
12678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12679  if test "x$test_shortpath" = x; then
12680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12682    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12683  fi
12684
12685  # Call helper function which possibly converts this using DOS-style short mode.
12686  # If so, the updated path is stored in $new_path.
12687
12688  input_path="$new_path"
12689  # Check if we need to convert this using DOS-style short mode. If the path
12690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12691  # take no chances and rewrite it.
12692  # Note: m4 eats our [], so we need to use [ and ] instead.
12693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12694  if test "x$has_forbidden_chars" != x; then
12695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12699      # Going to short mode and back again did indeed matter. Since short mode is
12700      # case insensitive, let's make it lowercase to improve readability.
12701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12702      # Now convert it back to Unix-stile (cygpath)
12703      input_path=`$CYGPATH -u "$shortmode_path"`
12704      new_path="$input_path"
12705    fi
12706  fi
12707
12708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12709  if test "x$test_cygdrive_prefix" = x; then
12710    # As a simple fix, exclude /usr/bin since it's not a real path.
12711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12713      # a path prefixed by /cygdrive for fixpath to work.
12714      new_path="$CYGWIN_ROOT_PATH$input_path"
12715    fi
12716  fi
12717
12718
12719  if test "x$path" != "x$new_path"; then
12720    BOOT_JDK="$new_path"
12721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12723  fi
12724
12725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12726
12727  path="$BOOT_JDK"
12728  has_colon=`$ECHO $path | $GREP ^.:`
12729  new_path="$path"
12730  if test "x$has_colon" = x; then
12731    # Not in mixed or Windows style, start by that.
12732    new_path=`cmd //c echo $path`
12733  fi
12734
12735
12736  input_path="$new_path"
12737  # Check if we need to convert this using DOS-style short mode. If the path
12738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12739  # take no chances and rewrite it.
12740  # Note: m4 eats our [], so we need to use [ and ] instead.
12741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12742  if test "x$has_forbidden_chars" != x; then
12743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12745  fi
12746
12747
12748  windows_path="$new_path"
12749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12750    unix_path=`$CYGPATH -u "$windows_path"`
12751    new_path="$unix_path"
12752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12754    new_path="$unix_path"
12755  fi
12756
12757  if test "x$path" != "x$new_path"; then
12758    BOOT_JDK="$new_path"
12759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12761  fi
12762
12763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12765
12766  else
12767    # We're on a posix platform. Hooray! :)
12768    path="$BOOT_JDK"
12769
12770    if test ! -f "$path" && test ! -d "$path"; then
12771      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12772    fi
12773
12774    has_space=`$ECHO "$path" | $GREP " "`
12775    if test "x$has_space" != x; then
12776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12778      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12779    fi
12780  fi
12781
12782              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12783$as_echo_n "checking for Boot JDK... " >&6; }
12784              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12785$as_echo "$BOOT_JDK" >&6; }
12786              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12787$as_echo_n "checking Boot JDK version... " >&6; }
12788              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12790$as_echo "$BOOT_JDK_VERSION" >&6; }
12791            fi # end check jdk version
12792          fi # end check rt.jar
12793        fi # end check javac
12794      fi # end check java
12795    fi # end check boot jdk found
12796  fi
12797
12798    done
12799  fi
12800
12801  fi
12802
12803
12804    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12805    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12806      # Do we have a bin/java?
12807      if test ! -x "$BOOT_JDK/bin/java"; then
12808        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12810        BOOT_JDK_FOUND=no
12811      else
12812        # Do we have a bin/javac?
12813        if test ! -x "$BOOT_JDK/bin/javac"; then
12814          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12815$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12816          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12817$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12818          BOOT_JDK_FOUND=no
12819        else
12820          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12821          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12824            BOOT_JDK_FOUND=no
12825          else
12826            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12827            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12828
12829            # Extra M4 quote needed to protect [] in grep expression.
12830            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12831            if test "x$FOUND_VERSION_78" = x; then
12832              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12833$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12834              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12835$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12836              BOOT_JDK_FOUND=no
12837            else
12838              # We're done! :-)
12839              BOOT_JDK_FOUND=yes
12840
12841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12842
12843  # Input might be given as Windows format, start by converting to
12844  # unix format.
12845  path="$BOOT_JDK"
12846  new_path=`$CYGPATH -u "$path"`
12847
12848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12851  # "foo.exe" is OK but "foo" is an error.
12852  #
12853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12854  # It is also a way to make sure we got the proper file name for the real test later on.
12855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12856  if test "x$test_shortpath" = x; then
12857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12859    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12860  fi
12861
12862  # Call helper function which possibly converts this using DOS-style short mode.
12863  # If so, the updated path is stored in $new_path.
12864
12865  input_path="$new_path"
12866  # Check if we need to convert this using DOS-style short mode. If the path
12867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12868  # take no chances and rewrite it.
12869  # Note: m4 eats our [], so we need to use [ and ] instead.
12870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12871  if test "x$has_forbidden_chars" != x; then
12872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12876      # Going to short mode and back again did indeed matter. Since short mode is
12877      # case insensitive, let's make it lowercase to improve readability.
12878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12879      # Now convert it back to Unix-stile (cygpath)
12880      input_path=`$CYGPATH -u "$shortmode_path"`
12881      new_path="$input_path"
12882    fi
12883  fi
12884
12885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12886  if test "x$test_cygdrive_prefix" = x; then
12887    # As a simple fix, exclude /usr/bin since it's not a real path.
12888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12890      # a path prefixed by /cygdrive for fixpath to work.
12891      new_path="$CYGWIN_ROOT_PATH$input_path"
12892    fi
12893  fi
12894
12895
12896  if test "x$path" != "x$new_path"; then
12897    BOOT_JDK="$new_path"
12898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12900  fi
12901
12902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12903
12904  path="$BOOT_JDK"
12905  has_colon=`$ECHO $path | $GREP ^.:`
12906  new_path="$path"
12907  if test "x$has_colon" = x; then
12908    # Not in mixed or Windows style, start by that.
12909    new_path=`cmd //c echo $path`
12910  fi
12911
12912
12913  input_path="$new_path"
12914  # Check if we need to convert this using DOS-style short mode. If the path
12915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12916  # take no chances and rewrite it.
12917  # Note: m4 eats our [], so we need to use [ and ] instead.
12918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12919  if test "x$has_forbidden_chars" != x; then
12920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12922  fi
12923
12924
12925  windows_path="$new_path"
12926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12927    unix_path=`$CYGPATH -u "$windows_path"`
12928    new_path="$unix_path"
12929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12931    new_path="$unix_path"
12932  fi
12933
12934  if test "x$path" != "x$new_path"; then
12935    BOOT_JDK="$new_path"
12936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12937$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12938  fi
12939
12940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12942
12943  else
12944    # We're on a posix platform. Hooray! :)
12945    path="$BOOT_JDK"
12946
12947    if test ! -f "$path" && test ! -d "$path"; then
12948      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12949    fi
12950
12951    has_space=`$ECHO "$path" | $GREP " "`
12952    if test "x$has_space" != x; then
12953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12954$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12956    fi
12957  fi
12958
12959              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12960$as_echo_n "checking for Boot JDK... " >&6; }
12961              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12962$as_echo "$BOOT_JDK" >&6; }
12963              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12964$as_echo_n "checking Boot JDK version... " >&6; }
12965              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12967$as_echo "$BOOT_JDK_VERSION" >&6; }
12968            fi # end check jdk version
12969          fi # end check rt.jar
12970        fi # end check javac
12971      fi # end check java
12972    fi # end check boot jdk found
12973  fi
12974
12975
12976  if test "x$BOOT_JDK_FOUND" = xno; then
12977    # Now execute the test
12978
12979  if test "x$PROGRAMFILES" != x; then
12980    VIRTUAL_DIR="$PROGRAMFILES/Java"
12981
12982  windows_path="$VIRTUAL_DIR"
12983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12984    unix_path=`$CYGPATH -u "$windows_path"`
12985    VIRTUAL_DIR="$unix_path"
12986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12988    VIRTUAL_DIR="$unix_path"
12989  fi
12990
12991
12992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12993  BOOT_JDK_SUFFIX=""
12994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12995  if test "x$ALL_JDKS_FOUND" != x; then
12996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12997
12998  if test "x$BOOT_JDK_FOUND" = xno; then
12999    # Now execute the test
13000
13001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13002        if test -d "$BOOT_JDK"; then
13003          BOOT_JDK_FOUND=maybe
13004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13006        fi
13007
13008
13009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13011      # Do we have a bin/java?
13012      if test ! -x "$BOOT_JDK/bin/java"; then
13013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13015        BOOT_JDK_FOUND=no
13016      else
13017        # Do we have a bin/javac?
13018        if test ! -x "$BOOT_JDK/bin/javac"; then
13019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13023          BOOT_JDK_FOUND=no
13024        else
13025          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13026          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13027            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13029            BOOT_JDK_FOUND=no
13030          else
13031            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13032            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13033
13034            # Extra M4 quote needed to protect [] in grep expression.
13035            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13036            if test "x$FOUND_VERSION_78" = x; then
13037              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13039              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13040$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13041              BOOT_JDK_FOUND=no
13042            else
13043              # We're done! :-)
13044              BOOT_JDK_FOUND=yes
13045
13046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13047
13048  # Input might be given as Windows format, start by converting to
13049  # unix format.
13050  path="$BOOT_JDK"
13051  new_path=`$CYGPATH -u "$path"`
13052
13053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13056  # "foo.exe" is OK but "foo" is an error.
13057  #
13058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13059  # It is also a way to make sure we got the proper file name for the real test later on.
13060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13061  if test "x$test_shortpath" = x; then
13062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13064    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13065  fi
13066
13067  # Call helper function which possibly converts this using DOS-style short mode.
13068  # If so, the updated path is stored in $new_path.
13069
13070  input_path="$new_path"
13071  # Check if we need to convert this using DOS-style short mode. If the path
13072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13073  # take no chances and rewrite it.
13074  # Note: m4 eats our [], so we need to use [ and ] instead.
13075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13076  if test "x$has_forbidden_chars" != x; then
13077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13081      # Going to short mode and back again did indeed matter. Since short mode is
13082      # case insensitive, let's make it lowercase to improve readability.
13083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13084      # Now convert it back to Unix-stile (cygpath)
13085      input_path=`$CYGPATH -u "$shortmode_path"`
13086      new_path="$input_path"
13087    fi
13088  fi
13089
13090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13091  if test "x$test_cygdrive_prefix" = x; then
13092    # As a simple fix, exclude /usr/bin since it's not a real path.
13093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13095      # a path prefixed by /cygdrive for fixpath to work.
13096      new_path="$CYGWIN_ROOT_PATH$input_path"
13097    fi
13098  fi
13099
13100
13101  if test "x$path" != "x$new_path"; then
13102    BOOT_JDK="$new_path"
13103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13104$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13105  fi
13106
13107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13108
13109  path="$BOOT_JDK"
13110  has_colon=`$ECHO $path | $GREP ^.:`
13111  new_path="$path"
13112  if test "x$has_colon" = x; then
13113    # Not in mixed or Windows style, start by that.
13114    new_path=`cmd //c echo $path`
13115  fi
13116
13117
13118  input_path="$new_path"
13119  # Check if we need to convert this using DOS-style short mode. If the path
13120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13121  # take no chances and rewrite it.
13122  # Note: m4 eats our [], so we need to use [ and ] instead.
13123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13124  if test "x$has_forbidden_chars" != x; then
13125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13127  fi
13128
13129
13130  windows_path="$new_path"
13131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13132    unix_path=`$CYGPATH -u "$windows_path"`
13133    new_path="$unix_path"
13134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13136    new_path="$unix_path"
13137  fi
13138
13139  if test "x$path" != "x$new_path"; then
13140    BOOT_JDK="$new_path"
13141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13143  fi
13144
13145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13147
13148  else
13149    # We're on a posix platform. Hooray! :)
13150    path="$BOOT_JDK"
13151
13152    if test ! -f "$path" && test ! -d "$path"; then
13153      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13154    fi
13155
13156    has_space=`$ECHO "$path" | $GREP " "`
13157    if test "x$has_space" != x; then
13158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13159$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13160      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13161    fi
13162  fi
13163
13164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13165$as_echo_n "checking for Boot JDK... " >&6; }
13166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13167$as_echo "$BOOT_JDK" >&6; }
13168              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13169$as_echo_n "checking Boot JDK version... " >&6; }
13170              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13172$as_echo "$BOOT_JDK_VERSION" >&6; }
13173            fi # end check jdk version
13174          fi # end check rt.jar
13175        fi # end check javac
13176      fi # end check java
13177    fi # end check boot jdk found
13178  fi
13179
13180    done
13181  fi
13182
13183  fi
13184
13185
13186    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13187    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13188      # Do we have a bin/java?
13189      if test ! -x "$BOOT_JDK/bin/java"; then
13190        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13192        BOOT_JDK_FOUND=no
13193      else
13194        # Do we have a bin/javac?
13195        if test ! -x "$BOOT_JDK/bin/javac"; then
13196          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13198          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13199$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13200          BOOT_JDK_FOUND=no
13201        else
13202          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13203          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13206            BOOT_JDK_FOUND=no
13207          else
13208            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13209            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13210
13211            # Extra M4 quote needed to protect [] in grep expression.
13212            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13213            if test "x$FOUND_VERSION_78" = x; then
13214              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13216              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13217$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13218              BOOT_JDK_FOUND=no
13219            else
13220              # We're done! :-)
13221              BOOT_JDK_FOUND=yes
13222
13223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13224
13225  # Input might be given as Windows format, start by converting to
13226  # unix format.
13227  path="$BOOT_JDK"
13228  new_path=`$CYGPATH -u "$path"`
13229
13230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13233  # "foo.exe" is OK but "foo" is an error.
13234  #
13235  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13236  # It is also a way to make sure we got the proper file name for the real test later on.
13237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13238  if test "x$test_shortpath" = x; then
13239    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13241    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13242  fi
13243
13244  # Call helper function which possibly converts this using DOS-style short mode.
13245  # If so, the updated path is stored in $new_path.
13246
13247  input_path="$new_path"
13248  # Check if we need to convert this using DOS-style short mode. If the path
13249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13250  # take no chances and rewrite it.
13251  # Note: m4 eats our [], so we need to use [ and ] instead.
13252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13253  if test "x$has_forbidden_chars" != x; then
13254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13255    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13256    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13257    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13258      # Going to short mode and back again did indeed matter. Since short mode is
13259      # case insensitive, let's make it lowercase to improve readability.
13260      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13261      # Now convert it back to Unix-stile (cygpath)
13262      input_path=`$CYGPATH -u "$shortmode_path"`
13263      new_path="$input_path"
13264    fi
13265  fi
13266
13267  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13268  if test "x$test_cygdrive_prefix" = x; then
13269    # As a simple fix, exclude /usr/bin since it's not a real path.
13270    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13271      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13272      # a path prefixed by /cygdrive for fixpath to work.
13273      new_path="$CYGWIN_ROOT_PATH$input_path"
13274    fi
13275  fi
13276
13277
13278  if test "x$path" != "x$new_path"; then
13279    BOOT_JDK="$new_path"
13280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13282  fi
13283
13284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13285
13286  path="$BOOT_JDK"
13287  has_colon=`$ECHO $path | $GREP ^.:`
13288  new_path="$path"
13289  if test "x$has_colon" = x; then
13290    # Not in mixed or Windows style, start by that.
13291    new_path=`cmd //c echo $path`
13292  fi
13293
13294
13295  input_path="$new_path"
13296  # Check if we need to convert this using DOS-style short mode. If the path
13297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13298  # take no chances and rewrite it.
13299  # Note: m4 eats our [], so we need to use [ and ] instead.
13300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13301  if test "x$has_forbidden_chars" != x; then
13302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13304  fi
13305
13306
13307  windows_path="$new_path"
13308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13309    unix_path=`$CYGPATH -u "$windows_path"`
13310    new_path="$unix_path"
13311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13313    new_path="$unix_path"
13314  fi
13315
13316  if test "x$path" != "x$new_path"; then
13317    BOOT_JDK="$new_path"
13318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13320  fi
13321
13322  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13323  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13324
13325  else
13326    # We're on a posix platform. Hooray! :)
13327    path="$BOOT_JDK"
13328
13329    if test ! -f "$path" && test ! -d "$path"; then
13330      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13331    fi
13332
13333    has_space=`$ECHO "$path" | $GREP " "`
13334    if test "x$has_space" != x; then
13335      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13337      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13338    fi
13339  fi
13340
13341              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13342$as_echo_n "checking for Boot JDK... " >&6; }
13343              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13344$as_echo "$BOOT_JDK" >&6; }
13345              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13346$as_echo_n "checking Boot JDK version... " >&6; }
13347              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13349$as_echo "$BOOT_JDK_VERSION" >&6; }
13350            fi # end check jdk version
13351          fi # end check rt.jar
13352        fi # end check javac
13353      fi # end check java
13354    fi # end check boot jdk found
13355  fi
13356
13357
13358  if test "x$BOOT_JDK_FOUND" = xno; then
13359    # Now execute the test
13360
13361  if test "x$ProgramFiles" != x; then
13362    VIRTUAL_DIR="$ProgramFiles/Java"
13363
13364  windows_path="$VIRTUAL_DIR"
13365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13366    unix_path=`$CYGPATH -u "$windows_path"`
13367    VIRTUAL_DIR="$unix_path"
13368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13370    VIRTUAL_DIR="$unix_path"
13371  fi
13372
13373
13374  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13375  BOOT_JDK_SUFFIX=""
13376  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13377  if test "x$ALL_JDKS_FOUND" != x; then
13378    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13379
13380  if test "x$BOOT_JDK_FOUND" = xno; then
13381    # Now execute the test
13382
13383        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13384        if test -d "$BOOT_JDK"; then
13385          BOOT_JDK_FOUND=maybe
13386          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13387$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13388        fi
13389
13390
13391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13393      # Do we have a bin/java?
13394      if test ! -x "$BOOT_JDK/bin/java"; then
13395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13397        BOOT_JDK_FOUND=no
13398      else
13399        # Do we have a bin/javac?
13400        if test ! -x "$BOOT_JDK/bin/javac"; then
13401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13405          BOOT_JDK_FOUND=no
13406        else
13407          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13408          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13409            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13411            BOOT_JDK_FOUND=no
13412          else
13413            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13414            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13415
13416            # Extra M4 quote needed to protect [] in grep expression.
13417            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13418            if test "x$FOUND_VERSION_78" = x; then
13419              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13421              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13422$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13423              BOOT_JDK_FOUND=no
13424            else
13425              # We're done! :-)
13426              BOOT_JDK_FOUND=yes
13427
13428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13429
13430  # Input might be given as Windows format, start by converting to
13431  # unix format.
13432  path="$BOOT_JDK"
13433  new_path=`$CYGPATH -u "$path"`
13434
13435  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13436  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13437  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13438  # "foo.exe" is OK but "foo" is an error.
13439  #
13440  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13441  # It is also a way to make sure we got the proper file name for the real test later on.
13442  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13443  if test "x$test_shortpath" = x; then
13444    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13446    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13447  fi
13448
13449  # Call helper function which possibly converts this using DOS-style short mode.
13450  # If so, the updated path is stored in $new_path.
13451
13452  input_path="$new_path"
13453  # Check if we need to convert this using DOS-style short mode. If the path
13454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13455  # take no chances and rewrite it.
13456  # Note: m4 eats our [], so we need to use [ and ] instead.
13457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13458  if test "x$has_forbidden_chars" != x; then
13459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13463      # Going to short mode and back again did indeed matter. Since short mode is
13464      # case insensitive, let's make it lowercase to improve readability.
13465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13466      # Now convert it back to Unix-stile (cygpath)
13467      input_path=`$CYGPATH -u "$shortmode_path"`
13468      new_path="$input_path"
13469    fi
13470  fi
13471
13472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13473  if test "x$test_cygdrive_prefix" = x; then
13474    # As a simple fix, exclude /usr/bin since it's not a real path.
13475    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13477      # a path prefixed by /cygdrive for fixpath to work.
13478      new_path="$CYGWIN_ROOT_PATH$input_path"
13479    fi
13480  fi
13481
13482
13483  if test "x$path" != "x$new_path"; then
13484    BOOT_JDK="$new_path"
13485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13486$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13487  fi
13488
13489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13490
13491  path="$BOOT_JDK"
13492  has_colon=`$ECHO $path | $GREP ^.:`
13493  new_path="$path"
13494  if test "x$has_colon" = x; then
13495    # Not in mixed or Windows style, start by that.
13496    new_path=`cmd //c echo $path`
13497  fi
13498
13499
13500  input_path="$new_path"
13501  # Check if we need to convert this using DOS-style short mode. If the path
13502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13503  # take no chances and rewrite it.
13504  # Note: m4 eats our [], so we need to use [ and ] instead.
13505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13506  if test "x$has_forbidden_chars" != x; then
13507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13509  fi
13510
13511
13512  windows_path="$new_path"
13513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13514    unix_path=`$CYGPATH -u "$windows_path"`
13515    new_path="$unix_path"
13516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13518    new_path="$unix_path"
13519  fi
13520
13521  if test "x$path" != "x$new_path"; then
13522    BOOT_JDK="$new_path"
13523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13524$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13525  fi
13526
13527  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13528  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13529
13530  else
13531    # We're on a posix platform. Hooray! :)
13532    path="$BOOT_JDK"
13533
13534    if test ! -f "$path" && test ! -d "$path"; then
13535      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13536    fi
13537
13538    has_space=`$ECHO "$path" | $GREP " "`
13539    if test "x$has_space" != x; then
13540      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13542      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13543    fi
13544  fi
13545
13546              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13547$as_echo_n "checking for Boot JDK... " >&6; }
13548              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13549$as_echo "$BOOT_JDK" >&6; }
13550              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13551$as_echo_n "checking Boot JDK version... " >&6; }
13552              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13554$as_echo "$BOOT_JDK_VERSION" >&6; }
13555            fi # end check jdk version
13556          fi # end check rt.jar
13557        fi # end check javac
13558      fi # end check java
13559    fi # end check boot jdk found
13560  fi
13561
13562    done
13563  fi
13564
13565  fi
13566
13567
13568    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13569    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13570      # Do we have a bin/java?
13571      if test ! -x "$BOOT_JDK/bin/java"; then
13572        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13574        BOOT_JDK_FOUND=no
13575      else
13576        # Do we have a bin/javac?
13577        if test ! -x "$BOOT_JDK/bin/javac"; then
13578          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13580          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13581$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13582          BOOT_JDK_FOUND=no
13583        else
13584          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13585          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13586            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13588            BOOT_JDK_FOUND=no
13589          else
13590            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13591            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13592
13593            # Extra M4 quote needed to protect [] in grep expression.
13594            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13595            if test "x$FOUND_VERSION_78" = x; then
13596              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13598              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13599$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13600              BOOT_JDK_FOUND=no
13601            else
13602              # We're done! :-)
13603              BOOT_JDK_FOUND=yes
13604
13605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13606
13607  # Input might be given as Windows format, start by converting to
13608  # unix format.
13609  path="$BOOT_JDK"
13610  new_path=`$CYGPATH -u "$path"`
13611
13612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13615  # "foo.exe" is OK but "foo" is an error.
13616  #
13617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13618  # It is also a way to make sure we got the proper file name for the real test later on.
13619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13620  if test "x$test_shortpath" = x; then
13621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13623    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13624  fi
13625
13626  # Call helper function which possibly converts this using DOS-style short mode.
13627  # If so, the updated path is stored in $new_path.
13628
13629  input_path="$new_path"
13630  # Check if we need to convert this using DOS-style short mode. If the path
13631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13632  # take no chances and rewrite it.
13633  # Note: m4 eats our [], so we need to use [ and ] instead.
13634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13635  if test "x$has_forbidden_chars" != x; then
13636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13640      # Going to short mode and back again did indeed matter. Since short mode is
13641      # case insensitive, let's make it lowercase to improve readability.
13642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13643      # Now convert it back to Unix-stile (cygpath)
13644      input_path=`$CYGPATH -u "$shortmode_path"`
13645      new_path="$input_path"
13646    fi
13647  fi
13648
13649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13650  if test "x$test_cygdrive_prefix" = x; then
13651    # As a simple fix, exclude /usr/bin since it's not a real path.
13652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13654      # a path prefixed by /cygdrive for fixpath to work.
13655      new_path="$CYGWIN_ROOT_PATH$input_path"
13656    fi
13657  fi
13658
13659
13660  if test "x$path" != "x$new_path"; then
13661    BOOT_JDK="$new_path"
13662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13664  fi
13665
13666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13667
13668  path="$BOOT_JDK"
13669  has_colon=`$ECHO $path | $GREP ^.:`
13670  new_path="$path"
13671  if test "x$has_colon" = x; then
13672    # Not in mixed or Windows style, start by that.
13673    new_path=`cmd //c echo $path`
13674  fi
13675
13676
13677  input_path="$new_path"
13678  # Check if we need to convert this using DOS-style short mode. If the path
13679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13680  # take no chances and rewrite it.
13681  # Note: m4 eats our [], so we need to use [ and ] instead.
13682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13683  if test "x$has_forbidden_chars" != x; then
13684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13686  fi
13687
13688
13689  windows_path="$new_path"
13690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13691    unix_path=`$CYGPATH -u "$windows_path"`
13692    new_path="$unix_path"
13693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13695    new_path="$unix_path"
13696  fi
13697
13698  if test "x$path" != "x$new_path"; then
13699    BOOT_JDK="$new_path"
13700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13702  fi
13703
13704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13706
13707  else
13708    # We're on a posix platform. Hooray! :)
13709    path="$BOOT_JDK"
13710
13711    if test ! -f "$path" && test ! -d "$path"; then
13712      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13713    fi
13714
13715    has_space=`$ECHO "$path" | $GREP " "`
13716    if test "x$has_space" != x; then
13717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13719      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13720    fi
13721  fi
13722
13723              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13724$as_echo_n "checking for Boot JDK... " >&6; }
13725              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13726$as_echo "$BOOT_JDK" >&6; }
13727              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13728$as_echo_n "checking Boot JDK version... " >&6; }
13729              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13730              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13731$as_echo "$BOOT_JDK_VERSION" >&6; }
13732            fi # end check jdk version
13733          fi # end check rt.jar
13734        fi # end check javac
13735      fi # end check java
13736    fi # end check boot jdk found
13737  fi
13738
13739
13740  if test "x$BOOT_JDK_FOUND" = xno; then
13741    # Now execute the test
13742
13743  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13744  BOOT_JDK_SUFFIX=""
13745  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13746  if test "x$ALL_JDKS_FOUND" != x; then
13747    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13748
13749  if test "x$BOOT_JDK_FOUND" = xno; then
13750    # Now execute the test
13751
13752        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13753        if test -d "$BOOT_JDK"; then
13754          BOOT_JDK_FOUND=maybe
13755          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13756$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13757        fi
13758
13759
13760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13762      # Do we have a bin/java?
13763      if test ! -x "$BOOT_JDK/bin/java"; then
13764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13766        BOOT_JDK_FOUND=no
13767      else
13768        # Do we have a bin/javac?
13769        if test ! -x "$BOOT_JDK/bin/javac"; then
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13774          BOOT_JDK_FOUND=no
13775        else
13776          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13777          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13780            BOOT_JDK_FOUND=no
13781          else
13782            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13784
13785            # Extra M4 quote needed to protect [] in grep expression.
13786            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13787            if test "x$FOUND_VERSION_78" = x; then
13788              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13790              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13791$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13792              BOOT_JDK_FOUND=no
13793            else
13794              # We're done! :-)
13795              BOOT_JDK_FOUND=yes
13796
13797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13798
13799  # Input might be given as Windows format, start by converting to
13800  # unix format.
13801  path="$BOOT_JDK"
13802  new_path=`$CYGPATH -u "$path"`
13803
13804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13807  # "foo.exe" is OK but "foo" is an error.
13808  #
13809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13810  # It is also a way to make sure we got the proper file name for the real test later on.
13811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13812  if test "x$test_shortpath" = x; then
13813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13815    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13816  fi
13817
13818  # Call helper function which possibly converts this using DOS-style short mode.
13819  # If so, the updated path is stored in $new_path.
13820
13821  input_path="$new_path"
13822  # Check if we need to convert this using DOS-style short mode. If the path
13823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13824  # take no chances and rewrite it.
13825  # Note: m4 eats our [], so we need to use [ and ] instead.
13826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13827  if test "x$has_forbidden_chars" != x; then
13828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13832      # Going to short mode and back again did indeed matter. Since short mode is
13833      # case insensitive, let's make it lowercase to improve readability.
13834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13835      # Now convert it back to Unix-stile (cygpath)
13836      input_path=`$CYGPATH -u "$shortmode_path"`
13837      new_path="$input_path"
13838    fi
13839  fi
13840
13841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13842  if test "x$test_cygdrive_prefix" = x; then
13843    # As a simple fix, exclude /usr/bin since it's not a real path.
13844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13846      # a path prefixed by /cygdrive for fixpath to work.
13847      new_path="$CYGWIN_ROOT_PATH$input_path"
13848    fi
13849  fi
13850
13851
13852  if test "x$path" != "x$new_path"; then
13853    BOOT_JDK="$new_path"
13854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13855$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13856  fi
13857
13858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13859
13860  path="$BOOT_JDK"
13861  has_colon=`$ECHO $path | $GREP ^.:`
13862  new_path="$path"
13863  if test "x$has_colon" = x; then
13864    # Not in mixed or Windows style, start by that.
13865    new_path=`cmd //c echo $path`
13866  fi
13867
13868
13869  input_path="$new_path"
13870  # Check if we need to convert this using DOS-style short mode. If the path
13871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13872  # take no chances and rewrite it.
13873  # Note: m4 eats our [], so we need to use [ and ] instead.
13874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13875  if test "x$has_forbidden_chars" != x; then
13876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13878  fi
13879
13880
13881  windows_path="$new_path"
13882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13883    unix_path=`$CYGPATH -u "$windows_path"`
13884    new_path="$unix_path"
13885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13887    new_path="$unix_path"
13888  fi
13889
13890  if test "x$path" != "x$new_path"; then
13891    BOOT_JDK="$new_path"
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13894  fi
13895
13896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13898
13899  else
13900    # We're on a posix platform. Hooray! :)
13901    path="$BOOT_JDK"
13902
13903    if test ! -f "$path" && test ! -d "$path"; then
13904      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13905    fi
13906
13907    has_space=`$ECHO "$path" | $GREP " "`
13908    if test "x$has_space" != x; then
13909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13910$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13911      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13912    fi
13913  fi
13914
13915              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13916$as_echo_n "checking for Boot JDK... " >&6; }
13917              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13918$as_echo "$BOOT_JDK" >&6; }
13919              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13920$as_echo_n "checking Boot JDK version... " >&6; }
13921              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13923$as_echo "$BOOT_JDK_VERSION" >&6; }
13924            fi # end check jdk version
13925          fi # end check rt.jar
13926        fi # end check javac
13927      fi # end check java
13928    fi # end check boot jdk found
13929  fi
13930
13931    done
13932  fi
13933
13934
13935    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13936    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13937      # Do we have a bin/java?
13938      if test ! -x "$BOOT_JDK/bin/java"; then
13939        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13940$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13941        BOOT_JDK_FOUND=no
13942      else
13943        # Do we have a bin/javac?
13944        if test ! -x "$BOOT_JDK/bin/javac"; then
13945          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13947          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13948$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13949          BOOT_JDK_FOUND=no
13950        else
13951          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13952          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13953            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13955            BOOT_JDK_FOUND=no
13956          else
13957            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13958            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13959
13960            # Extra M4 quote needed to protect [] in grep expression.
13961            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13962            if test "x$FOUND_VERSION_78" = x; then
13963              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13964$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13965              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13966$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13967              BOOT_JDK_FOUND=no
13968            else
13969              # We're done! :-)
13970              BOOT_JDK_FOUND=yes
13971
13972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13973
13974  # Input might be given as Windows format, start by converting to
13975  # unix format.
13976  path="$BOOT_JDK"
13977  new_path=`$CYGPATH -u "$path"`
13978
13979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13982  # "foo.exe" is OK but "foo" is an error.
13983  #
13984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13985  # It is also a way to make sure we got the proper file name for the real test later on.
13986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13987  if test "x$test_shortpath" = x; then
13988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13991  fi
13992
13993  # Call helper function which possibly converts this using DOS-style short mode.
13994  # If so, the updated path is stored in $new_path.
13995
13996  input_path="$new_path"
13997  # Check if we need to convert this using DOS-style short mode. If the path
13998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13999  # take no chances and rewrite it.
14000  # Note: m4 eats our [], so we need to use [ and ] instead.
14001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14002  if test "x$has_forbidden_chars" != x; then
14003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14007      # Going to short mode and back again did indeed matter. Since short mode is
14008      # case insensitive, let's make it lowercase to improve readability.
14009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14010      # Now convert it back to Unix-stile (cygpath)
14011      input_path=`$CYGPATH -u "$shortmode_path"`
14012      new_path="$input_path"
14013    fi
14014  fi
14015
14016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14017  if test "x$test_cygdrive_prefix" = x; then
14018    # As a simple fix, exclude /usr/bin since it's not a real path.
14019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14021      # a path prefixed by /cygdrive for fixpath to work.
14022      new_path="$CYGWIN_ROOT_PATH$input_path"
14023    fi
14024  fi
14025
14026
14027  if test "x$path" != "x$new_path"; then
14028    BOOT_JDK="$new_path"
14029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14031  fi
14032
14033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14034
14035  path="$BOOT_JDK"
14036  has_colon=`$ECHO $path | $GREP ^.:`
14037  new_path="$path"
14038  if test "x$has_colon" = x; then
14039    # Not in mixed or Windows style, start by that.
14040    new_path=`cmd //c echo $path`
14041  fi
14042
14043
14044  input_path="$new_path"
14045  # Check if we need to convert this using DOS-style short mode. If the path
14046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14047  # take no chances and rewrite it.
14048  # Note: m4 eats our [], so we need to use [ and ] instead.
14049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14050  if test "x$has_forbidden_chars" != x; then
14051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14053  fi
14054
14055
14056  windows_path="$new_path"
14057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14058    unix_path=`$CYGPATH -u "$windows_path"`
14059    new_path="$unix_path"
14060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14062    new_path="$unix_path"
14063  fi
14064
14065  if test "x$path" != "x$new_path"; then
14066    BOOT_JDK="$new_path"
14067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14069  fi
14070
14071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14073
14074  else
14075    # We're on a posix platform. Hooray! :)
14076    path="$BOOT_JDK"
14077
14078    if test ! -f "$path" && test ! -d "$path"; then
14079      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14080    fi
14081
14082    has_space=`$ECHO "$path" | $GREP " "`
14083    if test "x$has_space" != x; then
14084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14085$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14086      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14087    fi
14088  fi
14089
14090              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14091$as_echo_n "checking for Boot JDK... " >&6; }
14092              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14093$as_echo "$BOOT_JDK" >&6; }
14094              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14095$as_echo_n "checking Boot JDK version... " >&6; }
14096              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14098$as_echo "$BOOT_JDK_VERSION" >&6; }
14099            fi # end check jdk version
14100          fi # end check rt.jar
14101        fi # end check javac
14102      fi # end check java
14103    fi # end check boot jdk found
14104  fi
14105
14106  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14107
14108  if test "x$BOOT_JDK_FOUND" = xno; then
14109    # Now execute the test
14110
14111  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14112  BOOT_JDK_SUFFIX="/Contents/Home"
14113  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14114  if test "x$ALL_JDKS_FOUND" != x; then
14115    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14116
14117  if test "x$BOOT_JDK_FOUND" = xno; then
14118    # Now execute the test
14119
14120        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14121        if test -d "$BOOT_JDK"; then
14122          BOOT_JDK_FOUND=maybe
14123          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14124$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14125        fi
14126
14127
14128    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14129    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14130      # Do we have a bin/java?
14131      if test ! -x "$BOOT_JDK/bin/java"; then
14132        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14134        BOOT_JDK_FOUND=no
14135      else
14136        # Do we have a bin/javac?
14137        if test ! -x "$BOOT_JDK/bin/javac"; then
14138          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14140          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14141$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14142          BOOT_JDK_FOUND=no
14143        else
14144          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14145          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14146            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14148            BOOT_JDK_FOUND=no
14149          else
14150            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14151            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14152
14153            # Extra M4 quote needed to protect [] in grep expression.
14154            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14155            if test "x$FOUND_VERSION_78" = x; then
14156              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14158              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14159$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14160              BOOT_JDK_FOUND=no
14161            else
14162              # We're done! :-)
14163              BOOT_JDK_FOUND=yes
14164
14165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14166
14167  # Input might be given as Windows format, start by converting to
14168  # unix format.
14169  path="$BOOT_JDK"
14170  new_path=`$CYGPATH -u "$path"`
14171
14172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14175  # "foo.exe" is OK but "foo" is an error.
14176  #
14177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14178  # It is also a way to make sure we got the proper file name for the real test later on.
14179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14180  if test "x$test_shortpath" = x; then
14181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14182$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14183    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14184  fi
14185
14186  # Call helper function which possibly converts this using DOS-style short mode.
14187  # If so, the updated path is stored in $new_path.
14188
14189  input_path="$new_path"
14190  # Check if we need to convert this using DOS-style short mode. If the path
14191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14192  # take no chances and rewrite it.
14193  # Note: m4 eats our [], so we need to use [ and ] instead.
14194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14195  if test "x$has_forbidden_chars" != x; then
14196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14200      # Going to short mode and back again did indeed matter. Since short mode is
14201      # case insensitive, let's make it lowercase to improve readability.
14202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14203      # Now convert it back to Unix-stile (cygpath)
14204      input_path=`$CYGPATH -u "$shortmode_path"`
14205      new_path="$input_path"
14206    fi
14207  fi
14208
14209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14210  if test "x$test_cygdrive_prefix" = x; then
14211    # As a simple fix, exclude /usr/bin since it's not a real path.
14212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14214      # a path prefixed by /cygdrive for fixpath to work.
14215      new_path="$CYGWIN_ROOT_PATH$input_path"
14216    fi
14217  fi
14218
14219
14220  if test "x$path" != "x$new_path"; then
14221    BOOT_JDK="$new_path"
14222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14224  fi
14225
14226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14227
14228  path="$BOOT_JDK"
14229  has_colon=`$ECHO $path | $GREP ^.:`
14230  new_path="$path"
14231  if test "x$has_colon" = x; then
14232    # Not in mixed or Windows style, start by that.
14233    new_path=`cmd //c echo $path`
14234  fi
14235
14236
14237  input_path="$new_path"
14238  # Check if we need to convert this using DOS-style short mode. If the path
14239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14240  # take no chances and rewrite it.
14241  # Note: m4 eats our [], so we need to use [ and ] instead.
14242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14243  if test "x$has_forbidden_chars" != x; then
14244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14246  fi
14247
14248
14249  windows_path="$new_path"
14250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14251    unix_path=`$CYGPATH -u "$windows_path"`
14252    new_path="$unix_path"
14253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14255    new_path="$unix_path"
14256  fi
14257
14258  if test "x$path" != "x$new_path"; then
14259    BOOT_JDK="$new_path"
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14261$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14262  fi
14263
14264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14266
14267  else
14268    # We're on a posix platform. Hooray! :)
14269    path="$BOOT_JDK"
14270
14271    if test ! -f "$path" && test ! -d "$path"; then
14272      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14273    fi
14274
14275    has_space=`$ECHO "$path" | $GREP " "`
14276    if test "x$has_space" != x; then
14277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14279      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14280    fi
14281  fi
14282
14283              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14284$as_echo_n "checking for Boot JDK... " >&6; }
14285              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14286$as_echo "$BOOT_JDK" >&6; }
14287              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14288$as_echo_n "checking Boot JDK version... " >&6; }
14289              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14290              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14291$as_echo "$BOOT_JDK_VERSION" >&6; }
14292            fi # end check jdk version
14293          fi # end check rt.jar
14294        fi # end check javac
14295      fi # end check java
14296    fi # end check boot jdk found
14297  fi
14298
14299    done
14300  fi
14301
14302
14303    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14304    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14305      # Do we have a bin/java?
14306      if test ! -x "$BOOT_JDK/bin/java"; then
14307        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14308$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14309        BOOT_JDK_FOUND=no
14310      else
14311        # Do we have a bin/javac?
14312        if test ! -x "$BOOT_JDK/bin/javac"; then
14313          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14315          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14316$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14317          BOOT_JDK_FOUND=no
14318        else
14319          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14320          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14321            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14323            BOOT_JDK_FOUND=no
14324          else
14325            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14326            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14327
14328            # Extra M4 quote needed to protect [] in grep expression.
14329            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14330            if test "x$FOUND_VERSION_78" = x; then
14331              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14333              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14334$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14335              BOOT_JDK_FOUND=no
14336            else
14337              # We're done! :-)
14338              BOOT_JDK_FOUND=yes
14339
14340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14341
14342  # Input might be given as Windows format, start by converting to
14343  # unix format.
14344  path="$BOOT_JDK"
14345  new_path=`$CYGPATH -u "$path"`
14346
14347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14350  # "foo.exe" is OK but "foo" is an error.
14351  #
14352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14353  # It is also a way to make sure we got the proper file name for the real test later on.
14354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14355  if test "x$test_shortpath" = x; then
14356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14358    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14359  fi
14360
14361  # Call helper function which possibly converts this using DOS-style short mode.
14362  # If so, the updated path is stored in $new_path.
14363
14364  input_path="$new_path"
14365  # Check if we need to convert this using DOS-style short mode. If the path
14366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14367  # take no chances and rewrite it.
14368  # Note: m4 eats our [], so we need to use [ and ] instead.
14369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14370  if test "x$has_forbidden_chars" != x; then
14371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14375      # Going to short mode and back again did indeed matter. Since short mode is
14376      # case insensitive, let's make it lowercase to improve readability.
14377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14378      # Now convert it back to Unix-stile (cygpath)
14379      input_path=`$CYGPATH -u "$shortmode_path"`
14380      new_path="$input_path"
14381    fi
14382  fi
14383
14384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14385  if test "x$test_cygdrive_prefix" = x; then
14386    # As a simple fix, exclude /usr/bin since it's not a real path.
14387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14389      # a path prefixed by /cygdrive for fixpath to work.
14390      new_path="$CYGWIN_ROOT_PATH$input_path"
14391    fi
14392  fi
14393
14394
14395  if test "x$path" != "x$new_path"; then
14396    BOOT_JDK="$new_path"
14397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14398$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14399  fi
14400
14401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14402
14403  path="$BOOT_JDK"
14404  has_colon=`$ECHO $path | $GREP ^.:`
14405  new_path="$path"
14406  if test "x$has_colon" = x; then
14407    # Not in mixed or Windows style, start by that.
14408    new_path=`cmd //c echo $path`
14409  fi
14410
14411
14412  input_path="$new_path"
14413  # Check if we need to convert this using DOS-style short mode. If the path
14414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14415  # take no chances and rewrite it.
14416  # Note: m4 eats our [], so we need to use [ and ] instead.
14417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14418  if test "x$has_forbidden_chars" != x; then
14419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14421  fi
14422
14423
14424  windows_path="$new_path"
14425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14426    unix_path=`$CYGPATH -u "$windows_path"`
14427    new_path="$unix_path"
14428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14430    new_path="$unix_path"
14431  fi
14432
14433  if test "x$path" != "x$new_path"; then
14434    BOOT_JDK="$new_path"
14435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14436$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14437  fi
14438
14439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14441
14442  else
14443    # We're on a posix platform. Hooray! :)
14444    path="$BOOT_JDK"
14445
14446    if test ! -f "$path" && test ! -d "$path"; then
14447      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14448    fi
14449
14450    has_space=`$ECHO "$path" | $GREP " "`
14451    if test "x$has_space" != x; then
14452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14453$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14454      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14455    fi
14456  fi
14457
14458              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14459$as_echo_n "checking for Boot JDK... " >&6; }
14460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14461$as_echo "$BOOT_JDK" >&6; }
14462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14463$as_echo_n "checking Boot JDK version... " >&6; }
14464              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14466$as_echo "$BOOT_JDK_VERSION" >&6; }
14467            fi # end check jdk version
14468          fi # end check rt.jar
14469        fi # end check javac
14470      fi # end check java
14471    fi # end check boot jdk found
14472  fi
14473
14474
14475  if test "x$BOOT_JDK_FOUND" = xno; then
14476    # Now execute the test
14477
14478  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14479  BOOT_JDK_SUFFIX="/Contents/Home"
14480  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14481  if test "x$ALL_JDKS_FOUND" != x; then
14482    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14483
14484  if test "x$BOOT_JDK_FOUND" = xno; then
14485    # Now execute the test
14486
14487        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14488        if test -d "$BOOT_JDK"; then
14489          BOOT_JDK_FOUND=maybe
14490          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14491$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14492        fi
14493
14494
14495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14497      # Do we have a bin/java?
14498      if test ! -x "$BOOT_JDK/bin/java"; then
14499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14501        BOOT_JDK_FOUND=no
14502      else
14503        # Do we have a bin/javac?
14504        if test ! -x "$BOOT_JDK/bin/javac"; then
14505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14509          BOOT_JDK_FOUND=no
14510        else
14511          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14512          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14515            BOOT_JDK_FOUND=no
14516          else
14517            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14518            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14519
14520            # Extra M4 quote needed to protect [] in grep expression.
14521            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14522            if test "x$FOUND_VERSION_78" = x; then
14523              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14525              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14526$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14527              BOOT_JDK_FOUND=no
14528            else
14529              # We're done! :-)
14530              BOOT_JDK_FOUND=yes
14531
14532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14533
14534  # Input might be given as Windows format, start by converting to
14535  # unix format.
14536  path="$BOOT_JDK"
14537  new_path=`$CYGPATH -u "$path"`
14538
14539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14542  # "foo.exe" is OK but "foo" is an error.
14543  #
14544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14545  # It is also a way to make sure we got the proper file name for the real test later on.
14546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14547  if test "x$test_shortpath" = x; then
14548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14551  fi
14552
14553  # Call helper function which possibly converts this using DOS-style short mode.
14554  # If so, the updated path is stored in $new_path.
14555
14556  input_path="$new_path"
14557  # Check if we need to convert this using DOS-style short mode. If the path
14558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14559  # take no chances and rewrite it.
14560  # Note: m4 eats our [], so we need to use [ and ] instead.
14561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14562  if test "x$has_forbidden_chars" != x; then
14563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14567      # Going to short mode and back again did indeed matter. Since short mode is
14568      # case insensitive, let's make it lowercase to improve readability.
14569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14570      # Now convert it back to Unix-stile (cygpath)
14571      input_path=`$CYGPATH -u "$shortmode_path"`
14572      new_path="$input_path"
14573    fi
14574  fi
14575
14576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14577  if test "x$test_cygdrive_prefix" = x; then
14578    # As a simple fix, exclude /usr/bin since it's not a real path.
14579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14581      # a path prefixed by /cygdrive for fixpath to work.
14582      new_path="$CYGWIN_ROOT_PATH$input_path"
14583    fi
14584  fi
14585
14586
14587  if test "x$path" != "x$new_path"; then
14588    BOOT_JDK="$new_path"
14589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14591  fi
14592
14593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14594
14595  path="$BOOT_JDK"
14596  has_colon=`$ECHO $path | $GREP ^.:`
14597  new_path="$path"
14598  if test "x$has_colon" = x; then
14599    # Not in mixed or Windows style, start by that.
14600    new_path=`cmd //c echo $path`
14601  fi
14602
14603
14604  input_path="$new_path"
14605  # Check if we need to convert this using DOS-style short mode. If the path
14606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14607  # take no chances and rewrite it.
14608  # Note: m4 eats our [], so we need to use [ and ] instead.
14609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14610  if test "x$has_forbidden_chars" != x; then
14611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14613  fi
14614
14615
14616  windows_path="$new_path"
14617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14618    unix_path=`$CYGPATH -u "$windows_path"`
14619    new_path="$unix_path"
14620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14622    new_path="$unix_path"
14623  fi
14624
14625  if test "x$path" != "x$new_path"; then
14626    BOOT_JDK="$new_path"
14627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14629  fi
14630
14631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14633
14634  else
14635    # We're on a posix platform. Hooray! :)
14636    path="$BOOT_JDK"
14637
14638    if test ! -f "$path" && test ! -d "$path"; then
14639      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14640    fi
14641
14642    has_space=`$ECHO "$path" | $GREP " "`
14643    if test "x$has_space" != x; then
14644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14646      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14647    fi
14648  fi
14649
14650              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14651$as_echo_n "checking for Boot JDK... " >&6; }
14652              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14653$as_echo "$BOOT_JDK" >&6; }
14654              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14655$as_echo_n "checking Boot JDK version... " >&6; }
14656              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14658$as_echo "$BOOT_JDK_VERSION" >&6; }
14659            fi # end check jdk version
14660          fi # end check rt.jar
14661        fi # end check javac
14662      fi # end check java
14663    fi # end check boot jdk found
14664  fi
14665
14666    done
14667  fi
14668
14669
14670    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14671    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14672      # Do we have a bin/java?
14673      if test ! -x "$BOOT_JDK/bin/java"; then
14674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14676        BOOT_JDK_FOUND=no
14677      else
14678        # Do we have a bin/javac?
14679        if test ! -x "$BOOT_JDK/bin/javac"; then
14680          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14681$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14682          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14683$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14684          BOOT_JDK_FOUND=no
14685        else
14686          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14687          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14688            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14690            BOOT_JDK_FOUND=no
14691          else
14692            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14693            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14694
14695            # Extra M4 quote needed to protect [] in grep expression.
14696            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14697            if test "x$FOUND_VERSION_78" = x; then
14698              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14700              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14701$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14702              BOOT_JDK_FOUND=no
14703            else
14704              # We're done! :-)
14705              BOOT_JDK_FOUND=yes
14706
14707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14708
14709  # Input might be given as Windows format, start by converting to
14710  # unix format.
14711  path="$BOOT_JDK"
14712  new_path=`$CYGPATH -u "$path"`
14713
14714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14717  # "foo.exe" is OK but "foo" is an error.
14718  #
14719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14720  # It is also a way to make sure we got the proper file name for the real test later on.
14721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14722  if test "x$test_shortpath" = x; then
14723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14724$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14725    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14726  fi
14727
14728  # Call helper function which possibly converts this using DOS-style short mode.
14729  # If so, the updated path is stored in $new_path.
14730
14731  input_path="$new_path"
14732  # Check if we need to convert this using DOS-style short mode. If the path
14733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14734  # take no chances and rewrite it.
14735  # Note: m4 eats our [], so we need to use [ and ] instead.
14736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14737  if test "x$has_forbidden_chars" != x; then
14738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14742      # Going to short mode and back again did indeed matter. Since short mode is
14743      # case insensitive, let's make it lowercase to improve readability.
14744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14745      # Now convert it back to Unix-stile (cygpath)
14746      input_path=`$CYGPATH -u "$shortmode_path"`
14747      new_path="$input_path"
14748    fi
14749  fi
14750
14751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14752  if test "x$test_cygdrive_prefix" = x; then
14753    # As a simple fix, exclude /usr/bin since it's not a real path.
14754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14756      # a path prefixed by /cygdrive for fixpath to work.
14757      new_path="$CYGWIN_ROOT_PATH$input_path"
14758    fi
14759  fi
14760
14761
14762  if test "x$path" != "x$new_path"; then
14763    BOOT_JDK="$new_path"
14764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14766  fi
14767
14768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14769
14770  path="$BOOT_JDK"
14771  has_colon=`$ECHO $path | $GREP ^.:`
14772  new_path="$path"
14773  if test "x$has_colon" = x; then
14774    # Not in mixed or Windows style, start by that.
14775    new_path=`cmd //c echo $path`
14776  fi
14777
14778
14779  input_path="$new_path"
14780  # Check if we need to convert this using DOS-style short mode. If the path
14781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14782  # take no chances and rewrite it.
14783  # Note: m4 eats our [], so we need to use [ and ] instead.
14784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14785  if test "x$has_forbidden_chars" != x; then
14786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14788  fi
14789
14790
14791  windows_path="$new_path"
14792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14793    unix_path=`$CYGPATH -u "$windows_path"`
14794    new_path="$unix_path"
14795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14797    new_path="$unix_path"
14798  fi
14799
14800  if test "x$path" != "x$new_path"; then
14801    BOOT_JDK="$new_path"
14802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14804  fi
14805
14806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14808
14809  else
14810    # We're on a posix platform. Hooray! :)
14811    path="$BOOT_JDK"
14812
14813    if test ! -f "$path" && test ! -d "$path"; then
14814      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14815    fi
14816
14817    has_space=`$ECHO "$path" | $GREP " "`
14818    if test "x$has_space" != x; then
14819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14821      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14822    fi
14823  fi
14824
14825              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14826$as_echo_n "checking for Boot JDK... " >&6; }
14827              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14828$as_echo "$BOOT_JDK" >&6; }
14829              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14830$as_echo_n "checking Boot JDK version... " >&6; }
14831              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14832              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14833$as_echo "$BOOT_JDK_VERSION" >&6; }
14834            fi # end check jdk version
14835          fi # end check rt.jar
14836        fi # end check javac
14837      fi # end check java
14838    fi # end check boot jdk found
14839  fi
14840
14841  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14842
14843  if test "x$BOOT_JDK_FOUND" = xno; then
14844    # Now execute the test
14845
14846  BOOT_JDK_PREFIX="/usr/lib/jvm"
14847  BOOT_JDK_SUFFIX=""
14848  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14849  if test "x$ALL_JDKS_FOUND" != x; then
14850    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14851
14852  if test "x$BOOT_JDK_FOUND" = xno; then
14853    # Now execute the test
14854
14855        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14856        if test -d "$BOOT_JDK"; then
14857          BOOT_JDK_FOUND=maybe
14858          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14859$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14860        fi
14861
14862
14863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14865      # Do we have a bin/java?
14866      if test ! -x "$BOOT_JDK/bin/java"; then
14867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14869        BOOT_JDK_FOUND=no
14870      else
14871        # Do we have a bin/javac?
14872        if test ! -x "$BOOT_JDK/bin/javac"; then
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14877          BOOT_JDK_FOUND=no
14878        else
14879          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14880          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14881            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14882$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14883            BOOT_JDK_FOUND=no
14884          else
14885            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14887
14888            # Extra M4 quote needed to protect [] in grep expression.
14889            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14890            if test "x$FOUND_VERSION_78" = x; then
14891              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14893              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14894$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14895              BOOT_JDK_FOUND=no
14896            else
14897              # We're done! :-)
14898              BOOT_JDK_FOUND=yes
14899
14900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14901
14902  # Input might be given as Windows format, start by converting to
14903  # unix format.
14904  path="$BOOT_JDK"
14905  new_path=`$CYGPATH -u "$path"`
14906
14907  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14908  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14909  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14910  # "foo.exe" is OK but "foo" is an error.
14911  #
14912  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14913  # It is also a way to make sure we got the proper file name for the real test later on.
14914  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14915  if test "x$test_shortpath" = x; then
14916    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14917$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14918    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14919  fi
14920
14921  # Call helper function which possibly converts this using DOS-style short mode.
14922  # If so, the updated path is stored in $new_path.
14923
14924  input_path="$new_path"
14925  # Check if we need to convert this using DOS-style short mode. If the path
14926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14927  # take no chances and rewrite it.
14928  # Note: m4 eats our [], so we need to use [ and ] instead.
14929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14930  if test "x$has_forbidden_chars" != x; then
14931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14935      # Going to short mode and back again did indeed matter. Since short mode is
14936      # case insensitive, let's make it lowercase to improve readability.
14937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14938      # Now convert it back to Unix-stile (cygpath)
14939      input_path=`$CYGPATH -u "$shortmode_path"`
14940      new_path="$input_path"
14941    fi
14942  fi
14943
14944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14945  if test "x$test_cygdrive_prefix" = x; then
14946    # As a simple fix, exclude /usr/bin since it's not a real path.
14947    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14949      # a path prefixed by /cygdrive for fixpath to work.
14950      new_path="$CYGWIN_ROOT_PATH$input_path"
14951    fi
14952  fi
14953
14954
14955  if test "x$path" != "x$new_path"; then
14956    BOOT_JDK="$new_path"
14957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14958$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14959  fi
14960
14961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14962
14963  path="$BOOT_JDK"
14964  has_colon=`$ECHO $path | $GREP ^.:`
14965  new_path="$path"
14966  if test "x$has_colon" = x; then
14967    # Not in mixed or Windows style, start by that.
14968    new_path=`cmd //c echo $path`
14969  fi
14970
14971
14972  input_path="$new_path"
14973  # Check if we need to convert this using DOS-style short mode. If the path
14974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14975  # take no chances and rewrite it.
14976  # Note: m4 eats our [], so we need to use [ and ] instead.
14977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14978  if test "x$has_forbidden_chars" != x; then
14979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14981  fi
14982
14983
14984  windows_path="$new_path"
14985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14986    unix_path=`$CYGPATH -u "$windows_path"`
14987    new_path="$unix_path"
14988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14990    new_path="$unix_path"
14991  fi
14992
14993  if test "x$path" != "x$new_path"; then
14994    BOOT_JDK="$new_path"
14995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14997  fi
14998
14999  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15000  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15001
15002  else
15003    # We're on a posix platform. Hooray! :)
15004    path="$BOOT_JDK"
15005
15006    if test ! -f "$path" && test ! -d "$path"; then
15007      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15008    fi
15009
15010    has_space=`$ECHO "$path" | $GREP " "`
15011    if test "x$has_space" != x; then
15012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15013$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15014      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15015    fi
15016  fi
15017
15018              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15019$as_echo_n "checking for Boot JDK... " >&6; }
15020              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15021$as_echo "$BOOT_JDK" >&6; }
15022              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15023$as_echo_n "checking Boot JDK version... " >&6; }
15024              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15025              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15026$as_echo "$BOOT_JDK_VERSION" >&6; }
15027            fi # end check jdk version
15028          fi # end check rt.jar
15029        fi # end check javac
15030      fi # end check java
15031    fi # end check boot jdk found
15032  fi
15033
15034    done
15035  fi
15036
15037
15038    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15039    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15040      # Do we have a bin/java?
15041      if test ! -x "$BOOT_JDK/bin/java"; then
15042        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15044        BOOT_JDK_FOUND=no
15045      else
15046        # Do we have a bin/javac?
15047        if test ! -x "$BOOT_JDK/bin/javac"; then
15048          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15050          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15051$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15052          BOOT_JDK_FOUND=no
15053        else
15054          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15055          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15056            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15058            BOOT_JDK_FOUND=no
15059          else
15060            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15062
15063            # Extra M4 quote needed to protect [] in grep expression.
15064            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15065            if test "x$FOUND_VERSION_78" = x; then
15066              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15068              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15069$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15070              BOOT_JDK_FOUND=no
15071            else
15072              # We're done! :-)
15073              BOOT_JDK_FOUND=yes
15074
15075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15076
15077  # Input might be given as Windows format, start by converting to
15078  # unix format.
15079  path="$BOOT_JDK"
15080  new_path=`$CYGPATH -u "$path"`
15081
15082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15085  # "foo.exe" is OK but "foo" is an error.
15086  #
15087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15088  # It is also a way to make sure we got the proper file name for the real test later on.
15089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15090  if test "x$test_shortpath" = x; then
15091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15093    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15094  fi
15095
15096  # Call helper function which possibly converts this using DOS-style short mode.
15097  # If so, the updated path is stored in $new_path.
15098
15099  input_path="$new_path"
15100  # Check if we need to convert this using DOS-style short mode. If the path
15101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15102  # take no chances and rewrite it.
15103  # Note: m4 eats our [], so we need to use [ and ] instead.
15104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15105  if test "x$has_forbidden_chars" != x; then
15106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15110      # Going to short mode and back again did indeed matter. Since short mode is
15111      # case insensitive, let's make it lowercase to improve readability.
15112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15113      # Now convert it back to Unix-stile (cygpath)
15114      input_path=`$CYGPATH -u "$shortmode_path"`
15115      new_path="$input_path"
15116    fi
15117  fi
15118
15119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15120  if test "x$test_cygdrive_prefix" = x; then
15121    # As a simple fix, exclude /usr/bin since it's not a real path.
15122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15124      # a path prefixed by /cygdrive for fixpath to work.
15125      new_path="$CYGWIN_ROOT_PATH$input_path"
15126    fi
15127  fi
15128
15129
15130  if test "x$path" != "x$new_path"; then
15131    BOOT_JDK="$new_path"
15132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15134  fi
15135
15136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15137
15138  path="$BOOT_JDK"
15139  has_colon=`$ECHO $path | $GREP ^.:`
15140  new_path="$path"
15141  if test "x$has_colon" = x; then
15142    # Not in mixed or Windows style, start by that.
15143    new_path=`cmd //c echo $path`
15144  fi
15145
15146
15147  input_path="$new_path"
15148  # Check if we need to convert this using DOS-style short mode. If the path
15149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15150  # take no chances and rewrite it.
15151  # Note: m4 eats our [], so we need to use [ and ] instead.
15152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15153  if test "x$has_forbidden_chars" != x; then
15154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15156  fi
15157
15158
15159  windows_path="$new_path"
15160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15161    unix_path=`$CYGPATH -u "$windows_path"`
15162    new_path="$unix_path"
15163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15165    new_path="$unix_path"
15166  fi
15167
15168  if test "x$path" != "x$new_path"; then
15169    BOOT_JDK="$new_path"
15170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15172  fi
15173
15174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15176
15177  else
15178    # We're on a posix platform. Hooray! :)
15179    path="$BOOT_JDK"
15180
15181    if test ! -f "$path" && test ! -d "$path"; then
15182      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15183    fi
15184
15185    has_space=`$ECHO "$path" | $GREP " "`
15186    if test "x$has_space" != x; then
15187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15189      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15190    fi
15191  fi
15192
15193              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15194$as_echo_n "checking for Boot JDK... " >&6; }
15195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15196$as_echo "$BOOT_JDK" >&6; }
15197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15198$as_echo_n "checking Boot JDK version... " >&6; }
15199              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15201$as_echo "$BOOT_JDK_VERSION" >&6; }
15202            fi # end check jdk version
15203          fi # end check rt.jar
15204        fi # end check javac
15205      fi # end check java
15206    fi # end check boot jdk found
15207  fi
15208
15209  fi
15210
15211
15212    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15213    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15214      # Do we have a bin/java?
15215      if test ! -x "$BOOT_JDK/bin/java"; then
15216        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15218        BOOT_JDK_FOUND=no
15219      else
15220        # Do we have a bin/javac?
15221        if test ! -x "$BOOT_JDK/bin/javac"; then
15222          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15224          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15225$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15226          BOOT_JDK_FOUND=no
15227        else
15228          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15229          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15232            BOOT_JDK_FOUND=no
15233          else
15234            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15236
15237            # Extra M4 quote needed to protect [] in grep expression.
15238            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15239            if test "x$FOUND_VERSION_78" = x; then
15240              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15242              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15243$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15244              BOOT_JDK_FOUND=no
15245            else
15246              # We're done! :-)
15247              BOOT_JDK_FOUND=yes
15248
15249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15250
15251  # Input might be given as Windows format, start by converting to
15252  # unix format.
15253  path="$BOOT_JDK"
15254  new_path=`$CYGPATH -u "$path"`
15255
15256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15259  # "foo.exe" is OK but "foo" is an error.
15260  #
15261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15262  # It is also a way to make sure we got the proper file name for the real test later on.
15263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15264  if test "x$test_shortpath" = x; then
15265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15267    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15268  fi
15269
15270  # Call helper function which possibly converts this using DOS-style short mode.
15271  # If so, the updated path is stored in $new_path.
15272
15273  input_path="$new_path"
15274  # Check if we need to convert this using DOS-style short mode. If the path
15275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15276  # take no chances and rewrite it.
15277  # Note: m4 eats our [], so we need to use [ and ] instead.
15278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15279  if test "x$has_forbidden_chars" != x; then
15280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15284      # Going to short mode and back again did indeed matter. Since short mode is
15285      # case insensitive, let's make it lowercase to improve readability.
15286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15287      # Now convert it back to Unix-stile (cygpath)
15288      input_path=`$CYGPATH -u "$shortmode_path"`
15289      new_path="$input_path"
15290    fi
15291  fi
15292
15293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15294  if test "x$test_cygdrive_prefix" = x; then
15295    # As a simple fix, exclude /usr/bin since it's not a real path.
15296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15298      # a path prefixed by /cygdrive for fixpath to work.
15299      new_path="$CYGWIN_ROOT_PATH$input_path"
15300    fi
15301  fi
15302
15303
15304  if test "x$path" != "x$new_path"; then
15305    BOOT_JDK="$new_path"
15306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15308  fi
15309
15310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15311
15312  path="$BOOT_JDK"
15313  has_colon=`$ECHO $path | $GREP ^.:`
15314  new_path="$path"
15315  if test "x$has_colon" = x; then
15316    # Not in mixed or Windows style, start by that.
15317    new_path=`cmd //c echo $path`
15318  fi
15319
15320
15321  input_path="$new_path"
15322  # Check if we need to convert this using DOS-style short mode. If the path
15323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15324  # take no chances and rewrite it.
15325  # Note: m4 eats our [], so we need to use [ and ] instead.
15326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15327  if test "x$has_forbidden_chars" != x; then
15328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15330  fi
15331
15332
15333  windows_path="$new_path"
15334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15335    unix_path=`$CYGPATH -u "$windows_path"`
15336    new_path="$unix_path"
15337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15339    new_path="$unix_path"
15340  fi
15341
15342  if test "x$path" != "x$new_path"; then
15343    BOOT_JDK="$new_path"
15344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15346  fi
15347
15348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15350
15351  else
15352    # We're on a posix platform. Hooray! :)
15353    path="$BOOT_JDK"
15354
15355    if test ! -f "$path" && test ! -d "$path"; then
15356      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15357    fi
15358
15359    has_space=`$ECHO "$path" | $GREP " "`
15360    if test "x$has_space" != x; then
15361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15364    fi
15365  fi
15366
15367              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15368$as_echo_n "checking for Boot JDK... " >&6; }
15369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15370$as_echo "$BOOT_JDK" >&6; }
15371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15372$as_echo_n "checking Boot JDK version... " >&6; }
15373              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15375$as_echo "$BOOT_JDK_VERSION" >&6; }
15376            fi # end check jdk version
15377          fi # end check rt.jar
15378        fi # end check javac
15379      fi # end check java
15380    fi # end check boot jdk found
15381  fi
15382
15383
15384# If we haven't found anything yet, we've truly lost. Give up.
15385if test "x$BOOT_JDK_FOUND" = xno; then
15386
15387    # Print a helpful message on how to acquire the necessary build dependency.
15388    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15389    MISSING_DEPENDENCY=openjdk
15390    PKGHANDLER_COMMAND=
15391
15392    case $PKGHANDLER in
15393	apt-get)
15394                apt_help     $MISSING_DEPENDENCY ;;
15395    yum)
15396                yum_help     $MISSING_DEPENDENCY ;;
15397	port)
15398                port_help    $MISSING_DEPENDENCY ;;
15399	pkgutil)
15400                pkgutil_help $MISSING_DEPENDENCY ;;
15401	pkgadd)
15402                pkgadd_help  $MISSING_DEPENDENCY ;;
15403    * )
15404      break ;;
15405    esac
15406
15407    if test "x$PKGHANDLER_COMMAND" != x; then
15408        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15409    fi
15410
15411  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15412$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15414$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15415  as_fn_error $? "Cannot continue" "$LINENO" 5
15416fi
15417
15418# Setup proper paths for what we found
15419BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15420if test ! -f "$BOOT_RTJAR"; then
15421    # On MacOSX it is called classes.jar
15422    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15423    if test -f "$BOOT_RTJAR"; then
15424      # Remove the ..
15425      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15426    fi
15427fi
15428BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15429BOOT_JDK="$BOOT_JDK"
15430
15431
15432
15433
15434# Setup tools from the Boot JDK.
15435
15436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15437$as_echo_n "checking for java in Boot JDK... " >&6; }
15438  JAVA=$BOOT_JDK/bin/java
15439  if test ! -x $JAVA; then
15440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15441$as_echo "not found" >&6; }
15442      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15443$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15444      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15445  fi
15446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15447$as_echo "ok" >&6; }
15448
15449
15450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15451$as_echo_n "checking for javac in Boot JDK... " >&6; }
15452  JAVAC=$BOOT_JDK/bin/javac
15453  if test ! -x $JAVAC; then
15454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15455$as_echo "not found" >&6; }
15456      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15457$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15458      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15459  fi
15460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15461$as_echo "ok" >&6; }
15462
15463
15464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15465$as_echo_n "checking for javah in Boot JDK... " >&6; }
15466  JAVAH=$BOOT_JDK/bin/javah
15467  if test ! -x $JAVAH; then
15468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15469$as_echo "not found" >&6; }
15470      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15471$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15472      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15473  fi
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15475$as_echo "ok" >&6; }
15476
15477
15478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15479$as_echo_n "checking for javap in Boot JDK... " >&6; }
15480  JAVAP=$BOOT_JDK/bin/javap
15481  if test ! -x $JAVAP; then
15482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15483$as_echo "not found" >&6; }
15484      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15485$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15486      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15487  fi
15488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15489$as_echo "ok" >&6; }
15490
15491
15492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15493$as_echo_n "checking for jar in Boot JDK... " >&6; }
15494  JAR=$BOOT_JDK/bin/jar
15495  if test ! -x $JAR; then
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15497$as_echo "not found" >&6; }
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15499$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15500      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15501  fi
15502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15503$as_echo "ok" >&6; }
15504
15505
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15507$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15508  RMIC=$BOOT_JDK/bin/rmic
15509  if test ! -x $RMIC; then
15510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15511$as_echo "not found" >&6; }
15512      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15513$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15514      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15515  fi
15516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15517$as_echo "ok" >&6; }
15518
15519
15520  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15521$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15522  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15523  if test ! -x $NATIVE2ASCII; then
15524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15525$as_echo "not found" >&6; }
15526      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15527$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15528      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15529  fi
15530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15531$as_echo "ok" >&6; }
15532
15533
15534# Finally, set some other options...
15535
15536# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15537BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15538
15539
15540
15541
15542##############################################################################
15543#
15544# Specify options for anything that is run with the Boot JDK.
15545#
15546
15547# Check whether --with-boot-jdk-jvmargs was given.
15548if test "${with_boot_jdk_jvmargs+set}" = set; then :
15549  withval=$with_boot_jdk_jvmargs;
15550fi
15551
15552
15553if test "x$with_boot_jdk_jvmargs" = x; then
15554    # Not all JVM:s accept the same arguments on the command line.
15555    # OpenJDK specific increase in thread stack for JDK build,
15556    # well more specifically, when running javac.
15557    if test "x$BUILD_NUM_BITS" = x32; then
15558       STACK_SIZE=768
15559    else
15560       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15561       # since 64-bit pointers are pushed on the stach. Apparently, we need
15562       # to increase the stack space when javacing the JDK....
15563       STACK_SIZE=1536
15564    fi
15565
15566    # Minimum amount of heap memory.
15567
15568    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15569    # If so, then append -Xms64M to boot_jdk_jvmargs
15570    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15571    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15572    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15573        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15574    fi
15575
15576    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15577        # Why does macosx need more heap? Its the huge JDK batch.
15578
15579    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15580    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15581    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15582    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15583    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15584        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15585    fi
15586
15587    else
15588
15589    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15590    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15591    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15592    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15593    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15594        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15595    fi
15596
15597    fi
15598    # When is adding -client something that speeds up the JVM?
15599    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15600
15601    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15602    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15603    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15604    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15605    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15606        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15607    fi
15608
15609
15610    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15611    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15612    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15613    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15614    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15615        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15616    fi
15617
15618
15619    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15620    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15621    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15622    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15623    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15624        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15625    fi
15626
15627    # Disable special log output when a debug build is used as Boot JDK...
15628
15629    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15630    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15631    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15632    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15633    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15634        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15635    fi
15636
15637fi
15638
15639BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15640
15641
15642
15643###############################################################################
15644#
15645# Configure the sources to use. We can add or override individual directories.
15646#
15647###############################################################################
15648
15649
15650
15651# Where are the sources. Any of these can be overridden
15652# using --with-override-corba and the likes.
15653LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15654CORBA_TOPDIR="$SRC_ROOT/corba"
15655JAXP_TOPDIR="$SRC_ROOT/jaxp"
15656JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15657HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15658JDK_TOPDIR="$SRC_ROOT/jdk"
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668###############################################################################
15669#
15670# Pickup additional source for a component from outside of the source root
15671# or override source for a component.
15672#
15673
15674# Check whether --with-add-source-root was given.
15675if test "${with_add_source_root+set}" = set; then :
15676  withval=$with_add_source_root;
15677fi
15678
15679
15680
15681# Check whether --with-override-source-root was given.
15682if test "${with_override_source_root+set}" = set; then :
15683  withval=$with_override_source_root;
15684fi
15685
15686
15687
15688# Check whether --with-adds-and-overrides was given.
15689if test "${with_adds_and_overrides+set}" = set; then :
15690  withval=$with_adds_and_overrides;
15691fi
15692
15693
15694if test "x$with_adds_and_overrides" != x; then
15695    with_add_source_root="$with_adds_and_overrides/adds"
15696    with_override_source_root="$with_adds_and_overrides/overrides"
15697fi
15698
15699if test "x$with_add_source_root" != x; then
15700    if ! test -d $with_add_source_root; then
15701       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15702    fi
15703    CURDIR="$PWD"
15704    cd "$with_add_source_root"
15705    ADD_SRC_ROOT="`pwd`"
15706    cd "$CURDIR"
15707    # Verify that the addon source root does not have any root makefiles.
15708    # If it does, then it is usually an error, prevent this.
15709    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15710       test -f $with_add_source_root/langtools/make/Makefile; then
15711        as_fn_error $? "Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources." "$LINENO" 5
15712    fi
15713    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15714       test -f $with_add_source_root/corba/make/Makefile; then
15715        as_fn_error $? "Your add source root seems to contain a full corba repo! An add source root should only contain additional sources." "$LINENO" 5
15716    fi
15717    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15718       test -f $with_add_source_root/jaxp/make/Makefile; then
15719        as_fn_error $? "Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources." "$LINENO" 5
15720    fi
15721    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15722       test -f $with_add_source_root/jaxws/make/Makefile; then
15723        as_fn_error $? "Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources." "$LINENO" 5
15724    fi
15725    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15726       test -f $with_add_source_root/hotspot/make/Makefile; then
15727        as_fn_error $? "Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources." "$LINENO" 5
15728    fi
15729    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15730       test -f $with_add_source_root/jdk/make/Makefile; then
15731        as_fn_error $? "Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources." "$LINENO" 5
15732    fi
15733fi
15734
15735
15736if test "x$with_override_source_root" != x; then
15737    if ! test -d $with_override_source_root; then
15738       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15739    fi
15740    CURDIR="$PWD"
15741    cd "$with_override_source_root"
15742    OVERRIDE_SRC_ROOT="`pwd`"
15743    cd "$CURDIR"
15744    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15745       test -f $with_override_source_root/langtools/make/Makefile; then
15746        as_fn_error $? "Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override." "$LINENO" 5
15747    fi
15748    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15749       test -f $with_override_source_root/corba/make/Makefile; then
15750        as_fn_error $? "Your override source root seems to contain a full corba repo! An override source root should only contain sources that override." "$LINENO" 5
15751    fi
15752    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15753       test -f $with_override_source_root/jaxp/make/Makefile; then
15754        as_fn_error $? "Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override." "$LINENO" 5
15755    fi
15756    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15757       test -f $with_override_source_root/jaxws/make/Makefile; then
15758        as_fn_error $? "Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override." "$LINENO" 5
15759    fi
15760    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15761       test -f $with_override_source_root/hotspot/make/Makefile; then
15762        as_fn_error $? "Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override." "$LINENO" 5
15763    fi
15764    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15765       test -f $with_override_source_root/jdk/make/Makefile; then
15766        as_fn_error $? "Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override." "$LINENO" 5
15767    fi
15768fi
15769
15770
15771###############################################################################
15772#
15773# Override a repo completely, this is used for example when you have 3 small
15774# development sandboxes of the langtools sources and want to avoid having 3 full
15775# OpenJDK sources checked out on disk.
15776#
15777# Assuming that the 3 langtools sandboxes are located here:
15778# /home/fredrik/sandbox1/langtools
15779# /home/fredrik/sandbox2/langtools
15780# /home/fredrik/sandbox3/langtools
15781#
15782# From the source root you create build subdirs manually:
15783#     mkdir -p build1 build2 build3
15784# in each build directory run:
15785#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15786#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15787#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15788#
15789
15790
15791# Check whether --with-override-langtools was given.
15792if test "${with_override_langtools+set}" = set; then :
15793  withval=$with_override_langtools;
15794fi
15795
15796
15797
15798# Check whether --with-override-corba was given.
15799if test "${with_override_corba+set}" = set; then :
15800  withval=$with_override_corba;
15801fi
15802
15803
15804
15805# Check whether --with-override-jaxp was given.
15806if test "${with_override_jaxp+set}" = set; then :
15807  withval=$with_override_jaxp;
15808fi
15809
15810
15811
15812# Check whether --with-override-jaxws was given.
15813if test "${with_override_jaxws+set}" = set; then :
15814  withval=$with_override_jaxws;
15815fi
15816
15817
15818
15819# Check whether --with-override-hotspot was given.
15820if test "${with_override_hotspot+set}" = set; then :
15821  withval=$with_override_hotspot;
15822fi
15823
15824
15825
15826# Check whether --with-override-jdk was given.
15827if test "${with_override_jdk+set}" = set; then :
15828  withval=$with_override_jdk;
15829fi
15830
15831
15832if test "x$with_override_langtools" != x; then
15833    CURDIR="$PWD"
15834    cd "$with_override_langtools"
15835    LANGTOOLS_TOPDIR="`pwd`"
15836    cd "$CURDIR"
15837    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15838        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15839    fi
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15841$as_echo_n "checking if langtools should be overridden... " >&6; }
15842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15843$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15844fi
15845if test "x$with_override_corba" != x; then
15846    CURDIR="$PWD"
15847    cd "$with_override_corba"
15848    CORBA_TOPDIR="`pwd`"
15849    cd "$CURDIR"
15850    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15851        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15852    fi
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15854$as_echo_n "checking if corba should be overridden... " >&6; }
15855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15856$as_echo "yes with $CORBA_TOPDIR" >&6; }
15857fi
15858if test "x$with_override_jaxp" != x; then
15859    CURDIR="$PWD"
15860    cd "$with_override_jaxp"
15861    JAXP_TOPDIR="`pwd`"
15862    cd "$CURDIR"
15863    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15864        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15865    fi
15866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15867$as_echo_n "checking if jaxp should be overridden... " >&6; }
15868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15869$as_echo "yes with $JAXP_TOPDIR" >&6; }
15870fi
15871if test "x$with_override_jaxws" != x; then
15872    CURDIR="$PWD"
15873    cd "$with_override_jaxws"
15874    JAXWS_TOPDIR="`pwd`"
15875    cd "$CURDIR"
15876    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15877        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15878    fi
15879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15880$as_echo_n "checking if jaxws should be overridden... " >&6; }
15881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15882$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15883fi
15884if test "x$with_override_hotspot" != x; then
15885    CURDIR="$PWD"
15886    cd "$with_override_hotspot"
15887    HOTSPOT_TOPDIR="`pwd`"
15888    cd "$CURDIR"
15889    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15890       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15891        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15892    fi
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15894$as_echo_n "checking if hotspot should be overridden... " >&6; }
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15896$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15897fi
15898if test "x$with_override_jdk" != x; then
15899    CURDIR="$PWD"
15900    cd "$with_override_jdk"
15901    JDK_TOPDIR="`pwd`"
15902    cd "$CURDIR"
15903    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15904        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15905    fi
15906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15907$as_echo_n "checking if JDK should be overridden... " >&6; }
15908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15909$as_echo "yes with $JDK_TOPDIR" >&6; }
15910fi
15911
15912
15913
15914BUILD_OUTPUT="$OUTPUT_ROOT"
15915
15916
15917HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15918BUILD_HOTSPOT=true
15919
15920
15921
15922# Check whether --with-import-hotspot was given.
15923if test "${with_import_hotspot+set}" = set; then :
15924  withval=$with_import_hotspot;
15925fi
15926
15927if test "x$with_import_hotspot" != x; then
15928    CURDIR="$PWD"
15929    cd "$with_import_hotspot"
15930    HOTSPOT_DIST="`pwd`"
15931    cd "$CURDIR"
15932    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15933        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15934    fi
15935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15936$as_echo_n "checking if hotspot should be imported... " >&6; }
15937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15938$as_echo "yes from $HOTSPOT_DIST" >&6; }
15939    BUILD_HOTSPOT=false
15940fi
15941
15942JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15943
15944
15945###############################################################################
15946#
15947# Setup the toolchain (compilers etc), i.e. the tools that need to be
15948# cross-compilation aware.
15949#
15950###############################################################################
15951
15952
15953###############################################################################
15954#
15955# Configure the development tool paths and potential sysroot.
15956#
15957ac_ext=cpp
15958ac_cpp='$CXXCPP $CPPFLAGS'
15959ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15960ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15961ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15962
15963
15964# The option used to specify the target .o,.a or .so file.
15965# When compiling, how to specify the to be created object file.
15966CC_OUT_OPTION='-o$(SPACE)'
15967# When linking, how to specify the to be created executable.
15968EXE_OUT_OPTION='-o$(SPACE)'
15969# When linking, how to specify the to be created dynamically linkable library.
15970LD_OUT_OPTION='-o$(SPACE)'
15971# When archiving, how to specify the to be create static archive for object files.
15972AR_OUT_OPTION='rcs$(SPACE)'
15973
15974
15975
15976
15977
15978# Locate the actual tools
15979
15980if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15981
15982  # Store path to cygwin link.exe to help excluding it when searching for
15983  # VS linker. This must be done before changing the PATH when looking for VS.
15984  # Extract the first word of "link", so it can be a program name with args.
15985set dummy link; ac_word=$2
15986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15987$as_echo_n "checking for $ac_word... " >&6; }
15988if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15989  $as_echo_n "(cached) " >&6
15990else
15991  case $CYGWIN_LINK in
15992  [\\/]* | ?:[\\/]*)
15993  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15994  ;;
15995  *)
15996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15997for as_dir in $PATH
15998do
15999  IFS=$as_save_IFS
16000  test -z "$as_dir" && as_dir=.
16001    for ac_exec_ext in '' $ac_executable_extensions; do
16002  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16003    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16005    break 2
16006  fi
16007done
16008  done
16009IFS=$as_save_IFS
16010
16011  ;;
16012esac
16013fi
16014CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16015if test -n "$CYGWIN_LINK"; then
16016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16017$as_echo "$CYGWIN_LINK" >&6; }
16018else
16019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020$as_echo "no" >&6; }
16021fi
16022
16023
16024  if test "x$CYGWIN_LINK" != x; then
16025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16026$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16027    "$CYGWIN_LINK" --version > /dev/null
16028    if test $? -eq 0 ; then
16029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16030$as_echo "yes" >&6; }
16031    else
16032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16033$as_echo "no" >&6; }
16034      # This might be the VS linker. Don't exclude it later on.
16035      CYGWIN_LINK=""
16036    fi
16037  fi
16038
16039  # First-hand choice is to locate and run the vsvars bat file.
16040
16041  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16042    VCVARSFILE="vc/bin/vcvars32.bat"
16043  else
16044    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16045  fi
16046
16047  VS_ENV_CMD=""
16048  VS_ENV_ARGS=""
16049  if test "x$with_toolsdir" != x; then
16050
16051  if test "x$VS_ENV_CMD" = x; then
16052    VS100BASE="$with_toolsdir/../.."
16053    METHOD="--with-tools-dir"
16054
16055  windows_path="$VS100BASE"
16056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16057    unix_path=`$CYGPATH -u "$windows_path"`
16058    VS100BASE="$unix_path"
16059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16061    VS100BASE="$unix_path"
16062  fi
16063
16064    if test -d "$VS100BASE"; then
16065      if test -f "$VS100BASE/$VCVARSFILE"; then
16066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16067$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16068        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16069      else
16070        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16071$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16072        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16073$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16074      fi
16075    fi
16076  fi
16077
16078  fi
16079
16080  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16081    # Having specified an argument which is incorrect will produce an instant failure;
16082    # we should not go on looking
16083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16084$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16085    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16086$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16087    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16088  fi
16089
16090  if test "x$ProgramW6432" != x; then
16091
16092  if test "x$VS_ENV_CMD" = x; then
16093    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16094    METHOD="well-known name"
16095
16096  windows_path="$WIN_SDK_BASE"
16097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16098    unix_path=`$CYGPATH -u "$windows_path"`
16099    WIN_SDK_BASE="$unix_path"
16100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16102    WIN_SDK_BASE="$unix_path"
16103  fi
16104
16105    if test -d "$WIN_SDK_BASE"; then
16106      # There have been cases of partial or broken SDK installations. A missing
16107      # lib dir is not going to work.
16108      if test ! -d "$WIN_SDK_BASE/../lib"; then
16109        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16110$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16111        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16112$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16113      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16115$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16116        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16117        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16118          VS_ENV_ARGS="/x86"
16119        else
16120          VS_ENV_ARGS="/x64"
16121        fi
16122      else
16123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16126$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16127      fi
16128    fi
16129  fi
16130
16131  fi
16132  if test "x$PROGRAMW6432" != x; then
16133
16134  if test "x$VS_ENV_CMD" = x; then
16135    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16136    METHOD="well-known name"
16137
16138  windows_path="$WIN_SDK_BASE"
16139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16140    unix_path=`$CYGPATH -u "$windows_path"`
16141    WIN_SDK_BASE="$unix_path"
16142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16144    WIN_SDK_BASE="$unix_path"
16145  fi
16146
16147    if test -d "$WIN_SDK_BASE"; then
16148      # There have been cases of partial or broken SDK installations. A missing
16149      # lib dir is not going to work.
16150      if test ! -d "$WIN_SDK_BASE/../lib"; then
16151        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16152$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16153        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16154$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16155      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16158        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16159        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16160          VS_ENV_ARGS="/x86"
16161        else
16162          VS_ENV_ARGS="/x64"
16163        fi
16164      else
16165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16168$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16169      fi
16170    fi
16171  fi
16172
16173  fi
16174  if test "x$PROGRAMFILES" != x; then
16175
16176  if test "x$VS_ENV_CMD" = x; then
16177    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16178    METHOD="well-known name"
16179
16180  windows_path="$WIN_SDK_BASE"
16181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16182    unix_path=`$CYGPATH -u "$windows_path"`
16183    WIN_SDK_BASE="$unix_path"
16184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16186    WIN_SDK_BASE="$unix_path"
16187  fi
16188
16189    if test -d "$WIN_SDK_BASE"; then
16190      # There have been cases of partial or broken SDK installations. A missing
16191      # lib dir is not going to work.
16192      if test ! -d "$WIN_SDK_BASE/../lib"; then
16193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16195        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16196$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16197      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16200        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16201        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16202          VS_ENV_ARGS="/x86"
16203        else
16204          VS_ENV_ARGS="/x64"
16205        fi
16206      else
16207        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16208$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16209        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16210$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16211      fi
16212    fi
16213  fi
16214
16215  fi
16216
16217  if test "x$VS_ENV_CMD" = x; then
16218    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16219    METHOD="well-known name"
16220
16221  windows_path="$WIN_SDK_BASE"
16222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16223    unix_path=`$CYGPATH -u "$windows_path"`
16224    WIN_SDK_BASE="$unix_path"
16225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16227    WIN_SDK_BASE="$unix_path"
16228  fi
16229
16230    if test -d "$WIN_SDK_BASE"; then
16231      # There have been cases of partial or broken SDK installations. A missing
16232      # lib dir is not going to work.
16233      if test ! -d "$WIN_SDK_BASE/../lib"; then
16234        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16235$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16236        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16237$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16238      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16241        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16242        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16243          VS_ENV_ARGS="/x86"
16244        else
16245          VS_ENV_ARGS="/x64"
16246        fi
16247      else
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16251$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16252      fi
16253    fi
16254  fi
16255
16256
16257  if test "x$VS_ENV_CMD" = x; then
16258    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16259    METHOD="well-known name"
16260
16261  windows_path="$WIN_SDK_BASE"
16262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16263    unix_path=`$CYGPATH -u "$windows_path"`
16264    WIN_SDK_BASE="$unix_path"
16265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16267    WIN_SDK_BASE="$unix_path"
16268  fi
16269
16270    if test -d "$WIN_SDK_BASE"; then
16271      # There have been cases of partial or broken SDK installations. A missing
16272      # lib dir is not going to work.
16273      if test ! -d "$WIN_SDK_BASE/../lib"; then
16274        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16275$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16277$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16278      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16280$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16281        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16282        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16283          VS_ENV_ARGS="/x86"
16284        else
16285          VS_ENV_ARGS="/x64"
16286        fi
16287      else
16288        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16289$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16290        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16291$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16292      fi
16293    fi
16294  fi
16295
16296
16297  if test "x$VS100COMNTOOLS" != x; then
16298
16299  if test "x$VS_ENV_CMD" = x; then
16300    VS100BASE="$VS100COMNTOOLS/../.."
16301    METHOD="VS100COMNTOOLS variable"
16302
16303  windows_path="$VS100BASE"
16304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16305    unix_path=`$CYGPATH -u "$windows_path"`
16306    VS100BASE="$unix_path"
16307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16309    VS100BASE="$unix_path"
16310  fi
16311
16312    if test -d "$VS100BASE"; then
16313      if test -f "$VS100BASE/$VCVARSFILE"; then
16314        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16315$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16316        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16317      else
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16319$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16321$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16322      fi
16323    fi
16324  fi
16325
16326  fi
16327  if test "x$PROGRAMFILES" != x; then
16328
16329  if test "x$VS_ENV_CMD" = x; then
16330    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16331    METHOD="well-known name"
16332
16333  windows_path="$VS100BASE"
16334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16335    unix_path=`$CYGPATH -u "$windows_path"`
16336    VS100BASE="$unix_path"
16337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16339    VS100BASE="$unix_path"
16340  fi
16341
16342    if test -d "$VS100BASE"; then
16343      if test -f "$VS100BASE/$VCVARSFILE"; then
16344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16345$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16346        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16347      else
16348        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16349$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16350        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16351$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16352      fi
16353    fi
16354  fi
16355
16356  fi
16357
16358  if test "x$VS_ENV_CMD" = x; then
16359    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16360    METHOD="well-known name"
16361
16362  windows_path="$VS100BASE"
16363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16364    unix_path=`$CYGPATH -u "$windows_path"`
16365    VS100BASE="$unix_path"
16366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16368    VS100BASE="$unix_path"
16369  fi
16370
16371    if test -d "$VS100BASE"; then
16372      if test -f "$VS100BASE/$VCVARSFILE"; then
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16374$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16375        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16376      else
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16378$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16379        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16380$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16381      fi
16382    fi
16383  fi
16384
16385
16386  if test "x$VS_ENV_CMD" = x; then
16387    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16388    METHOD="well-known name"
16389
16390  windows_path="$VS100BASE"
16391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16392    unix_path=`$CYGPATH -u "$windows_path"`
16393    VS100BASE="$unix_path"
16394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16396    VS100BASE="$unix_path"
16397  fi
16398
16399    if test -d "$VS100BASE"; then
16400      if test -f "$VS100BASE/$VCVARSFILE"; then
16401        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16402$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16403        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16404      else
16405        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16406$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16407        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16408$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16409      fi
16410    fi
16411  fi
16412
16413
16414  if test "x$VS_ENV_CMD" != x; then
16415    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16416
16417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16418
16419  # First separate the path from the arguments. This will split at the first
16420  # space.
16421  complete="$VS_ENV_CMD"
16422  path="${complete%% *}"
16423  tmp="$complete EOL"
16424  arguments="${tmp#* }"
16425
16426  # Input might be given as Windows format, start by converting to
16427  # unix format.
16428  new_path=`$CYGPATH -u "$path"`
16429
16430  # Now try to locate executable using which
16431  new_path=`$WHICH "$new_path" 2> /dev/null`
16432  # bat and cmd files are not always considered executable in cygwin causing which
16433  # to not find them
16434  if test "x$new_path" = x \
16435           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16436           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16437    new_path=`$CYGPATH -u "$path"`
16438  fi
16439  if test "x$new_path" = x; then
16440    # Oops. Which didn't find the executable.
16441    # The splitting of arguments from the executable at a space might have been incorrect,
16442    # since paths with space are more likely in Windows. Give it another try with the whole
16443    # argument.
16444    path="$complete"
16445    arguments="EOL"
16446    new_path=`$CYGPATH -u "$path"`
16447    new_path=`$WHICH "$new_path" 2> /dev/null`
16448    # bat and cmd files are not always considered executable in cygwin causing which
16449    # to not find them
16450    if test "x$new_path" = x \
16451             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16452             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16453      new_path=`$CYGPATH -u "$path"`
16454    fi
16455    if test "x$new_path" = x; then
16456      # It's still not found. Now this is an unrecoverable error.
16457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16458$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16459      has_space=`$ECHO "$complete" | $GREP " "`
16460      if test "x$has_space" != x; then
16461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16463      fi
16464      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16465    fi
16466  fi
16467
16468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16471  # "foo.exe" is OK but "foo" is an error.
16472  #
16473  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16474  # It is also a way to make sure we got the proper file name for the real test later on.
16475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16476  if test "x$test_shortpath" = x; then
16477    # Short path failed, file does not exist as specified.
16478    # Try adding .exe or .cmd
16479    if test -f "${new_path}.exe"; then
16480       input_to_shortpath="${new_path}.exe"
16481    elif test -f "${new_path}.cmd"; then
16482       input_to_shortpath="${new_path}.cmd"
16483    else
16484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16485$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16488      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16489    fi
16490  else
16491    input_to_shortpath="$new_path"
16492  fi
16493
16494  # Call helper function which possibly converts this using DOS-style short mode.
16495  # If so, the updated path is stored in $new_path.
16496  new_path="$input_to_shortpath"
16497
16498  input_path="$input_to_shortpath"
16499  # Check if we need to convert this using DOS-style short mode. If the path
16500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16501  # take no chances and rewrite it.
16502  # Note: m4 eats our [], so we need to use [ and ] instead.
16503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16504  if test "x$has_forbidden_chars" != x; then
16505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16509      # Going to short mode and back again did indeed matter. Since short mode is
16510      # case insensitive, let's make it lowercase to improve readability.
16511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16512      # Now convert it back to Unix-stile (cygpath)
16513      input_path=`$CYGPATH -u "$shortmode_path"`
16514      new_path="$input_path"
16515    fi
16516  fi
16517
16518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16519  if test "x$test_cygdrive_prefix" = x; then
16520    # As a simple fix, exclude /usr/bin since it's not a real path.
16521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16523      # a path prefixed by /cygdrive for fixpath to work.
16524      new_path="$CYGWIN_ROOT_PATH$input_path"
16525    fi
16526  fi
16527
16528  # remove trailing .exe if any
16529  new_path="${new_path/%.exe/}"
16530
16531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16532
16533  # First separate the path from the arguments. This will split at the first
16534  # space.
16535  complete="$VS_ENV_CMD"
16536  path="${complete%% *}"
16537  tmp="$complete EOL"
16538  arguments="${tmp#* }"
16539
16540  # Input might be given as Windows format, start by converting to
16541  # unix format.
16542  new_path="$path"
16543
16544  windows_path="$new_path"
16545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16546    unix_path=`$CYGPATH -u "$windows_path"`
16547    new_path="$unix_path"
16548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16550    new_path="$unix_path"
16551  fi
16552
16553
16554  # Now try to locate executable using which
16555  new_path=`$WHICH "$new_path" 2> /dev/null`
16556
16557  if test "x$new_path" = x; then
16558    # Oops. Which didn't find the executable.
16559    # The splitting of arguments from the executable at a space might have been incorrect,
16560    # since paths with space are more likely in Windows. Give it another try with the whole
16561    # argument.
16562    path="$complete"
16563    arguments="EOL"
16564    new_path="$path"
16565
16566  windows_path="$new_path"
16567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16568    unix_path=`$CYGPATH -u "$windows_path"`
16569    new_path="$unix_path"
16570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16572    new_path="$unix_path"
16573  fi
16574
16575
16576    new_path=`$WHICH "$new_path" 2> /dev/null`
16577
16578    if test "x$new_path" = x; then
16579      # It's still not found. Now this is an unrecoverable error.
16580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16581$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16582      has_space=`$ECHO "$complete" | $GREP " "`
16583      if test "x$has_space" != x; then
16584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16586      fi
16587      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16588    fi
16589  fi
16590
16591  # Now new_path has a complete unix path to the binary
16592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16593    # Keep paths in /bin as-is, but remove trailing .exe if any
16594    new_path="${new_path/%.exe/}"
16595    # Do not save /bin paths to all_fixpath_prefixes!
16596  else
16597    # Not in mixed or Windows style, start by that.
16598    new_path=`cmd //c echo $new_path`
16599
16600  input_path="$new_path"
16601  # Check if we need to convert this using DOS-style short mode. If the path
16602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16603  # take no chances and rewrite it.
16604  # Note: m4 eats our [], so we need to use [ and ] instead.
16605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16606  if test "x$has_forbidden_chars" != x; then
16607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16609  fi
16610
16611    # Output is in $new_path
16612
16613  windows_path="$new_path"
16614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16615    unix_path=`$CYGPATH -u "$windows_path"`
16616    new_path="$unix_path"
16617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16619    new_path="$unix_path"
16620  fi
16621
16622    # remove trailing .exe if any
16623    new_path="${new_path/%.exe/}"
16624
16625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16627  fi
16628
16629  else
16630    # We're on a posix platform. Hooray! :)
16631    # First separate the path from the arguments. This will split at the first
16632    # space.
16633    complete="$VS_ENV_CMD"
16634    path="${complete%% *}"
16635    tmp="$complete EOL"
16636    arguments="${tmp#* }"
16637
16638    # Cannot rely on the command "which" here since it doesn't always work.
16639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16640    if test -z "$is_absolute_path"; then
16641      # Path to executable is not absolute. Find it.
16642      IFS_save="$IFS"
16643      IFS=:
16644      for p in $PATH; do
16645        if test -f "$p/$path" && test -x "$p/$path"; then
16646          new_path="$p/$path"
16647          break
16648        fi
16649      done
16650      IFS="$IFS_save"
16651    else
16652      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16653$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16654      new_path="$path"
16655    fi
16656
16657    if test "x$new_path" = x; then
16658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16659$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16660        has_space=`$ECHO "$complete" | $GREP " "`
16661        if test "x$has_space" != x; then
16662          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16664        fi
16665        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16666      fi
16667  fi
16668
16669      # Now join together the path and the arguments once again
16670      if test "x$arguments" != xEOL; then
16671        new_complete="$new_path ${arguments% *}"
16672      else
16673        new_complete="$new_path"
16674      fi
16675
16676  if test "x$complete" != "x$new_complete"; then
16677      VS_ENV_CMD="$new_complete"
16678      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16679$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16680    fi
16681
16682
16683    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16684    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16685$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16686    cd $OUTPUT_ROOT
16687    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16688    # to autoconf standards.
16689
16690    #----
16691
16692    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16693    # but calculate the difference in Cygwin environment before/after running it and then
16694    # apply the diff.
16695
16696    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16697      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16698      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16699      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16700    else
16701      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16702      _dosbash=`cmd //c echo \`which bash\``
16703    fi
16704
16705    # generate the set of exported vars before/after the vs10 setup
16706    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16707    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16708    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16709    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16710
16711    # Now execute the newly created bat file.
16712    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16713    cmd /c localdevenvtmp.bat | cat
16714
16715    # apply the diff (less some non-vs10 vars named by "!")
16716    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16717    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16718    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16719
16720    # cleanup
16721    $RM localdevenvtmp*
16722    #----
16723    cd $CURDIR
16724    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16726$as_echo "no" >&6; }
16727      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16728$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16729      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16730$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16731      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16732$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16733      as_fn_error $? "Cannot continue" "$LINENO" 5
16734    fi
16735
16736    # Now set all paths and other env variables. This will allow the rest of
16737    # the configure script to find and run the compiler in the proper way.
16738    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16739$as_echo "$as_me: Setting extracted environment variables" >&6;}
16740    . $OUTPUT_ROOT/localdevenv.sh
16741  else
16742    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16743    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16744$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16745  fi
16746
16747  # At this point, we should have corrent variables in the environment, or we can't continue.
16748  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16749$as_echo_n "checking for Visual Studio variables... " >&6; }
16750
16751  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16752    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16754$as_echo "present but broken" >&6; }
16755      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16756    else
16757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16758$as_echo "ok" >&6; }
16759      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16760      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16761      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16762      VS_PATH="$PATH"
16763
16764
16765
16766    fi
16767  else
16768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16769$as_echo "not found" >&6; }
16770
16771    if test "x$VS_ENV_CMD" = x; then
16772      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16773$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16774      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16775$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16776    else
16777      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16778$as_echo "$as_me: Running the extraction script failed." >&6;}
16779    fi
16780    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16781$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16782    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16783$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16784    as_fn_error $? "Cannot continue" "$LINENO" 5
16785  fi
16786
16787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16788$as_echo_n "checking for msvcr100.dll... " >&6; }
16789
16790# Check whether --with-msvcr-dll was given.
16791if test "${with_msvcr_dll+set}" = set; then :
16792  withval=$with_msvcr_dll;
16793fi
16794
16795  if test "x$with_msvcr_dll" != x; then
16796    MSVCR_DLL="$with_msvcr_dll"
16797  else
16798    if test "x$VCINSTALLDIR" != x; then
16799      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16800        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16801      else
16802        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16803        if test "x$MSVCR_DLL" = x; then
16804          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16805        fi
16806      fi
16807      if test "x$MSVCR_DLL" != x; then
16808        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16809$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16810      else
16811        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16812$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16813      fi
16814    fi
16815    if test "x$MSVCR_DLL" = x; then
16816      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16817        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16818$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16819        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16820      fi
16821    fi
16822  fi
16823  if test "x$MSVCR_DLL" = x; then
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16825$as_echo "no" >&6; }
16826    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16827  fi
16828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16829$as_echo "$MSVCR_DLL" >&6; }
16830
16831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16832
16833  # Input might be given as Windows format, start by converting to
16834  # unix format.
16835  path="$MSVCR_DLL"
16836  new_path=`$CYGPATH -u "$path"`
16837
16838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16841  # "foo.exe" is OK but "foo" is an error.
16842  #
16843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16844  # It is also a way to make sure we got the proper file name for the real test later on.
16845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16846  if test "x$test_shortpath" = x; then
16847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16848$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16849    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16850  fi
16851
16852  # Call helper function which possibly converts this using DOS-style short mode.
16853  # If so, the updated path is stored in $new_path.
16854
16855  input_path="$new_path"
16856  # Check if we need to convert this using DOS-style short mode. If the path
16857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16858  # take no chances and rewrite it.
16859  # Note: m4 eats our [], so we need to use [ and ] instead.
16860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16861  if test "x$has_forbidden_chars" != x; then
16862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16866      # Going to short mode and back again did indeed matter. Since short mode is
16867      # case insensitive, let's make it lowercase to improve readability.
16868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16869      # Now convert it back to Unix-stile (cygpath)
16870      input_path=`$CYGPATH -u "$shortmode_path"`
16871      new_path="$input_path"
16872    fi
16873  fi
16874
16875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16876  if test "x$test_cygdrive_prefix" = x; then
16877    # As a simple fix, exclude /usr/bin since it's not a real path.
16878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16880      # a path prefixed by /cygdrive for fixpath to work.
16881      new_path="$CYGWIN_ROOT_PATH$input_path"
16882    fi
16883  fi
16884
16885
16886  if test "x$path" != "x$new_path"; then
16887    MSVCR_DLL="$new_path"
16888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16889$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16890  fi
16891
16892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893
16894  path="$MSVCR_DLL"
16895  has_colon=`$ECHO $path | $GREP ^.:`
16896  new_path="$path"
16897  if test "x$has_colon" = x; then
16898    # Not in mixed or Windows style, start by that.
16899    new_path=`cmd //c echo $path`
16900  fi
16901
16902
16903  input_path="$new_path"
16904  # Check if we need to convert this using DOS-style short mode. If the path
16905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16906  # take no chances and rewrite it.
16907  # Note: m4 eats our [], so we need to use [ and ] instead.
16908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16909  if test "x$has_forbidden_chars" != x; then
16910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16912  fi
16913
16914
16915  windows_path="$new_path"
16916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16917    unix_path=`$CYGPATH -u "$windows_path"`
16918    new_path="$unix_path"
16919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16921    new_path="$unix_path"
16922  fi
16923
16924  if test "x$path" != "x$new_path"; then
16925    MSVCR_DLL="$new_path"
16926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16927$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16928  fi
16929
16930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16932
16933  else
16934    # We're on a posix platform. Hooray! :)
16935    path="$MSVCR_DLL"
16936
16937    if test ! -f "$path" && test ! -d "$path"; then
16938      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16939    fi
16940
16941    has_space=`$ECHO "$path" | $GREP " "`
16942    if test "x$has_space" != x; then
16943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16944$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16945      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16946    fi
16947  fi
16948
16949
16950fi
16951
16952
16953
16954# If --build AND --host is set, then the configure script will find any
16955# cross compilation tools in the PATH. Cross compilation tools
16956# follows the cross compilation standard where they are prefixed with ${host}.
16957# For example the binary i686-sun-solaris2.10-gcc
16958# will cross compile for i686-sun-solaris2.10
16959# If neither of build and host is not set, then build=host and the
16960# default compiler found in the path will be used.
16961# Setting only --host, does not seem to be really supported.
16962# Please set both --build and --host if you want to cross compile.
16963
16964if test "x$COMPILE_TYPE" = "xcross"; then
16965    # Now we to find a C/C++ compiler that can build executables for the build
16966    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16967    # once. Also, we need to do this before adding a tools dir to the path,
16968    # otherwise we might pick up cross-compilers which don't use standard naming.
16969    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16970    # to wait until they are properly discovered.
16971    for ac_prog in cl cc gcc
16972do
16973  # Extract the first word of "$ac_prog", so it can be a program name with args.
16974set dummy $ac_prog; ac_word=$2
16975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16976$as_echo_n "checking for $ac_word... " >&6; }
16977if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16978  $as_echo_n "(cached) " >&6
16979else
16980  case $BUILD_CC in
16981  [\\/]* | ?:[\\/]*)
16982  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16983  ;;
16984  *)
16985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16986for as_dir in $PATH
16987do
16988  IFS=$as_save_IFS
16989  test -z "$as_dir" && as_dir=.
16990    for ac_exec_ext in '' $ac_executable_extensions; do
16991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16992    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16994    break 2
16995  fi
16996done
16997  done
16998IFS=$as_save_IFS
16999
17000  ;;
17001esac
17002fi
17003BUILD_CC=$ac_cv_path_BUILD_CC
17004if test -n "$BUILD_CC"; then
17005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17006$as_echo "$BUILD_CC" >&6; }
17007else
17008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17009$as_echo "no" >&6; }
17010fi
17011
17012
17013  test -n "$BUILD_CC" && break
17014done
17015
17016
17017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17018
17019  # First separate the path from the arguments. This will split at the first
17020  # space.
17021  complete="$BUILD_CC"
17022  path="${complete%% *}"
17023  tmp="$complete EOL"
17024  arguments="${tmp#* }"
17025
17026  # Input might be given as Windows format, start by converting to
17027  # unix format.
17028  new_path=`$CYGPATH -u "$path"`
17029
17030  # Now try to locate executable using which
17031  new_path=`$WHICH "$new_path" 2> /dev/null`
17032  # bat and cmd files are not always considered executable in cygwin causing which
17033  # to not find them
17034  if test "x$new_path" = x \
17035           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17036           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17037    new_path=`$CYGPATH -u "$path"`
17038  fi
17039  if test "x$new_path" = x; then
17040    # Oops. Which didn't find the executable.
17041    # The splitting of arguments from the executable at a space might have been incorrect,
17042    # since paths with space are more likely in Windows. Give it another try with the whole
17043    # argument.
17044    path="$complete"
17045    arguments="EOL"
17046    new_path=`$CYGPATH -u "$path"`
17047    new_path=`$WHICH "$new_path" 2> /dev/null`
17048    # bat and cmd files are not always considered executable in cygwin causing which
17049    # to not find them
17050    if test "x$new_path" = x \
17051             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17052             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17053      new_path=`$CYGPATH -u "$path"`
17054    fi
17055    if test "x$new_path" = x; then
17056      # It's still not found. Now this is an unrecoverable error.
17057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17058$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17059      has_space=`$ECHO "$complete" | $GREP " "`
17060      if test "x$has_space" != x; then
17061        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17062$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17063      fi
17064      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17065    fi
17066  fi
17067
17068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17071  # "foo.exe" is OK but "foo" is an error.
17072  #
17073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17074  # It is also a way to make sure we got the proper file name for the real test later on.
17075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17076  if test "x$test_shortpath" = x; then
17077    # Short path failed, file does not exist as specified.
17078    # Try adding .exe or .cmd
17079    if test -f "${new_path}.exe"; then
17080       input_to_shortpath="${new_path}.exe"
17081    elif test -f "${new_path}.cmd"; then
17082       input_to_shortpath="${new_path}.cmd"
17083    else
17084      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17085$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17086      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17087$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17088      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17089    fi
17090  else
17091    input_to_shortpath="$new_path"
17092  fi
17093
17094  # Call helper function which possibly converts this using DOS-style short mode.
17095  # If so, the updated path is stored in $new_path.
17096  new_path="$input_to_shortpath"
17097
17098  input_path="$input_to_shortpath"
17099  # Check if we need to convert this using DOS-style short mode. If the path
17100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17101  # take no chances and rewrite it.
17102  # Note: m4 eats our [], so we need to use [ and ] instead.
17103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17104  if test "x$has_forbidden_chars" != x; then
17105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17109      # Going to short mode and back again did indeed matter. Since short mode is
17110      # case insensitive, let's make it lowercase to improve readability.
17111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17112      # Now convert it back to Unix-stile (cygpath)
17113      input_path=`$CYGPATH -u "$shortmode_path"`
17114      new_path="$input_path"
17115    fi
17116  fi
17117
17118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17119  if test "x$test_cygdrive_prefix" = x; then
17120    # As a simple fix, exclude /usr/bin since it's not a real path.
17121    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17123      # a path prefixed by /cygdrive for fixpath to work.
17124      new_path="$CYGWIN_ROOT_PATH$input_path"
17125    fi
17126  fi
17127
17128  # remove trailing .exe if any
17129  new_path="${new_path/%.exe/}"
17130
17131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17132
17133  # First separate the path from the arguments. This will split at the first
17134  # space.
17135  complete="$BUILD_CC"
17136  path="${complete%% *}"
17137  tmp="$complete EOL"
17138  arguments="${tmp#* }"
17139
17140  # Input might be given as Windows format, start by converting to
17141  # unix format.
17142  new_path="$path"
17143
17144  windows_path="$new_path"
17145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146    unix_path=`$CYGPATH -u "$windows_path"`
17147    new_path="$unix_path"
17148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17150    new_path="$unix_path"
17151  fi
17152
17153
17154  # Now try to locate executable using which
17155  new_path=`$WHICH "$new_path" 2> /dev/null`
17156
17157  if test "x$new_path" = x; then
17158    # Oops. Which didn't find the executable.
17159    # The splitting of arguments from the executable at a space might have been incorrect,
17160    # since paths with space are more likely in Windows. Give it another try with the whole
17161    # argument.
17162    path="$complete"
17163    arguments="EOL"
17164    new_path="$path"
17165
17166  windows_path="$new_path"
17167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17168    unix_path=`$CYGPATH -u "$windows_path"`
17169    new_path="$unix_path"
17170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17172    new_path="$unix_path"
17173  fi
17174
17175
17176    new_path=`$WHICH "$new_path" 2> /dev/null`
17177
17178    if test "x$new_path" = x; then
17179      # It's still not found. Now this is an unrecoverable error.
17180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17181$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17182      has_space=`$ECHO "$complete" | $GREP " "`
17183      if test "x$has_space" != x; then
17184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17186      fi
17187      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17188    fi
17189  fi
17190
17191  # Now new_path has a complete unix path to the binary
17192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17193    # Keep paths in /bin as-is, but remove trailing .exe if any
17194    new_path="${new_path/%.exe/}"
17195    # Do not save /bin paths to all_fixpath_prefixes!
17196  else
17197    # Not in mixed or Windows style, start by that.
17198    new_path=`cmd //c echo $new_path`
17199
17200  input_path="$new_path"
17201  # Check if we need to convert this using DOS-style short mode. If the path
17202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17203  # take no chances and rewrite it.
17204  # Note: m4 eats our [], so we need to use [ and ] instead.
17205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17206  if test "x$has_forbidden_chars" != x; then
17207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17209  fi
17210
17211    # Output is in $new_path
17212
17213  windows_path="$new_path"
17214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17215    unix_path=`$CYGPATH -u "$windows_path"`
17216    new_path="$unix_path"
17217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17219    new_path="$unix_path"
17220  fi
17221
17222    # remove trailing .exe if any
17223    new_path="${new_path/%.exe/}"
17224
17225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17227  fi
17228
17229  else
17230    # We're on a posix platform. Hooray! :)
17231    # First separate the path from the arguments. This will split at the first
17232    # space.
17233    complete="$BUILD_CC"
17234    path="${complete%% *}"
17235    tmp="$complete EOL"
17236    arguments="${tmp#* }"
17237
17238    # Cannot rely on the command "which" here since it doesn't always work.
17239    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17240    if test -z "$is_absolute_path"; then
17241      # Path to executable is not absolute. Find it.
17242      IFS_save="$IFS"
17243      IFS=:
17244      for p in $PATH; do
17245        if test -f "$p/$path" && test -x "$p/$path"; then
17246          new_path="$p/$path"
17247          break
17248        fi
17249      done
17250      IFS="$IFS_save"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17253$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17254      new_path="$path"
17255    fi
17256
17257    if test "x$new_path" = x; then
17258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17259$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17260        has_space=`$ECHO "$complete" | $GREP " "`
17261        if test "x$has_space" != x; then
17262          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17263$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17264        fi
17265        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17266      fi
17267  fi
17268
17269      # Now join together the path and the arguments once again
17270      if test "x$arguments" != xEOL; then
17271        new_complete="$new_path ${arguments% *}"
17272      else
17273        new_complete="$new_path"
17274      fi
17275
17276  if test "x$complete" != "x$new_complete"; then
17277      BUILD_CC="$new_complete"
17278      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17279$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17280    fi
17281
17282    for ac_prog in cl CC g++
17283do
17284  # Extract the first word of "$ac_prog", so it can be a program name with args.
17285set dummy $ac_prog; ac_word=$2
17286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17287$as_echo_n "checking for $ac_word... " >&6; }
17288if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17289  $as_echo_n "(cached) " >&6
17290else
17291  case $BUILD_CXX in
17292  [\\/]* | ?:[\\/]*)
17293  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17294  ;;
17295  *)
17296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17297for as_dir in $PATH
17298do
17299  IFS=$as_save_IFS
17300  test -z "$as_dir" && as_dir=.
17301    for ac_exec_ext in '' $ac_executable_extensions; do
17302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17303    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17305    break 2
17306  fi
17307done
17308  done
17309IFS=$as_save_IFS
17310
17311  ;;
17312esac
17313fi
17314BUILD_CXX=$ac_cv_path_BUILD_CXX
17315if test -n "$BUILD_CXX"; then
17316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17317$as_echo "$BUILD_CXX" >&6; }
17318else
17319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17320$as_echo "no" >&6; }
17321fi
17322
17323
17324  test -n "$BUILD_CXX" && break
17325done
17326
17327
17328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17329
17330  # First separate the path from the arguments. This will split at the first
17331  # space.
17332  complete="$BUILD_CXX"
17333  path="${complete%% *}"
17334  tmp="$complete EOL"
17335  arguments="${tmp#* }"
17336
17337  # Input might be given as Windows format, start by converting to
17338  # unix format.
17339  new_path=`$CYGPATH -u "$path"`
17340
17341  # Now try to locate executable using which
17342  new_path=`$WHICH "$new_path" 2> /dev/null`
17343  # bat and cmd files are not always considered executable in cygwin causing which
17344  # to not find them
17345  if test "x$new_path" = x \
17346           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17347           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17348    new_path=`$CYGPATH -u "$path"`
17349  fi
17350  if test "x$new_path" = x; then
17351    # Oops. Which didn't find the executable.
17352    # The splitting of arguments from the executable at a space might have been incorrect,
17353    # since paths with space are more likely in Windows. Give it another try with the whole
17354    # argument.
17355    path="$complete"
17356    arguments="EOL"
17357    new_path=`$CYGPATH -u "$path"`
17358    new_path=`$WHICH "$new_path" 2> /dev/null`
17359    # bat and cmd files are not always considered executable in cygwin causing which
17360    # to not find them
17361    if test "x$new_path" = x \
17362             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17363             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17364      new_path=`$CYGPATH -u "$path"`
17365    fi
17366    if test "x$new_path" = x; then
17367      # It's still not found. Now this is an unrecoverable error.
17368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17369$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17370      has_space=`$ECHO "$complete" | $GREP " "`
17371      if test "x$has_space" != x; then
17372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17374      fi
17375      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17376    fi
17377  fi
17378
17379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17382  # "foo.exe" is OK but "foo" is an error.
17383  #
17384  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17385  # It is also a way to make sure we got the proper file name for the real test later on.
17386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17387  if test "x$test_shortpath" = x; then
17388    # Short path failed, file does not exist as specified.
17389    # Try adding .exe or .cmd
17390    if test -f "${new_path}.exe"; then
17391       input_to_shortpath="${new_path}.exe"
17392    elif test -f "${new_path}.cmd"; then
17393       input_to_shortpath="${new_path}.cmd"
17394    else
17395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17396$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17399      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17400    fi
17401  else
17402    input_to_shortpath="$new_path"
17403  fi
17404
17405  # Call helper function which possibly converts this using DOS-style short mode.
17406  # If so, the updated path is stored in $new_path.
17407  new_path="$input_to_shortpath"
17408
17409  input_path="$input_to_shortpath"
17410  # Check if we need to convert this using DOS-style short mode. If the path
17411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17412  # take no chances and rewrite it.
17413  # Note: m4 eats our [], so we need to use [ and ] instead.
17414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17415  if test "x$has_forbidden_chars" != x; then
17416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17420      # Going to short mode and back again did indeed matter. Since short mode is
17421      # case insensitive, let's make it lowercase to improve readability.
17422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17423      # Now convert it back to Unix-stile (cygpath)
17424      input_path=`$CYGPATH -u "$shortmode_path"`
17425      new_path="$input_path"
17426    fi
17427  fi
17428
17429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17430  if test "x$test_cygdrive_prefix" = x; then
17431    # As a simple fix, exclude /usr/bin since it's not a real path.
17432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17434      # a path prefixed by /cygdrive for fixpath to work.
17435      new_path="$CYGWIN_ROOT_PATH$input_path"
17436    fi
17437  fi
17438
17439  # remove trailing .exe if any
17440  new_path="${new_path/%.exe/}"
17441
17442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17443
17444  # First separate the path from the arguments. This will split at the first
17445  # space.
17446  complete="$BUILD_CXX"
17447  path="${complete%% *}"
17448  tmp="$complete EOL"
17449  arguments="${tmp#* }"
17450
17451  # Input might be given as Windows format, start by converting to
17452  # unix format.
17453  new_path="$path"
17454
17455  windows_path="$new_path"
17456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17457    unix_path=`$CYGPATH -u "$windows_path"`
17458    new_path="$unix_path"
17459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17461    new_path="$unix_path"
17462  fi
17463
17464
17465  # Now try to locate executable using which
17466  new_path=`$WHICH "$new_path" 2> /dev/null`
17467
17468  if test "x$new_path" = x; then
17469    # Oops. Which didn't find the executable.
17470    # The splitting of arguments from the executable at a space might have been incorrect,
17471    # since paths with space are more likely in Windows. Give it another try with the whole
17472    # argument.
17473    path="$complete"
17474    arguments="EOL"
17475    new_path="$path"
17476
17477  windows_path="$new_path"
17478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17479    unix_path=`$CYGPATH -u "$windows_path"`
17480    new_path="$unix_path"
17481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17483    new_path="$unix_path"
17484  fi
17485
17486
17487    new_path=`$WHICH "$new_path" 2> /dev/null`
17488
17489    if test "x$new_path" = x; then
17490      # It's still not found. Now this is an unrecoverable error.
17491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17492$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17493      has_space=`$ECHO "$complete" | $GREP " "`
17494      if test "x$has_space" != x; then
17495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17497      fi
17498      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17499    fi
17500  fi
17501
17502  # Now new_path has a complete unix path to the binary
17503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17504    # Keep paths in /bin as-is, but remove trailing .exe if any
17505    new_path="${new_path/%.exe/}"
17506    # Do not save /bin paths to all_fixpath_prefixes!
17507  else
17508    # Not in mixed or Windows style, start by that.
17509    new_path=`cmd //c echo $new_path`
17510
17511  input_path="$new_path"
17512  # Check if we need to convert this using DOS-style short mode. If the path
17513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17514  # take no chances and rewrite it.
17515  # Note: m4 eats our [], so we need to use [ and ] instead.
17516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17517  if test "x$has_forbidden_chars" != x; then
17518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17520  fi
17521
17522    # Output is in $new_path
17523
17524  windows_path="$new_path"
17525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17526    unix_path=`$CYGPATH -u "$windows_path"`
17527    new_path="$unix_path"
17528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17530    new_path="$unix_path"
17531  fi
17532
17533    # remove trailing .exe if any
17534    new_path="${new_path/%.exe/}"
17535
17536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17538  fi
17539
17540  else
17541    # We're on a posix platform. Hooray! :)
17542    # First separate the path from the arguments. This will split at the first
17543    # space.
17544    complete="$BUILD_CXX"
17545    path="${complete%% *}"
17546    tmp="$complete EOL"
17547    arguments="${tmp#* }"
17548
17549    # Cannot rely on the command "which" here since it doesn't always work.
17550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17551    if test -z "$is_absolute_path"; then
17552      # Path to executable is not absolute. Find it.
17553      IFS_save="$IFS"
17554      IFS=:
17555      for p in $PATH; do
17556        if test -f "$p/$path" && test -x "$p/$path"; then
17557          new_path="$p/$path"
17558          break
17559        fi
17560      done
17561      IFS="$IFS_save"
17562    else
17563      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17564$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17565      new_path="$path"
17566    fi
17567
17568    if test "x$new_path" = x; then
17569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17570$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17571        has_space=`$ECHO "$complete" | $GREP " "`
17572        if test "x$has_space" != x; then
17573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17575        fi
17576        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17577      fi
17578  fi
17579
17580      # Now join together the path and the arguments once again
17581      if test "x$arguments" != xEOL; then
17582        new_complete="$new_path ${arguments% *}"
17583      else
17584        new_complete="$new_path"
17585      fi
17586
17587  if test "x$complete" != "x$new_complete"; then
17588      BUILD_CXX="$new_complete"
17589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17590$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17591    fi
17592
17593    # Extract the first word of "ld", so it can be a program name with args.
17594set dummy ld; ac_word=$2
17595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17596$as_echo_n "checking for $ac_word... " >&6; }
17597if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17598  $as_echo_n "(cached) " >&6
17599else
17600  case $BUILD_LD in
17601  [\\/]* | ?:[\\/]*)
17602  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17603  ;;
17604  *)
17605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17606for as_dir in $PATH
17607do
17608  IFS=$as_save_IFS
17609  test -z "$as_dir" && as_dir=.
17610    for ac_exec_ext in '' $ac_executable_extensions; do
17611  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17612    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17614    break 2
17615  fi
17616done
17617  done
17618IFS=$as_save_IFS
17619
17620  ;;
17621esac
17622fi
17623BUILD_LD=$ac_cv_path_BUILD_LD
17624if test -n "$BUILD_LD"; then
17625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17626$as_echo "$BUILD_LD" >&6; }
17627else
17628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17629$as_echo "no" >&6; }
17630fi
17631
17632
17633
17634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17635
17636  # First separate the path from the arguments. This will split at the first
17637  # space.
17638  complete="$BUILD_LD"
17639  path="${complete%% *}"
17640  tmp="$complete EOL"
17641  arguments="${tmp#* }"
17642
17643  # Input might be given as Windows format, start by converting to
17644  # unix format.
17645  new_path=`$CYGPATH -u "$path"`
17646
17647  # Now try to locate executable using which
17648  new_path=`$WHICH "$new_path" 2> /dev/null`
17649  # bat and cmd files are not always considered executable in cygwin causing which
17650  # to not find them
17651  if test "x$new_path" = x \
17652           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17653           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17654    new_path=`$CYGPATH -u "$path"`
17655  fi
17656  if test "x$new_path" = x; then
17657    # Oops. Which didn't find the executable.
17658    # The splitting of arguments from the executable at a space might have been incorrect,
17659    # since paths with space are more likely in Windows. Give it another try with the whole
17660    # argument.
17661    path="$complete"
17662    arguments="EOL"
17663    new_path=`$CYGPATH -u "$path"`
17664    new_path=`$WHICH "$new_path" 2> /dev/null`
17665    # bat and cmd files are not always considered executable in cygwin causing which
17666    # to not find them
17667    if test "x$new_path" = x \
17668             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17669             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17670      new_path=`$CYGPATH -u "$path"`
17671    fi
17672    if test "x$new_path" = x; then
17673      # It's still not found. Now this is an unrecoverable error.
17674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17675$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17676      has_space=`$ECHO "$complete" | $GREP " "`
17677      if test "x$has_space" != x; then
17678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17680      fi
17681      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17682    fi
17683  fi
17684
17685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17688  # "foo.exe" is OK but "foo" is an error.
17689  #
17690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17691  # It is also a way to make sure we got the proper file name for the real test later on.
17692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17693  if test "x$test_shortpath" = x; then
17694    # Short path failed, file does not exist as specified.
17695    # Try adding .exe or .cmd
17696    if test -f "${new_path}.exe"; then
17697       input_to_shortpath="${new_path}.exe"
17698    elif test -f "${new_path}.cmd"; then
17699       input_to_shortpath="${new_path}.cmd"
17700    else
17701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17702$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17705      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17706    fi
17707  else
17708    input_to_shortpath="$new_path"
17709  fi
17710
17711  # Call helper function which possibly converts this using DOS-style short mode.
17712  # If so, the updated path is stored in $new_path.
17713  new_path="$input_to_shortpath"
17714
17715  input_path="$input_to_shortpath"
17716  # Check if we need to convert this using DOS-style short mode. If the path
17717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17718  # take no chances and rewrite it.
17719  # Note: m4 eats our [], so we need to use [ and ] instead.
17720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17721  if test "x$has_forbidden_chars" != x; then
17722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17726      # Going to short mode and back again did indeed matter. Since short mode is
17727      # case insensitive, let's make it lowercase to improve readability.
17728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17729      # Now convert it back to Unix-stile (cygpath)
17730      input_path=`$CYGPATH -u "$shortmode_path"`
17731      new_path="$input_path"
17732    fi
17733  fi
17734
17735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17736  if test "x$test_cygdrive_prefix" = x; then
17737    # As a simple fix, exclude /usr/bin since it's not a real path.
17738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17740      # a path prefixed by /cygdrive for fixpath to work.
17741      new_path="$CYGWIN_ROOT_PATH$input_path"
17742    fi
17743  fi
17744
17745  # remove trailing .exe if any
17746  new_path="${new_path/%.exe/}"
17747
17748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17749
17750  # First separate the path from the arguments. This will split at the first
17751  # space.
17752  complete="$BUILD_LD"
17753  path="${complete%% *}"
17754  tmp="$complete EOL"
17755  arguments="${tmp#* }"
17756
17757  # Input might be given as Windows format, start by converting to
17758  # unix format.
17759  new_path="$path"
17760
17761  windows_path="$new_path"
17762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17763    unix_path=`$CYGPATH -u "$windows_path"`
17764    new_path="$unix_path"
17765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17767    new_path="$unix_path"
17768  fi
17769
17770
17771  # Now try to locate executable using which
17772  new_path=`$WHICH "$new_path" 2> /dev/null`
17773
17774  if test "x$new_path" = x; then
17775    # Oops. Which didn't find the executable.
17776    # The splitting of arguments from the executable at a space might have been incorrect,
17777    # since paths with space are more likely in Windows. Give it another try with the whole
17778    # argument.
17779    path="$complete"
17780    arguments="EOL"
17781    new_path="$path"
17782
17783  windows_path="$new_path"
17784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17785    unix_path=`$CYGPATH -u "$windows_path"`
17786    new_path="$unix_path"
17787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17789    new_path="$unix_path"
17790  fi
17791
17792
17793    new_path=`$WHICH "$new_path" 2> /dev/null`
17794
17795    if test "x$new_path" = x; then
17796      # It's still not found. Now this is an unrecoverable error.
17797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17798$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17799      has_space=`$ECHO "$complete" | $GREP " "`
17800      if test "x$has_space" != x; then
17801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17803      fi
17804      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17805    fi
17806  fi
17807
17808  # Now new_path has a complete unix path to the binary
17809  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17810    # Keep paths in /bin as-is, but remove trailing .exe if any
17811    new_path="${new_path/%.exe/}"
17812    # Do not save /bin paths to all_fixpath_prefixes!
17813  else
17814    # Not in mixed or Windows style, start by that.
17815    new_path=`cmd //c echo $new_path`
17816
17817  input_path="$new_path"
17818  # Check if we need to convert this using DOS-style short mode. If the path
17819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17820  # take no chances and rewrite it.
17821  # Note: m4 eats our [], so we need to use [ and ] instead.
17822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17823  if test "x$has_forbidden_chars" != x; then
17824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17826  fi
17827
17828    # Output is in $new_path
17829
17830  windows_path="$new_path"
17831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17832    unix_path=`$CYGPATH -u "$windows_path"`
17833    new_path="$unix_path"
17834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17836    new_path="$unix_path"
17837  fi
17838
17839    # remove trailing .exe if any
17840    new_path="${new_path/%.exe/}"
17841
17842    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17843    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17844  fi
17845
17846  else
17847    # We're on a posix platform. Hooray! :)
17848    # First separate the path from the arguments. This will split at the first
17849    # space.
17850    complete="$BUILD_LD"
17851    path="${complete%% *}"
17852    tmp="$complete EOL"
17853    arguments="${tmp#* }"
17854
17855    # Cannot rely on the command "which" here since it doesn't always work.
17856    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17857    if test -z "$is_absolute_path"; then
17858      # Path to executable is not absolute. Find it.
17859      IFS_save="$IFS"
17860      IFS=:
17861      for p in $PATH; do
17862        if test -f "$p/$path" && test -x "$p/$path"; then
17863          new_path="$p/$path"
17864          break
17865        fi
17866      done
17867      IFS="$IFS_save"
17868    else
17869      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17870$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17871      new_path="$path"
17872    fi
17873
17874    if test "x$new_path" = x; then
17875        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17876$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17877        has_space=`$ECHO "$complete" | $GREP " "`
17878        if test "x$has_space" != x; then
17879          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17880$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17881        fi
17882        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17883      fi
17884  fi
17885
17886      # Now join together the path and the arguments once again
17887      if test "x$arguments" != xEOL; then
17888        new_complete="$new_path ${arguments% *}"
17889      else
17890        new_complete="$new_path"
17891      fi
17892
17893  if test "x$complete" != "x$new_complete"; then
17894      BUILD_LD="$new_complete"
17895      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17896$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17897    fi
17898
17899fi
17900
17901
17902
17903
17904# If a devkit is found on the builddeps server, then prepend its path to the
17905# PATH variable. If there are cross compilers available in the devkit, these
17906# will be found by AC_PROG_CC et al.
17907DEVKIT=
17908
17909
17910    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17911        # Source the builddeps file again, to make sure it uses the latest variables!
17912        . $builddepsfile
17913        # Look for a target and build machine specific resource!
17914        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17915        if test "x$resource" = x; then
17916            # Ok, lets instead look for a target specific resource
17917            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17918        fi
17919        if test "x$resource" = x; then
17920            # Ok, lets instead look for a build specific resource
17921            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17922        fi
17923        if test "x$resource" = x; then
17924            # Ok, lets instead look for a generic resource
17925            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17926            resource=${builddep_devkit}
17927        fi
17928        if test "x$resource" != x; then
17929            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17930$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17931	    # If the resource in the builddeps.conf file is an existing directory,
17932	    # for example /java/linux/cups
17933	    if test -d ${resource}; then
17934	       depdir=${resource}
17935	    else
17936
17937# devkit is for example mymodule
17938# $resource is for example libs/general/libmymod_1_2_3.zip
17939# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17940# $with_builddeps_dir is for example /localhome/builddeps
17941# depdir is the name of the variable into which we store the depdir, eg MYMOD
17942# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17943# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17944    filename=`basename $resource`
17945    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17946    filebase=${filename%%.*}
17947    extension=${filename#*.}
17948    installdir=$with_builddeps_dir/$filebase
17949    if test ! -f $installdir/$filename.unpacked; then
17950        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17951$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17952        if test ! -d $installdir; then
17953            mkdir -p $installdir
17954        fi
17955        if test ! -d $installdir; then
17956            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17957        fi
17958        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17959        touch $tmpfile
17960        if test ! -f $tmpfile; then
17961            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17962        fi
17963
17964    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17965    # $tmpfile is the local file name for the downloaded file.
17966    VALID_TOOL=no
17967    if test "x$BDEPS_FTP" = xwget; then
17968       VALID_TOOL=yes
17969       wget -O $tmpfile $with_builddeps_server/$resource
17970    fi
17971    if test "x$BDEPS_FTP" = xlftp; then
17972       VALID_TOOL=yes
17973       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17974    fi
17975    if test "x$BDEPS_FTP" = xftp; then
17976        VALID_TOOL=yes
17977        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17978        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17979        FTPUSERPWD=${FTPSERVER%%@*}
17980        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17981            FTPUSER=${userpwd%%:*}
17982            FTPPWD=${userpwd#*@}
17983            FTPSERVER=${FTPSERVER#*@}
17984        else
17985            FTPUSER=ftp
17986            FTPPWD=ftp
17987        fi
17988        # the "pass" command does not work on some
17989        # ftp clients (read ftp.exe) but if it works,
17990        # passive mode is better!
17991        (\
17992            echo "user $FTPUSER $FTPPWD"        ;\
17993            echo "pass"                         ;\
17994            echo "bin"                          ;\
17995            echo "get $FTPPATH $tmpfile"              ;\
17996        ) | ftp -in $FTPSERVER
17997    fi
17998    if test "x$VALID_TOOL" != xyes; then
17999       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18000    fi
18001
18002        mv $tmpfile $installdir/$filename
18003        if test ! -s $installdir/$filename; then
18004            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18005        fi
18006        case "$extension" in
18007            zip)  echo "Unzipping $installdir/$filename..."
18008               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18009            ;;
18010            tar.gz) echo "Untaring $installdir/$filename..."
18011               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18012            ;;
18013            tgz) echo "Untaring $installdir/$filename..."
18014               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18015            ;;
18016            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18017            ;;
18018        esac
18019    fi
18020    if test -f $installdir/$filename.unpacked; then
18021        depdir=$installdir
18022    fi
18023
18024	    fi
18025            # Source the builddeps file again, because in the previous command, the depdir
18026            # was updated to point at the current build dependency install directory.
18027            . $builddepsfile
18028            # Now extract variables from the builddeps.conf files.
18029            theroot=${builddep_devkit_ROOT}
18030            thecflags=${builddep_devkit_CFLAGS}
18031            thelibs=${builddep_devkit_LIBS}
18032            if test "x$depdir" = x; then
18033                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18034            fi
18035            DEVKIT=$depdir
18036            if test "x$theroot" != x; then
18037               DEVKIT="$theroot"
18038            fi
18039            if test "x$thecflags" != x; then
18040               DEVKIT_CFLAGS="$thecflags"
18041            fi
18042            if test "x$thelibs" != x; then
18043               DEVKIT_LIBS="$thelibs"
18044            fi
18045            # Found devkit
18046                     PATH="$DEVKIT/bin:$PATH"
18047                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18048                     if test "x$x_includes" = "xNONE"; then
18049                         x_includes="$SYS_ROOT/usr/include/X11"
18050                     fi
18051                     if test "x$x_libraries" = "xNONE"; then
18052                         x_libraries="$SYS_ROOT/usr/lib"
18053                     fi
18054
18055
18056        fi
18057
18058    fi
18059
18060
18061if test "x$SYS_ROOT" != "x/" ; then
18062    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18063    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18064    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18065    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18066    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18067    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18068fi
18069
18070# Store the CFLAGS etal passed to the configure script.
18071ORG_CFLAGS="$CFLAGS"
18072ORG_CXXFLAGS="$CXXFLAGS"
18073ORG_OBJCFLAGS="$OBJCFLAGS"
18074
18075# autoconf magic only relies on PATH, so update it if tools dir is specified
18076OLD_PATH="$PATH"
18077if test "x$TOOLS_DIR" != x; then
18078  PATH=$TOOLS_DIR:$PATH
18079fi
18080
18081
18082### Locate C compiler (CC)
18083
18084# gcc is almost always present, but on Windows we
18085# prefer cl.exe and on Solaris we prefer CC.
18086# Thus test for them in this order.
18087if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18088  # Do not probe for cc on MacOSX.
18089  COMPILER_CHECK_LIST="cl gcc"
18090else
18091  COMPILER_CHECK_LIST="cl cc gcc"
18092fi
18093
18094
18095  COMPILER_NAME=C
18096
18097  CC=
18098  # If TOOLS_DIR is set, check for all compiler names in there first
18099  # before checking the rest of the PATH.
18100  if test -n "$TOOLS_DIR"; then
18101    PATH_save="$PATH"
18102    PATH="$TOOLS_DIR"
18103    for ac_prog in $COMPILER_CHECK_LIST
18104do
18105  # Extract the first word of "$ac_prog", so it can be a program name with args.
18106set dummy $ac_prog; ac_word=$2
18107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18108$as_echo_n "checking for $ac_word... " >&6; }
18109if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18110  $as_echo_n "(cached) " >&6
18111else
18112  case $TOOLS_DIR_CC in
18113  [\\/]* | ?:[\\/]*)
18114  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18115  ;;
18116  *)
18117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18118for as_dir in $PATH
18119do
18120  IFS=$as_save_IFS
18121  test -z "$as_dir" && as_dir=.
18122    for ac_exec_ext in '' $ac_executable_extensions; do
18123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18124    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18126    break 2
18127  fi
18128done
18129  done
18130IFS=$as_save_IFS
18131
18132  ;;
18133esac
18134fi
18135TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18136if test -n "$TOOLS_DIR_CC"; then
18137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18138$as_echo "$TOOLS_DIR_CC" >&6; }
18139else
18140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18141$as_echo "no" >&6; }
18142fi
18143
18144
18145  test -n "$TOOLS_DIR_CC" && break
18146done
18147
18148    CC=$TOOLS_DIR_CC
18149    PATH="$PATH_save"
18150  fi
18151
18152  # AC_PATH_PROGS can't be run multiple times with the same variable,
18153  # so create a new name for this run.
18154  if test "x$CC" = x; then
18155    for ac_prog in $COMPILER_CHECK_LIST
18156do
18157  # Extract the first word of "$ac_prog", so it can be a program name with args.
18158set dummy $ac_prog; ac_word=$2
18159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18160$as_echo_n "checking for $ac_word... " >&6; }
18161if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18162  $as_echo_n "(cached) " >&6
18163else
18164  case $POTENTIAL_CC in
18165  [\\/]* | ?:[\\/]*)
18166  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18167  ;;
18168  *)
18169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18170for as_dir in $PATH
18171do
18172  IFS=$as_save_IFS
18173  test -z "$as_dir" && as_dir=.
18174    for ac_exec_ext in '' $ac_executable_extensions; do
18175  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18176    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18178    break 2
18179  fi
18180done
18181  done
18182IFS=$as_save_IFS
18183
18184  ;;
18185esac
18186fi
18187POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18188if test -n "$POTENTIAL_CC"; then
18189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18190$as_echo "$POTENTIAL_CC" >&6; }
18191else
18192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193$as_echo "no" >&6; }
18194fi
18195
18196
18197  test -n "$POTENTIAL_CC" && break
18198done
18199
18200    CC=$POTENTIAL_CC
18201  fi
18202
18203  if test "x$CC" = x; then
18204
18205    # Print a helpful message on how to acquire the necessary build dependency.
18206    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18207    MISSING_DEPENDENCY=devkit
18208    PKGHANDLER_COMMAND=
18209
18210    case $PKGHANDLER in
18211	apt-get)
18212                apt_help     $MISSING_DEPENDENCY ;;
18213    yum)
18214                yum_help     $MISSING_DEPENDENCY ;;
18215	port)
18216                port_help    $MISSING_DEPENDENCY ;;
18217	pkgutil)
18218                pkgutil_help $MISSING_DEPENDENCY ;;
18219	pkgadd)
18220                pkgadd_help  $MISSING_DEPENDENCY ;;
18221    * )
18222      break ;;
18223    esac
18224
18225    if test "x$PKGHANDLER_COMMAND" != x; then
18226        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18227    fi
18228
18229      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18230  fi
18231
18232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233
18234  # First separate the path from the arguments. This will split at the first
18235  # space.
18236  complete="$CC"
18237  path="${complete%% *}"
18238  tmp="$complete EOL"
18239  arguments="${tmp#* }"
18240
18241  # Input might be given as Windows format, start by converting to
18242  # unix format.
18243  new_path=`$CYGPATH -u "$path"`
18244
18245  # Now try to locate executable using which
18246  new_path=`$WHICH "$new_path" 2> /dev/null`
18247  # bat and cmd files are not always considered executable in cygwin causing which
18248  # to not find them
18249  if test "x$new_path" = x \
18250           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18251           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18252    new_path=`$CYGPATH -u "$path"`
18253  fi
18254  if test "x$new_path" = x; then
18255    # Oops. Which didn't find the executable.
18256    # The splitting of arguments from the executable at a space might have been incorrect,
18257    # since paths with space are more likely in Windows. Give it another try with the whole
18258    # argument.
18259    path="$complete"
18260    arguments="EOL"
18261    new_path=`$CYGPATH -u "$path"`
18262    new_path=`$WHICH "$new_path" 2> /dev/null`
18263    # bat and cmd files are not always considered executable in cygwin causing which
18264    # to not find them
18265    if test "x$new_path" = x \
18266             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18267             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18268      new_path=`$CYGPATH -u "$path"`
18269    fi
18270    if test "x$new_path" = x; then
18271      # It's still not found. Now this is an unrecoverable error.
18272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18273$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18274      has_space=`$ECHO "$complete" | $GREP " "`
18275      if test "x$has_space" != x; then
18276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18278      fi
18279      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18280    fi
18281  fi
18282
18283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18286  # "foo.exe" is OK but "foo" is an error.
18287  #
18288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18289  # It is also a way to make sure we got the proper file name for the real test later on.
18290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18291  if test "x$test_shortpath" = x; then
18292    # Short path failed, file does not exist as specified.
18293    # Try adding .exe or .cmd
18294    if test -f "${new_path}.exe"; then
18295       input_to_shortpath="${new_path}.exe"
18296    elif test -f "${new_path}.cmd"; then
18297       input_to_shortpath="${new_path}.cmd"
18298    else
18299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18300$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18301      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18302$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18303      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18304    fi
18305  else
18306    input_to_shortpath="$new_path"
18307  fi
18308
18309  # Call helper function which possibly converts this using DOS-style short mode.
18310  # If so, the updated path is stored in $new_path.
18311  new_path="$input_to_shortpath"
18312
18313  input_path="$input_to_shortpath"
18314  # Check if we need to convert this using DOS-style short mode. If the path
18315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18316  # take no chances and rewrite it.
18317  # Note: m4 eats our [], so we need to use [ and ] instead.
18318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18319  if test "x$has_forbidden_chars" != x; then
18320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18324      # Going to short mode and back again did indeed matter. Since short mode is
18325      # case insensitive, let's make it lowercase to improve readability.
18326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18327      # Now convert it back to Unix-stile (cygpath)
18328      input_path=`$CYGPATH -u "$shortmode_path"`
18329      new_path="$input_path"
18330    fi
18331  fi
18332
18333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18334  if test "x$test_cygdrive_prefix" = x; then
18335    # As a simple fix, exclude /usr/bin since it's not a real path.
18336    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18338      # a path prefixed by /cygdrive for fixpath to work.
18339      new_path="$CYGWIN_ROOT_PATH$input_path"
18340    fi
18341  fi
18342
18343  # remove trailing .exe if any
18344  new_path="${new_path/%.exe/}"
18345
18346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18347
18348  # First separate the path from the arguments. This will split at the first
18349  # space.
18350  complete="$CC"
18351  path="${complete%% *}"
18352  tmp="$complete EOL"
18353  arguments="${tmp#* }"
18354
18355  # Input might be given as Windows format, start by converting to
18356  # unix format.
18357  new_path="$path"
18358
18359  windows_path="$new_path"
18360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18361    unix_path=`$CYGPATH -u "$windows_path"`
18362    new_path="$unix_path"
18363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18365    new_path="$unix_path"
18366  fi
18367
18368
18369  # Now try to locate executable using which
18370  new_path=`$WHICH "$new_path" 2> /dev/null`
18371
18372  if test "x$new_path" = x; then
18373    # Oops. Which didn't find the executable.
18374    # The splitting of arguments from the executable at a space might have been incorrect,
18375    # since paths with space are more likely in Windows. Give it another try with the whole
18376    # argument.
18377    path="$complete"
18378    arguments="EOL"
18379    new_path="$path"
18380
18381  windows_path="$new_path"
18382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18383    unix_path=`$CYGPATH -u "$windows_path"`
18384    new_path="$unix_path"
18385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18387    new_path="$unix_path"
18388  fi
18389
18390
18391    new_path=`$WHICH "$new_path" 2> /dev/null`
18392
18393    if test "x$new_path" = x; then
18394      # It's still not found. Now this is an unrecoverable error.
18395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18396$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18397      has_space=`$ECHO "$complete" | $GREP " "`
18398      if test "x$has_space" != x; then
18399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18401      fi
18402      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18403    fi
18404  fi
18405
18406  # Now new_path has a complete unix path to the binary
18407  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18408    # Keep paths in /bin as-is, but remove trailing .exe if any
18409    new_path="${new_path/%.exe/}"
18410    # Do not save /bin paths to all_fixpath_prefixes!
18411  else
18412    # Not in mixed or Windows style, start by that.
18413    new_path=`cmd //c echo $new_path`
18414
18415  input_path="$new_path"
18416  # Check if we need to convert this using DOS-style short mode. If the path
18417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18418  # take no chances and rewrite it.
18419  # Note: m4 eats our [], so we need to use [ and ] instead.
18420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18421  if test "x$has_forbidden_chars" != x; then
18422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18424  fi
18425
18426    # Output is in $new_path
18427
18428  windows_path="$new_path"
18429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18430    unix_path=`$CYGPATH -u "$windows_path"`
18431    new_path="$unix_path"
18432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18434    new_path="$unix_path"
18435  fi
18436
18437    # remove trailing .exe if any
18438    new_path="${new_path/%.exe/}"
18439
18440    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18441    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18442  fi
18443
18444  else
18445    # We're on a posix platform. Hooray! :)
18446    # First separate the path from the arguments. This will split at the first
18447    # space.
18448    complete="$CC"
18449    path="${complete%% *}"
18450    tmp="$complete EOL"
18451    arguments="${tmp#* }"
18452
18453    # Cannot rely on the command "which" here since it doesn't always work.
18454    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18455    if test -z "$is_absolute_path"; then
18456      # Path to executable is not absolute. Find it.
18457      IFS_save="$IFS"
18458      IFS=:
18459      for p in $PATH; do
18460        if test -f "$p/$path" && test -x "$p/$path"; then
18461          new_path="$p/$path"
18462          break
18463        fi
18464      done
18465      IFS="$IFS_save"
18466    else
18467      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18468$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18469      new_path="$path"
18470    fi
18471
18472    if test "x$new_path" = x; then
18473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18474$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18475        has_space=`$ECHO "$complete" | $GREP " "`
18476        if test "x$has_space" != x; then
18477          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18478$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18479        fi
18480        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18481      fi
18482  fi
18483
18484      # Now join together the path and the arguments once again
18485      if test "x$arguments" != xEOL; then
18486        new_complete="$new_path ${arguments% *}"
18487      else
18488        new_complete="$new_path"
18489      fi
18490
18491  if test "x$complete" != "x$new_complete"; then
18492      CC="$new_complete"
18493      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18494$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18495    fi
18496
18497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18498$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18499  TEST_COMPILER="$CC"
18500
18501    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18502        # Follow a chain of symbolic links. Use readlink
18503        # where it exists, else fall back to horribly
18504        # complicated shell code.
18505        if test "x$READLINK_TESTED" != yes; then
18506            # On MacOSX there is a readlink tool with a different
18507            # purpose than the GNU readlink tool. Check the found readlink.
18508            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18509            if test "x$ISGNU" = x; then
18510                 # A readlink that we do not know how to use.
18511                 # Are there other non-GNU readlinks out there?
18512                 READLINK_TESTED=yes
18513                 READLINK=
18514            fi
18515        fi
18516
18517        if test "x$READLINK" != x; then
18518            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18519        else
18520            # Save the current directory for restoring afterwards
18521            STARTDIR=$PWD
18522            COUNTER=0
18523            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18524            sym_link_file=`$BASENAME $TEST_COMPILER`
18525            # Use the system pwd and not the shell builtin to resolve directory symlinks
18526            cd $sym_link_dir
18527            cd `$THEPWDCMD`
18528            sym_link_dir=`$THEPWDCMD`
18529            # Resolve file symlinks
18530            while test $COUNTER -lt 20; do
18531                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18532                if test "x$ISLINK" == x; then
18533                    # This is not a symbolic link! We are done!
18534                    break
18535                fi
18536                # Again resolve directory symlinks since the target of the just found
18537                # link could be in a different directory
18538                cd `$DIRNAME $ISLINK`
18539                sym_link_dir=`$THEPWDCMD`
18540                sym_link_file=`$BASENAME $ISLINK`
18541                let COUNTER=COUNTER+1
18542            done
18543            cd $STARTDIR
18544            TEST_COMPILER=$sym_link_dir/$sym_link_file
18545        fi
18546    fi
18547
18548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18549$as_echo "$TEST_COMPILER" >&6; }
18550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18551$as_echo_n "checking if CC is disguised ccache... " >&6; }
18552
18553  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18554  if test "x$COMPILER_BASENAME" = "xccache"; then
18555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18556$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18557    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18558    # We want to control ccache invocation ourselves, so ignore this cc and try
18559    # searching again.
18560
18561    # Remove the path to the fake ccache cc from the PATH
18562    RETRY_COMPILER_SAVED_PATH="$PATH"
18563    COMPILER_DIRNAME=`$DIRNAME $CC`
18564    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18565
18566    # Try again looking for our compiler
18567    if test -n "$ac_tool_prefix"; then
18568  for ac_prog in $COMPILER_CHECK_LIST
18569  do
18570    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18573$as_echo_n "checking for $ac_word... " >&6; }
18574if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18575  $as_echo_n "(cached) " >&6
18576else
18577  if test -n "$PROPER_COMPILER_CC"; then
18578  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18579else
18580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581for as_dir in $PATH
18582do
18583  IFS=$as_save_IFS
18584  test -z "$as_dir" && as_dir=.
18585    for ac_exec_ext in '' $ac_executable_extensions; do
18586  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18587    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589    break 2
18590  fi
18591done
18592  done
18593IFS=$as_save_IFS
18594
18595fi
18596fi
18597PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18598if test -n "$PROPER_COMPILER_CC"; then
18599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18600$as_echo "$PROPER_COMPILER_CC" >&6; }
18601else
18602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603$as_echo "no" >&6; }
18604fi
18605
18606
18607    test -n "$PROPER_COMPILER_CC" && break
18608  done
18609fi
18610if test -z "$PROPER_COMPILER_CC"; then
18611  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18612  for ac_prog in $COMPILER_CHECK_LIST
18613do
18614  # Extract the first word of "$ac_prog", so it can be a program name with args.
18615set dummy $ac_prog; ac_word=$2
18616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18617$as_echo_n "checking for $ac_word... " >&6; }
18618if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18619  $as_echo_n "(cached) " >&6
18620else
18621  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18622  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18623else
18624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18625for as_dir in $PATH
18626do
18627  IFS=$as_save_IFS
18628  test -z "$as_dir" && as_dir=.
18629    for ac_exec_ext in '' $ac_executable_extensions; do
18630  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18631    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18633    break 2
18634  fi
18635done
18636  done
18637IFS=$as_save_IFS
18638
18639fi
18640fi
18641ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18642if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18644$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18645else
18646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18647$as_echo "no" >&6; }
18648fi
18649
18650
18651  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18652done
18653
18654  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18655    PROPER_COMPILER_CC=""
18656  else
18657    case $cross_compiling:$ac_tool_warned in
18658yes:)
18659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18661ac_tool_warned=yes ;;
18662esac
18663    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18664  fi
18665fi
18666
18667
18668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18669
18670  # First separate the path from the arguments. This will split at the first
18671  # space.
18672  complete="$PROPER_COMPILER_CC"
18673  path="${complete%% *}"
18674  tmp="$complete EOL"
18675  arguments="${tmp#* }"
18676
18677  # Input might be given as Windows format, start by converting to
18678  # unix format.
18679  new_path=`$CYGPATH -u "$path"`
18680
18681  # Now try to locate executable using which
18682  new_path=`$WHICH "$new_path" 2> /dev/null`
18683  # bat and cmd files are not always considered executable in cygwin causing which
18684  # to not find them
18685  if test "x$new_path" = x \
18686           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18687           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18688    new_path=`$CYGPATH -u "$path"`
18689  fi
18690  if test "x$new_path" = x; then
18691    # Oops. Which didn't find the executable.
18692    # The splitting of arguments from the executable at a space might have been incorrect,
18693    # since paths with space are more likely in Windows. Give it another try with the whole
18694    # argument.
18695    path="$complete"
18696    arguments="EOL"
18697    new_path=`$CYGPATH -u "$path"`
18698    new_path=`$WHICH "$new_path" 2> /dev/null`
18699    # bat and cmd files are not always considered executable in cygwin causing which
18700    # to not find them
18701    if test "x$new_path" = x \
18702             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18703             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18704      new_path=`$CYGPATH -u "$path"`
18705    fi
18706    if test "x$new_path" = x; then
18707      # It's still not found. Now this is an unrecoverable error.
18708      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18709$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18710      has_space=`$ECHO "$complete" | $GREP " "`
18711      if test "x$has_space" != x; then
18712        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18713$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18714      fi
18715      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18716    fi
18717  fi
18718
18719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18722  # "foo.exe" is OK but "foo" is an error.
18723  #
18724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18725  # It is also a way to make sure we got the proper file name for the real test later on.
18726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18727  if test "x$test_shortpath" = x; then
18728    # Short path failed, file does not exist as specified.
18729    # Try adding .exe or .cmd
18730    if test -f "${new_path}.exe"; then
18731       input_to_shortpath="${new_path}.exe"
18732    elif test -f "${new_path}.cmd"; then
18733       input_to_shortpath="${new_path}.cmd"
18734    else
18735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18736$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18737      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18738$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18739      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18740    fi
18741  else
18742    input_to_shortpath="$new_path"
18743  fi
18744
18745  # Call helper function which possibly converts this using DOS-style short mode.
18746  # If so, the updated path is stored in $new_path.
18747  new_path="$input_to_shortpath"
18748
18749  input_path="$input_to_shortpath"
18750  # Check if we need to convert this using DOS-style short mode. If the path
18751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18752  # take no chances and rewrite it.
18753  # Note: m4 eats our [], so we need to use [ and ] instead.
18754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18755  if test "x$has_forbidden_chars" != x; then
18756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18757    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18758    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18759    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18760      # Going to short mode and back again did indeed matter. Since short mode is
18761      # case insensitive, let's make it lowercase to improve readability.
18762      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18763      # Now convert it back to Unix-stile (cygpath)
18764      input_path=`$CYGPATH -u "$shortmode_path"`
18765      new_path="$input_path"
18766    fi
18767  fi
18768
18769  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18770  if test "x$test_cygdrive_prefix" = x; then
18771    # As a simple fix, exclude /usr/bin since it's not a real path.
18772    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18773      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18774      # a path prefixed by /cygdrive for fixpath to work.
18775      new_path="$CYGWIN_ROOT_PATH$input_path"
18776    fi
18777  fi
18778
18779  # remove trailing .exe if any
18780  new_path="${new_path/%.exe/}"
18781
18782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18783
18784  # First separate the path from the arguments. This will split at the first
18785  # space.
18786  complete="$PROPER_COMPILER_CC"
18787  path="${complete%% *}"
18788  tmp="$complete EOL"
18789  arguments="${tmp#* }"
18790
18791  # Input might be given as Windows format, start by converting to
18792  # unix format.
18793  new_path="$path"
18794
18795  windows_path="$new_path"
18796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18797    unix_path=`$CYGPATH -u "$windows_path"`
18798    new_path="$unix_path"
18799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18801    new_path="$unix_path"
18802  fi
18803
18804
18805  # Now try to locate executable using which
18806  new_path=`$WHICH "$new_path" 2> /dev/null`
18807
18808  if test "x$new_path" = x; then
18809    # Oops. Which didn't find the executable.
18810    # The splitting of arguments from the executable at a space might have been incorrect,
18811    # since paths with space are more likely in Windows. Give it another try with the whole
18812    # argument.
18813    path="$complete"
18814    arguments="EOL"
18815    new_path="$path"
18816
18817  windows_path="$new_path"
18818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18819    unix_path=`$CYGPATH -u "$windows_path"`
18820    new_path="$unix_path"
18821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18823    new_path="$unix_path"
18824  fi
18825
18826
18827    new_path=`$WHICH "$new_path" 2> /dev/null`
18828
18829    if test "x$new_path" = x; then
18830      # It's still not found. Now this is an unrecoverable error.
18831      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18832$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18833      has_space=`$ECHO "$complete" | $GREP " "`
18834      if test "x$has_space" != x; then
18835        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18836$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18837      fi
18838      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18839    fi
18840  fi
18841
18842  # Now new_path has a complete unix path to the binary
18843  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18844    # Keep paths in /bin as-is, but remove trailing .exe if any
18845    new_path="${new_path/%.exe/}"
18846    # Do not save /bin paths to all_fixpath_prefixes!
18847  else
18848    # Not in mixed or Windows style, start by that.
18849    new_path=`cmd //c echo $new_path`
18850
18851  input_path="$new_path"
18852  # Check if we need to convert this using DOS-style short mode. If the path
18853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18854  # take no chances and rewrite it.
18855  # Note: m4 eats our [], so we need to use [ and ] instead.
18856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18857  if test "x$has_forbidden_chars" != x; then
18858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18860  fi
18861
18862    # Output is in $new_path
18863
18864  windows_path="$new_path"
18865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18866    unix_path=`$CYGPATH -u "$windows_path"`
18867    new_path="$unix_path"
18868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18870    new_path="$unix_path"
18871  fi
18872
18873    # remove trailing .exe if any
18874    new_path="${new_path/%.exe/}"
18875
18876    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18877    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18878  fi
18879
18880  else
18881    # We're on a posix platform. Hooray! :)
18882    # First separate the path from the arguments. This will split at the first
18883    # space.
18884    complete="$PROPER_COMPILER_CC"
18885    path="${complete%% *}"
18886    tmp="$complete EOL"
18887    arguments="${tmp#* }"
18888
18889    # Cannot rely on the command "which" here since it doesn't always work.
18890    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18891    if test -z "$is_absolute_path"; then
18892      # Path to executable is not absolute. Find it.
18893      IFS_save="$IFS"
18894      IFS=:
18895      for p in $PATH; do
18896        if test -f "$p/$path" && test -x "$p/$path"; then
18897          new_path="$p/$path"
18898          break
18899        fi
18900      done
18901      IFS="$IFS_save"
18902    else
18903      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18904$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18905      new_path="$path"
18906    fi
18907
18908    if test "x$new_path" = x; then
18909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18910$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18911        has_space=`$ECHO "$complete" | $GREP " "`
18912        if test "x$has_space" != x; then
18913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18915        fi
18916        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18917      fi
18918  fi
18919
18920      # Now join together the path and the arguments once again
18921      if test "x$arguments" != xEOL; then
18922        new_complete="$new_path ${arguments% *}"
18923      else
18924        new_complete="$new_path"
18925      fi
18926
18927  if test "x$complete" != "x$new_complete"; then
18928      PROPER_COMPILER_CC="$new_complete"
18929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18930$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18931    fi
18932
18933    PATH="$RETRY_COMPILER_SAVED_PATH"
18934
18935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18936$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18937
18938    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18939        # Follow a chain of symbolic links. Use readlink
18940        # where it exists, else fall back to horribly
18941        # complicated shell code.
18942        if test "x$READLINK_TESTED" != yes; then
18943            # On MacOSX there is a readlink tool with a different
18944            # purpose than the GNU readlink tool. Check the found readlink.
18945            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18946            if test "x$ISGNU" = x; then
18947                 # A readlink that we do not know how to use.
18948                 # Are there other non-GNU readlinks out there?
18949                 READLINK_TESTED=yes
18950                 READLINK=
18951            fi
18952        fi
18953
18954        if test "x$READLINK" != x; then
18955            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18956        else
18957            # Save the current directory for restoring afterwards
18958            STARTDIR=$PWD
18959            COUNTER=0
18960            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18961            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18962            # Use the system pwd and not the shell builtin to resolve directory symlinks
18963            cd $sym_link_dir
18964            cd `$THEPWDCMD`
18965            sym_link_dir=`$THEPWDCMD`
18966            # Resolve file symlinks
18967            while test $COUNTER -lt 20; do
18968                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18969                if test "x$ISLINK" == x; then
18970                    # This is not a symbolic link! We are done!
18971                    break
18972                fi
18973                # Again resolve directory symlinks since the target of the just found
18974                # link could be in a different directory
18975                cd `$DIRNAME $ISLINK`
18976                sym_link_dir=`$THEPWDCMD`
18977                sym_link_file=`$BASENAME $ISLINK`
18978                let COUNTER=COUNTER+1
18979            done
18980            cd $STARTDIR
18981            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18982        fi
18983    fi
18984
18985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18986$as_echo "$PROPER_COMPILER_CC" >&6; }
18987    CC="$PROPER_COMPILER_CC"
18988  else
18989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18990$as_echo "no, keeping CC" >&6; }
18991    CC="$TEST_COMPILER"
18992  fi
18993
18994  COMPILER=$CC
18995  COMPILER_NAME=$COMPILER_NAME
18996
18997  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18998    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18999    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19000    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19001    if test $? -ne 0; then
19002      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19003
19004      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
19005$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19006      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19007$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19008      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19009    else
19010      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19011      COMPILER_VENDOR="Sun Studio"
19012    fi
19013  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19014    # First line typically looks something like:
19015    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19016    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19017    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19018    COMPILER_VENDOR="Microsoft CL.EXE"
19019    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19020    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19021      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19022        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19023      fi
19024    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19025      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19026        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19027      fi
19028    fi
19029  else
19030    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19031    # Check that this is likely to be GCC.
19032    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19033    if test $? -ne 0; then
19034      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19035$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19036      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19037$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19038      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19039    fi
19040
19041    # First line typically looks something like:
19042    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19043    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19044    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19045  fi
19046  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19047  CC_VERSION="$COMPILER_VERSION"
19048  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19049  CC_VENDOR="$COMPILER_VENDOR"
19050
19051  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19052$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19053
19054
19055# Now that we have resolved CC ourself, let autoconf have it's go at it
19056ac_ext=c
19057ac_cpp='$CPP $CPPFLAGS'
19058ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19059ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19060ac_compiler_gnu=$ac_cv_c_compiler_gnu
19061if test -n "$ac_tool_prefix"; then
19062  for ac_prog in $CC
19063  do
19064    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19065set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19067$as_echo_n "checking for $ac_word... " >&6; }
19068if test "${ac_cv_prog_CC+set}" = set; then :
19069  $as_echo_n "(cached) " >&6
19070else
19071  if test -n "$CC"; then
19072  ac_cv_prog_CC="$CC" # Let the user override the test.
19073else
19074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19075for as_dir in $PATH
19076do
19077  IFS=$as_save_IFS
19078  test -z "$as_dir" && as_dir=.
19079    for ac_exec_ext in '' $ac_executable_extensions; do
19080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19081    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19083    break 2
19084  fi
19085done
19086  done
19087IFS=$as_save_IFS
19088
19089fi
19090fi
19091CC=$ac_cv_prog_CC
19092if test -n "$CC"; then
19093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19094$as_echo "$CC" >&6; }
19095else
19096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19097$as_echo "no" >&6; }
19098fi
19099
19100
19101    test -n "$CC" && break
19102  done
19103fi
19104if test -z "$CC"; then
19105  ac_ct_CC=$CC
19106  for ac_prog in $CC
19107do
19108  # Extract the first word of "$ac_prog", so it can be a program name with args.
19109set dummy $ac_prog; ac_word=$2
19110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19111$as_echo_n "checking for $ac_word... " >&6; }
19112if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19113  $as_echo_n "(cached) " >&6
19114else
19115  if test -n "$ac_ct_CC"; then
19116  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19117else
19118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19119for as_dir in $PATH
19120do
19121  IFS=$as_save_IFS
19122  test -z "$as_dir" && as_dir=.
19123    for ac_exec_ext in '' $ac_executable_extensions; do
19124  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19125    ac_cv_prog_ac_ct_CC="$ac_prog"
19126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19127    break 2
19128  fi
19129done
19130  done
19131IFS=$as_save_IFS
19132
19133fi
19134fi
19135ac_ct_CC=$ac_cv_prog_ac_ct_CC
19136if test -n "$ac_ct_CC"; then
19137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19138$as_echo "$ac_ct_CC" >&6; }
19139else
19140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19141$as_echo "no" >&6; }
19142fi
19143
19144
19145  test -n "$ac_ct_CC" && break
19146done
19147
19148  if test "x$ac_ct_CC" = x; then
19149    CC=""
19150  else
19151    case $cross_compiling:$ac_tool_warned in
19152yes:)
19153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19155ac_tool_warned=yes ;;
19156esac
19157    CC=$ac_ct_CC
19158  fi
19159fi
19160
19161
19162test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19164as_fn_error $? "no acceptable C compiler found in \$PATH
19165See \`config.log' for more details" "$LINENO" 5 ; }
19166
19167# Provide some information about the compiler.
19168$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19169set X $ac_compile
19170ac_compiler=$2
19171for ac_option in --version -v -V -qversion; do
19172  { { ac_try="$ac_compiler $ac_option >&5"
19173case "(($ac_try" in
19174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19175  *) ac_try_echo=$ac_try;;
19176esac
19177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19178$as_echo "$ac_try_echo"; } >&5
19179  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19180  ac_status=$?
19181  if test -s conftest.err; then
19182    sed '10a\
19183... rest of stderr output deleted ...
19184         10q' conftest.err >conftest.er1
19185    cat conftest.er1 >&5
19186  fi
19187  rm -f conftest.er1 conftest.err
19188  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19189  test $ac_status = 0; }
19190done
19191
19192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19193/* end confdefs.h.  */
19194
19195int
19196main ()
19197{
19198
19199  ;
19200  return 0;
19201}
19202_ACEOF
19203ac_clean_files_save=$ac_clean_files
19204ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19205# Try to create an executable without -o first, disregard a.out.
19206# It will help us diagnose broken compilers, and finding out an intuition
19207# of exeext.
19208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19209$as_echo_n "checking whether the C compiler works... " >&6; }
19210ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19211
19212# The possible output files:
19213ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19214
19215ac_rmfiles=
19216for ac_file in $ac_files
19217do
19218  case $ac_file in
19219    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19220    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19221  esac
19222done
19223rm -f $ac_rmfiles
19224
19225if { { ac_try="$ac_link_default"
19226case "(($ac_try" in
19227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19228  *) ac_try_echo=$ac_try;;
19229esac
19230eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19231$as_echo "$ac_try_echo"; } >&5
19232  (eval "$ac_link_default") 2>&5
19233  ac_status=$?
19234  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19235  test $ac_status = 0; }; then :
19236  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19237# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19238# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19239# so that the user can short-circuit this test for compilers unknown to
19240# Autoconf.
19241for ac_file in $ac_files ''
19242do
19243  test -f "$ac_file" || continue
19244  case $ac_file in
19245    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19246	;;
19247    [ab].out )
19248	# We found the default executable, but exeext='' is most
19249	# certainly right.
19250	break;;
19251    *.* )
19252	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19253	then :; else
19254	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19255	fi
19256	# We set ac_cv_exeext here because the later test for it is not
19257	# safe: cross compilers may not add the suffix if given an `-o'
19258	# argument, so we may need to know it at that point already.
19259	# Even if this section looks crufty: it has the advantage of
19260	# actually working.
19261	break;;
19262    * )
19263	break;;
19264  esac
19265done
19266test "$ac_cv_exeext" = no && ac_cv_exeext=
19267
19268else
19269  ac_file=''
19270fi
19271if test -z "$ac_file"; then :
19272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19273$as_echo "no" >&6; }
19274$as_echo "$as_me: failed program was:" >&5
19275sed 's/^/| /' conftest.$ac_ext >&5
19276
19277{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19278$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19279as_fn_error 77 "C compiler cannot create executables
19280See \`config.log' for more details" "$LINENO" 5 ; }
19281else
19282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19283$as_echo "yes" >&6; }
19284fi
19285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19286$as_echo_n "checking for C compiler default output file name... " >&6; }
19287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19288$as_echo "$ac_file" >&6; }
19289ac_exeext=$ac_cv_exeext
19290
19291rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19292ac_clean_files=$ac_clean_files_save
19293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19294$as_echo_n "checking for suffix of executables... " >&6; }
19295if { { ac_try="$ac_link"
19296case "(($ac_try" in
19297  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19298  *) ac_try_echo=$ac_try;;
19299esac
19300eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19301$as_echo "$ac_try_echo"; } >&5
19302  (eval "$ac_link") 2>&5
19303  ac_status=$?
19304  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19305  test $ac_status = 0; }; then :
19306  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19307# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19308# work properly (i.e., refer to `conftest.exe'), while it won't with
19309# `rm'.
19310for ac_file in conftest.exe conftest conftest.*; do
19311  test -f "$ac_file" || continue
19312  case $ac_file in
19313    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19314    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19315	  break;;
19316    * ) break;;
19317  esac
19318done
19319else
19320  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19322as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19323See \`config.log' for more details" "$LINENO" 5 ; }
19324fi
19325rm -f conftest conftest$ac_cv_exeext
19326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19327$as_echo "$ac_cv_exeext" >&6; }
19328
19329rm -f conftest.$ac_ext
19330EXEEXT=$ac_cv_exeext
19331ac_exeext=$EXEEXT
19332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333/* end confdefs.h.  */
19334#include <stdio.h>
19335int
19336main ()
19337{
19338FILE *f = fopen ("conftest.out", "w");
19339 return ferror (f) || fclose (f) != 0;
19340
19341  ;
19342  return 0;
19343}
19344_ACEOF
19345ac_clean_files="$ac_clean_files conftest.out"
19346# Check that the compiler produces executables we can run.  If not, either
19347# the compiler is broken, or we cross compile.
19348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19349$as_echo_n "checking whether we are cross compiling... " >&6; }
19350if test "$cross_compiling" != yes; then
19351  { { ac_try="$ac_link"
19352case "(($ac_try" in
19353  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19354  *) ac_try_echo=$ac_try;;
19355esac
19356eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19357$as_echo "$ac_try_echo"; } >&5
19358  (eval "$ac_link") 2>&5
19359  ac_status=$?
19360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19361  test $ac_status = 0; }
19362  if { ac_try='./conftest$ac_cv_exeext'
19363  { { case "(($ac_try" in
19364  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19365  *) ac_try_echo=$ac_try;;
19366esac
19367eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19368$as_echo "$ac_try_echo"; } >&5
19369  (eval "$ac_try") 2>&5
19370  ac_status=$?
19371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19372  test $ac_status = 0; }; }; then
19373    cross_compiling=no
19374  else
19375    if test "$cross_compiling" = maybe; then
19376	cross_compiling=yes
19377    else
19378	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19380as_fn_error $? "cannot run C compiled programs.
19381If you meant to cross compile, use \`--host'.
19382See \`config.log' for more details" "$LINENO" 5 ; }
19383    fi
19384  fi
19385fi
19386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19387$as_echo "$cross_compiling" >&6; }
19388
19389rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19390ac_clean_files=$ac_clean_files_save
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19392$as_echo_n "checking for suffix of object files... " >&6; }
19393if test "${ac_cv_objext+set}" = set; then :
19394  $as_echo_n "(cached) " >&6
19395else
19396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19397/* end confdefs.h.  */
19398
19399int
19400main ()
19401{
19402
19403  ;
19404  return 0;
19405}
19406_ACEOF
19407rm -f conftest.o conftest.obj
19408if { { ac_try="$ac_compile"
19409case "(($ac_try" in
19410  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19411  *) ac_try_echo=$ac_try;;
19412esac
19413eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19414$as_echo "$ac_try_echo"; } >&5
19415  (eval "$ac_compile") 2>&5
19416  ac_status=$?
19417  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19418  test $ac_status = 0; }; then :
19419  for ac_file in conftest.o conftest.obj conftest.*; do
19420  test -f "$ac_file" || continue;
19421  case $ac_file in
19422    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19423    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19424       break;;
19425  esac
19426done
19427else
19428  $as_echo "$as_me: failed program was:" >&5
19429sed 's/^/| /' conftest.$ac_ext >&5
19430
19431{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19433as_fn_error $? "cannot compute suffix of object files: cannot compile
19434See \`config.log' for more details" "$LINENO" 5 ; }
19435fi
19436rm -f conftest.$ac_cv_objext conftest.$ac_ext
19437fi
19438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19439$as_echo "$ac_cv_objext" >&6; }
19440OBJEXT=$ac_cv_objext
19441ac_objext=$OBJEXT
19442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19443$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19444if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19445  $as_echo_n "(cached) " >&6
19446else
19447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19448/* end confdefs.h.  */
19449
19450int
19451main ()
19452{
19453#ifndef __GNUC__
19454       choke me
19455#endif
19456
19457  ;
19458  return 0;
19459}
19460_ACEOF
19461if ac_fn_c_try_compile "$LINENO"; then :
19462  ac_compiler_gnu=yes
19463else
19464  ac_compiler_gnu=no
19465fi
19466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19467ac_cv_c_compiler_gnu=$ac_compiler_gnu
19468
19469fi
19470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19471$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19472if test $ac_compiler_gnu = yes; then
19473  GCC=yes
19474else
19475  GCC=
19476fi
19477ac_test_CFLAGS=${CFLAGS+set}
19478ac_save_CFLAGS=$CFLAGS
19479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19480$as_echo_n "checking whether $CC accepts -g... " >&6; }
19481if test "${ac_cv_prog_cc_g+set}" = set; then :
19482  $as_echo_n "(cached) " >&6
19483else
19484  ac_save_c_werror_flag=$ac_c_werror_flag
19485   ac_c_werror_flag=yes
19486   ac_cv_prog_cc_g=no
19487   CFLAGS="-g"
19488   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19489/* end confdefs.h.  */
19490
19491int
19492main ()
19493{
19494
19495  ;
19496  return 0;
19497}
19498_ACEOF
19499if ac_fn_c_try_compile "$LINENO"; then :
19500  ac_cv_prog_cc_g=yes
19501else
19502  CFLAGS=""
19503      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19504/* end confdefs.h.  */
19505
19506int
19507main ()
19508{
19509
19510  ;
19511  return 0;
19512}
19513_ACEOF
19514if ac_fn_c_try_compile "$LINENO"; then :
19515
19516else
19517  ac_c_werror_flag=$ac_save_c_werror_flag
19518	 CFLAGS="-g"
19519	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19520/* end confdefs.h.  */
19521
19522int
19523main ()
19524{
19525
19526  ;
19527  return 0;
19528}
19529_ACEOF
19530if ac_fn_c_try_compile "$LINENO"; then :
19531  ac_cv_prog_cc_g=yes
19532fi
19533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19534fi
19535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19536fi
19537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19538   ac_c_werror_flag=$ac_save_c_werror_flag
19539fi
19540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19541$as_echo "$ac_cv_prog_cc_g" >&6; }
19542if test "$ac_test_CFLAGS" = set; then
19543  CFLAGS=$ac_save_CFLAGS
19544elif test $ac_cv_prog_cc_g = yes; then
19545  if test "$GCC" = yes; then
19546    CFLAGS="-g -O2"
19547  else
19548    CFLAGS="-g"
19549  fi
19550else
19551  if test "$GCC" = yes; then
19552    CFLAGS="-O2"
19553  else
19554    CFLAGS=
19555  fi
19556fi
19557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19558$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19559if test "${ac_cv_prog_cc_c89+set}" = set; then :
19560  $as_echo_n "(cached) " >&6
19561else
19562  ac_cv_prog_cc_c89=no
19563ac_save_CC=$CC
19564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19565/* end confdefs.h.  */
19566#include <stdarg.h>
19567#include <stdio.h>
19568#include <sys/types.h>
19569#include <sys/stat.h>
19570/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19571struct buf { int x; };
19572FILE * (*rcsopen) (struct buf *, struct stat *, int);
19573static char *e (p, i)
19574     char **p;
19575     int i;
19576{
19577  return p[i];
19578}
19579static char *f (char * (*g) (char **, int), char **p, ...)
19580{
19581  char *s;
19582  va_list v;
19583  va_start (v,p);
19584  s = g (p, va_arg (v,int));
19585  va_end (v);
19586  return s;
19587}
19588
19589/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19590   function prototypes and stuff, but not '\xHH' hex character constants.
19591   These don't provoke an error unfortunately, instead are silently treated
19592   as 'x'.  The following induces an error, until -std is added to get
19593   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19594   array size at least.  It's necessary to write '\x00'==0 to get something
19595   that's true only with -std.  */
19596int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19597
19598/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19599   inside strings and character constants.  */
19600#define FOO(x) 'x'
19601int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19602
19603int test (int i, double x);
19604struct s1 {int (*f) (int a);};
19605struct s2 {int (*f) (double a);};
19606int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19607int argc;
19608char **argv;
19609int
19610main ()
19611{
19612return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19613  ;
19614  return 0;
19615}
19616_ACEOF
19617for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19618	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19619do
19620  CC="$ac_save_CC $ac_arg"
19621  if ac_fn_c_try_compile "$LINENO"; then :
19622  ac_cv_prog_cc_c89=$ac_arg
19623fi
19624rm -f core conftest.err conftest.$ac_objext
19625  test "x$ac_cv_prog_cc_c89" != "xno" && break
19626done
19627rm -f conftest.$ac_ext
19628CC=$ac_save_CC
19629
19630fi
19631# AC_CACHE_VAL
19632case "x$ac_cv_prog_cc_c89" in
19633  x)
19634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19635$as_echo "none needed" >&6; } ;;
19636  xno)
19637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19638$as_echo "unsupported" >&6; } ;;
19639  *)
19640    CC="$CC $ac_cv_prog_cc_c89"
19641    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19642$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19643esac
19644if test "x$ac_cv_prog_cc_c89" != xno; then :
19645
19646fi
19647
19648ac_ext=cpp
19649ac_cpp='$CXXCPP $CPPFLAGS'
19650ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19651ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19652ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19653
19654
19655### Locate C++ compiler (CXX)
19656
19657if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19658  # Do not probe for CC on MacOSX.
19659  COMPILER_CHECK_LIST="cl g++"
19660else
19661  COMPILER_CHECK_LIST="cl CC g++"
19662fi
19663
19664  COMPILER_NAME=C++
19665
19666  CXX=
19667  # If TOOLS_DIR is set, check for all compiler names in there first
19668  # before checking the rest of the PATH.
19669  if test -n "$TOOLS_DIR"; then
19670    PATH_save="$PATH"
19671    PATH="$TOOLS_DIR"
19672    for ac_prog in $COMPILER_CHECK_LIST
19673do
19674  # Extract the first word of "$ac_prog", so it can be a program name with args.
19675set dummy $ac_prog; ac_word=$2
19676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19677$as_echo_n "checking for $ac_word... " >&6; }
19678if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19679  $as_echo_n "(cached) " >&6
19680else
19681  case $TOOLS_DIR_CXX in
19682  [\\/]* | ?:[\\/]*)
19683  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19684  ;;
19685  *)
19686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19687for as_dir in $PATH
19688do
19689  IFS=$as_save_IFS
19690  test -z "$as_dir" && as_dir=.
19691    for ac_exec_ext in '' $ac_executable_extensions; do
19692  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19693    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19695    break 2
19696  fi
19697done
19698  done
19699IFS=$as_save_IFS
19700
19701  ;;
19702esac
19703fi
19704TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19705if test -n "$TOOLS_DIR_CXX"; then
19706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19707$as_echo "$TOOLS_DIR_CXX" >&6; }
19708else
19709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19710$as_echo "no" >&6; }
19711fi
19712
19713
19714  test -n "$TOOLS_DIR_CXX" && break
19715done
19716
19717    CXX=$TOOLS_DIR_CXX
19718    PATH="$PATH_save"
19719  fi
19720
19721  # AC_PATH_PROGS can't be run multiple times with the same variable,
19722  # so create a new name for this run.
19723  if test "x$CXX" = x; then
19724    for ac_prog in $COMPILER_CHECK_LIST
19725do
19726  # Extract the first word of "$ac_prog", so it can be a program name with args.
19727set dummy $ac_prog; ac_word=$2
19728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19729$as_echo_n "checking for $ac_word... " >&6; }
19730if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19731  $as_echo_n "(cached) " >&6
19732else
19733  case $POTENTIAL_CXX in
19734  [\\/]* | ?:[\\/]*)
19735  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19736  ;;
19737  *)
19738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19739for as_dir in $PATH
19740do
19741  IFS=$as_save_IFS
19742  test -z "$as_dir" && as_dir=.
19743    for ac_exec_ext in '' $ac_executable_extensions; do
19744  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19745    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19747    break 2
19748  fi
19749done
19750  done
19751IFS=$as_save_IFS
19752
19753  ;;
19754esac
19755fi
19756POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19757if test -n "$POTENTIAL_CXX"; then
19758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19759$as_echo "$POTENTIAL_CXX" >&6; }
19760else
19761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19762$as_echo "no" >&6; }
19763fi
19764
19765
19766  test -n "$POTENTIAL_CXX" && break
19767done
19768
19769    CXX=$POTENTIAL_CXX
19770  fi
19771
19772  if test "x$CXX" = x; then
19773
19774    # Print a helpful message on how to acquire the necessary build dependency.
19775    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19776    MISSING_DEPENDENCY=devkit
19777    PKGHANDLER_COMMAND=
19778
19779    case $PKGHANDLER in
19780	apt-get)
19781                apt_help     $MISSING_DEPENDENCY ;;
19782    yum)
19783                yum_help     $MISSING_DEPENDENCY ;;
19784	port)
19785                port_help    $MISSING_DEPENDENCY ;;
19786	pkgutil)
19787                pkgutil_help $MISSING_DEPENDENCY ;;
19788	pkgadd)
19789                pkgadd_help  $MISSING_DEPENDENCY ;;
19790    * )
19791      break ;;
19792    esac
19793
19794    if test "x$PKGHANDLER_COMMAND" != x; then
19795        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19796    fi
19797
19798      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19799  fi
19800
19801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19802
19803  # First separate the path from the arguments. This will split at the first
19804  # space.
19805  complete="$CXX"
19806  path="${complete%% *}"
19807  tmp="$complete EOL"
19808  arguments="${tmp#* }"
19809
19810  # Input might be given as Windows format, start by converting to
19811  # unix format.
19812  new_path=`$CYGPATH -u "$path"`
19813
19814  # Now try to locate executable using which
19815  new_path=`$WHICH "$new_path" 2> /dev/null`
19816  # bat and cmd files are not always considered executable in cygwin causing which
19817  # to not find them
19818  if test "x$new_path" = x \
19819           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19820           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19821    new_path=`$CYGPATH -u "$path"`
19822  fi
19823  if test "x$new_path" = x; then
19824    # Oops. Which didn't find the executable.
19825    # The splitting of arguments from the executable at a space might have been incorrect,
19826    # since paths with space are more likely in Windows. Give it another try with the whole
19827    # argument.
19828    path="$complete"
19829    arguments="EOL"
19830    new_path=`$CYGPATH -u "$path"`
19831    new_path=`$WHICH "$new_path" 2> /dev/null`
19832    # bat and cmd files are not always considered executable in cygwin causing which
19833    # to not find them
19834    if test "x$new_path" = x \
19835             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19836             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19837      new_path=`$CYGPATH -u "$path"`
19838    fi
19839    if test "x$new_path" = x; then
19840      # It's still not found. Now this is an unrecoverable error.
19841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19842$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19843      has_space=`$ECHO "$complete" | $GREP " "`
19844      if test "x$has_space" != x; then
19845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19847      fi
19848      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19849    fi
19850  fi
19851
19852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19855  # "foo.exe" is OK but "foo" is an error.
19856  #
19857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19858  # It is also a way to make sure we got the proper file name for the real test later on.
19859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19860  if test "x$test_shortpath" = x; then
19861    # Short path failed, file does not exist as specified.
19862    # Try adding .exe or .cmd
19863    if test -f "${new_path}.exe"; then
19864       input_to_shortpath="${new_path}.exe"
19865    elif test -f "${new_path}.cmd"; then
19866       input_to_shortpath="${new_path}.cmd"
19867    else
19868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19869$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19872      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19873    fi
19874  else
19875    input_to_shortpath="$new_path"
19876  fi
19877
19878  # Call helper function which possibly converts this using DOS-style short mode.
19879  # If so, the updated path is stored in $new_path.
19880  new_path="$input_to_shortpath"
19881
19882  input_path="$input_to_shortpath"
19883  # Check if we need to convert this using DOS-style short mode. If the path
19884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19885  # take no chances and rewrite it.
19886  # Note: m4 eats our [], so we need to use [ and ] instead.
19887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19888  if test "x$has_forbidden_chars" != x; then
19889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19893      # Going to short mode and back again did indeed matter. Since short mode is
19894      # case insensitive, let's make it lowercase to improve readability.
19895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19896      # Now convert it back to Unix-stile (cygpath)
19897      input_path=`$CYGPATH -u "$shortmode_path"`
19898      new_path="$input_path"
19899    fi
19900  fi
19901
19902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19903  if test "x$test_cygdrive_prefix" = x; then
19904    # As a simple fix, exclude /usr/bin since it's not a real path.
19905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19907      # a path prefixed by /cygdrive for fixpath to work.
19908      new_path="$CYGWIN_ROOT_PATH$input_path"
19909    fi
19910  fi
19911
19912  # remove trailing .exe if any
19913  new_path="${new_path/%.exe/}"
19914
19915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19916
19917  # First separate the path from the arguments. This will split at the first
19918  # space.
19919  complete="$CXX"
19920  path="${complete%% *}"
19921  tmp="$complete EOL"
19922  arguments="${tmp#* }"
19923
19924  # Input might be given as Windows format, start by converting to
19925  # unix format.
19926  new_path="$path"
19927
19928  windows_path="$new_path"
19929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19930    unix_path=`$CYGPATH -u "$windows_path"`
19931    new_path="$unix_path"
19932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19934    new_path="$unix_path"
19935  fi
19936
19937
19938  # Now try to locate executable using which
19939  new_path=`$WHICH "$new_path" 2> /dev/null`
19940
19941  if test "x$new_path" = x; then
19942    # Oops. Which didn't find the executable.
19943    # The splitting of arguments from the executable at a space might have been incorrect,
19944    # since paths with space are more likely in Windows. Give it another try with the whole
19945    # argument.
19946    path="$complete"
19947    arguments="EOL"
19948    new_path="$path"
19949
19950  windows_path="$new_path"
19951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19952    unix_path=`$CYGPATH -u "$windows_path"`
19953    new_path="$unix_path"
19954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19956    new_path="$unix_path"
19957  fi
19958
19959
19960    new_path=`$WHICH "$new_path" 2> /dev/null`
19961
19962    if test "x$new_path" = x; then
19963      # It's still not found. Now this is an unrecoverable error.
19964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19965$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19966      has_space=`$ECHO "$complete" | $GREP " "`
19967      if test "x$has_space" != x; then
19968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19970      fi
19971      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19972    fi
19973  fi
19974
19975  # Now new_path has a complete unix path to the binary
19976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19977    # Keep paths in /bin as-is, but remove trailing .exe if any
19978    new_path="${new_path/%.exe/}"
19979    # Do not save /bin paths to all_fixpath_prefixes!
19980  else
19981    # Not in mixed or Windows style, start by that.
19982    new_path=`cmd //c echo $new_path`
19983
19984  input_path="$new_path"
19985  # Check if we need to convert this using DOS-style short mode. If the path
19986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19987  # take no chances and rewrite it.
19988  # Note: m4 eats our [], so we need to use [ and ] instead.
19989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19990  if test "x$has_forbidden_chars" != x; then
19991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19993  fi
19994
19995    # Output is in $new_path
19996
19997  windows_path="$new_path"
19998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19999    unix_path=`$CYGPATH -u "$windows_path"`
20000    new_path="$unix_path"
20001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20003    new_path="$unix_path"
20004  fi
20005
20006    # remove trailing .exe if any
20007    new_path="${new_path/%.exe/}"
20008
20009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20011  fi
20012
20013  else
20014    # We're on a posix platform. Hooray! :)
20015    # First separate the path from the arguments. This will split at the first
20016    # space.
20017    complete="$CXX"
20018    path="${complete%% *}"
20019    tmp="$complete EOL"
20020    arguments="${tmp#* }"
20021
20022    # Cannot rely on the command "which" here since it doesn't always work.
20023    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20024    if test -z "$is_absolute_path"; then
20025      # Path to executable is not absolute. Find it.
20026      IFS_save="$IFS"
20027      IFS=:
20028      for p in $PATH; do
20029        if test -f "$p/$path" && test -x "$p/$path"; then
20030          new_path="$p/$path"
20031          break
20032        fi
20033      done
20034      IFS="$IFS_save"
20035    else
20036      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20037$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20038      new_path="$path"
20039    fi
20040
20041    if test "x$new_path" = x; then
20042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20043$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20044        has_space=`$ECHO "$complete" | $GREP " "`
20045        if test "x$has_space" != x; then
20046          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20048        fi
20049        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20050      fi
20051  fi
20052
20053      # Now join together the path and the arguments once again
20054      if test "x$arguments" != xEOL; then
20055        new_complete="$new_path ${arguments% *}"
20056      else
20057        new_complete="$new_path"
20058      fi
20059
20060  if test "x$complete" != "x$new_complete"; then
20061      CXX="$new_complete"
20062      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20063$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20064    fi
20065
20066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20067$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20068  TEST_COMPILER="$CXX"
20069
20070    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20071        # Follow a chain of symbolic links. Use readlink
20072        # where it exists, else fall back to horribly
20073        # complicated shell code.
20074        if test "x$READLINK_TESTED" != yes; then
20075            # On MacOSX there is a readlink tool with a different
20076            # purpose than the GNU readlink tool. Check the found readlink.
20077            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20078            if test "x$ISGNU" = x; then
20079                 # A readlink that we do not know how to use.
20080                 # Are there other non-GNU readlinks out there?
20081                 READLINK_TESTED=yes
20082                 READLINK=
20083            fi
20084        fi
20085
20086        if test "x$READLINK" != x; then
20087            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20088        else
20089            # Save the current directory for restoring afterwards
20090            STARTDIR=$PWD
20091            COUNTER=0
20092            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20093            sym_link_file=`$BASENAME $TEST_COMPILER`
20094            # Use the system pwd and not the shell builtin to resolve directory symlinks
20095            cd $sym_link_dir
20096            cd `$THEPWDCMD`
20097            sym_link_dir=`$THEPWDCMD`
20098            # Resolve file symlinks
20099            while test $COUNTER -lt 20; do
20100                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20101                if test "x$ISLINK" == x; then
20102                    # This is not a symbolic link! We are done!
20103                    break
20104                fi
20105                # Again resolve directory symlinks since the target of the just found
20106                # link could be in a different directory
20107                cd `$DIRNAME $ISLINK`
20108                sym_link_dir=`$THEPWDCMD`
20109                sym_link_file=`$BASENAME $ISLINK`
20110                let COUNTER=COUNTER+1
20111            done
20112            cd $STARTDIR
20113            TEST_COMPILER=$sym_link_dir/$sym_link_file
20114        fi
20115    fi
20116
20117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20118$as_echo "$TEST_COMPILER" >&6; }
20119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20120$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20121
20122  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20123  if test "x$COMPILER_BASENAME" = "xccache"; then
20124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20125$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20126    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20127    # We want to control ccache invocation ourselves, so ignore this cc and try
20128    # searching again.
20129
20130    # Remove the path to the fake ccache cc from the PATH
20131    RETRY_COMPILER_SAVED_PATH="$PATH"
20132    COMPILER_DIRNAME=`$DIRNAME $CXX`
20133    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20134
20135    # Try again looking for our compiler
20136    if test -n "$ac_tool_prefix"; then
20137  for ac_prog in $COMPILER_CHECK_LIST
20138  do
20139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20142$as_echo_n "checking for $ac_word... " >&6; }
20143if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20144  $as_echo_n "(cached) " >&6
20145else
20146  if test -n "$PROPER_COMPILER_CXX"; then
20147  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20148else
20149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20150for as_dir in $PATH
20151do
20152  IFS=$as_save_IFS
20153  test -z "$as_dir" && as_dir=.
20154    for ac_exec_ext in '' $ac_executable_extensions; do
20155  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20156    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20158    break 2
20159  fi
20160done
20161  done
20162IFS=$as_save_IFS
20163
20164fi
20165fi
20166PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20167if test -n "$PROPER_COMPILER_CXX"; then
20168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20169$as_echo "$PROPER_COMPILER_CXX" >&6; }
20170else
20171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20172$as_echo "no" >&6; }
20173fi
20174
20175
20176    test -n "$PROPER_COMPILER_CXX" && break
20177  done
20178fi
20179if test -z "$PROPER_COMPILER_CXX"; then
20180  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20181  for ac_prog in $COMPILER_CHECK_LIST
20182do
20183  # Extract the first word of "$ac_prog", so it can be a program name with args.
20184set dummy $ac_prog; ac_word=$2
20185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20186$as_echo_n "checking for $ac_word... " >&6; }
20187if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20188  $as_echo_n "(cached) " >&6
20189else
20190  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20191  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20192else
20193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20194for as_dir in $PATH
20195do
20196  IFS=$as_save_IFS
20197  test -z "$as_dir" && as_dir=.
20198    for ac_exec_ext in '' $ac_executable_extensions; do
20199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20200    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20202    break 2
20203  fi
20204done
20205  done
20206IFS=$as_save_IFS
20207
20208fi
20209fi
20210ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20211if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20213$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20214else
20215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20216$as_echo "no" >&6; }
20217fi
20218
20219
20220  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20221done
20222
20223  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20224    PROPER_COMPILER_CXX=""
20225  else
20226    case $cross_compiling:$ac_tool_warned in
20227yes:)
20228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20230ac_tool_warned=yes ;;
20231esac
20232    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20233  fi
20234fi
20235
20236
20237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20238
20239  # First separate the path from the arguments. This will split at the first
20240  # space.
20241  complete="$PROPER_COMPILER_CXX"
20242  path="${complete%% *}"
20243  tmp="$complete EOL"
20244  arguments="${tmp#* }"
20245
20246  # Input might be given as Windows format, start by converting to
20247  # unix format.
20248  new_path=`$CYGPATH -u "$path"`
20249
20250  # Now try to locate executable using which
20251  new_path=`$WHICH "$new_path" 2> /dev/null`
20252  # bat and cmd files are not always considered executable in cygwin causing which
20253  # to not find them
20254  if test "x$new_path" = x \
20255           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20256           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20257    new_path=`$CYGPATH -u "$path"`
20258  fi
20259  if test "x$new_path" = x; then
20260    # Oops. Which didn't find the executable.
20261    # The splitting of arguments from the executable at a space might have been incorrect,
20262    # since paths with space are more likely in Windows. Give it another try with the whole
20263    # argument.
20264    path="$complete"
20265    arguments="EOL"
20266    new_path=`$CYGPATH -u "$path"`
20267    new_path=`$WHICH "$new_path" 2> /dev/null`
20268    # bat and cmd files are not always considered executable in cygwin causing which
20269    # to not find them
20270    if test "x$new_path" = x \
20271             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20272             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20273      new_path=`$CYGPATH -u "$path"`
20274    fi
20275    if test "x$new_path" = x; then
20276      # It's still not found. Now this is an unrecoverable error.
20277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20278$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20279      has_space=`$ECHO "$complete" | $GREP " "`
20280      if test "x$has_space" != x; then
20281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20283      fi
20284      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20285    fi
20286  fi
20287
20288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20291  # "foo.exe" is OK but "foo" is an error.
20292  #
20293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20294  # It is also a way to make sure we got the proper file name for the real test later on.
20295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20296  if test "x$test_shortpath" = x; then
20297    # Short path failed, file does not exist as specified.
20298    # Try adding .exe or .cmd
20299    if test -f "${new_path}.exe"; then
20300       input_to_shortpath="${new_path}.exe"
20301    elif test -f "${new_path}.cmd"; then
20302       input_to_shortpath="${new_path}.cmd"
20303    else
20304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20305$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20308      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20309    fi
20310  else
20311    input_to_shortpath="$new_path"
20312  fi
20313
20314  # Call helper function which possibly converts this using DOS-style short mode.
20315  # If so, the updated path is stored in $new_path.
20316  new_path="$input_to_shortpath"
20317
20318  input_path="$input_to_shortpath"
20319  # Check if we need to convert this using DOS-style short mode. If the path
20320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20321  # take no chances and rewrite it.
20322  # Note: m4 eats our [], so we need to use [ and ] instead.
20323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20324  if test "x$has_forbidden_chars" != x; then
20325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20329      # Going to short mode and back again did indeed matter. Since short mode is
20330      # case insensitive, let's make it lowercase to improve readability.
20331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20332      # Now convert it back to Unix-stile (cygpath)
20333      input_path=`$CYGPATH -u "$shortmode_path"`
20334      new_path="$input_path"
20335    fi
20336  fi
20337
20338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20339  if test "x$test_cygdrive_prefix" = x; then
20340    # As a simple fix, exclude /usr/bin since it's not a real path.
20341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20343      # a path prefixed by /cygdrive for fixpath to work.
20344      new_path="$CYGWIN_ROOT_PATH$input_path"
20345    fi
20346  fi
20347
20348  # remove trailing .exe if any
20349  new_path="${new_path/%.exe/}"
20350
20351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20352
20353  # First separate the path from the arguments. This will split at the first
20354  # space.
20355  complete="$PROPER_COMPILER_CXX"
20356  path="${complete%% *}"
20357  tmp="$complete EOL"
20358  arguments="${tmp#* }"
20359
20360  # Input might be given as Windows format, start by converting to
20361  # unix format.
20362  new_path="$path"
20363
20364  windows_path="$new_path"
20365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20366    unix_path=`$CYGPATH -u "$windows_path"`
20367    new_path="$unix_path"
20368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20370    new_path="$unix_path"
20371  fi
20372
20373
20374  # Now try to locate executable using which
20375  new_path=`$WHICH "$new_path" 2> /dev/null`
20376
20377  if test "x$new_path" = x; then
20378    # Oops. Which didn't find the executable.
20379    # The splitting of arguments from the executable at a space might have been incorrect,
20380    # since paths with space are more likely in Windows. Give it another try with the whole
20381    # argument.
20382    path="$complete"
20383    arguments="EOL"
20384    new_path="$path"
20385
20386  windows_path="$new_path"
20387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20388    unix_path=`$CYGPATH -u "$windows_path"`
20389    new_path="$unix_path"
20390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20392    new_path="$unix_path"
20393  fi
20394
20395
20396    new_path=`$WHICH "$new_path" 2> /dev/null`
20397
20398    if test "x$new_path" = x; then
20399      # It's still not found. Now this is an unrecoverable error.
20400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20401$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20402      has_space=`$ECHO "$complete" | $GREP " "`
20403      if test "x$has_space" != x; then
20404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20406      fi
20407      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20408    fi
20409  fi
20410
20411  # Now new_path has a complete unix path to the binary
20412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20413    # Keep paths in /bin as-is, but remove trailing .exe if any
20414    new_path="${new_path/%.exe/}"
20415    # Do not save /bin paths to all_fixpath_prefixes!
20416  else
20417    # Not in mixed or Windows style, start by that.
20418    new_path=`cmd //c echo $new_path`
20419
20420  input_path="$new_path"
20421  # Check if we need to convert this using DOS-style short mode. If the path
20422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20423  # take no chances and rewrite it.
20424  # Note: m4 eats our [], so we need to use [ and ] instead.
20425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20426  if test "x$has_forbidden_chars" != x; then
20427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20429  fi
20430
20431    # Output is in $new_path
20432
20433  windows_path="$new_path"
20434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20435    unix_path=`$CYGPATH -u "$windows_path"`
20436    new_path="$unix_path"
20437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20439    new_path="$unix_path"
20440  fi
20441
20442    # remove trailing .exe if any
20443    new_path="${new_path/%.exe/}"
20444
20445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20447  fi
20448
20449  else
20450    # We're on a posix platform. Hooray! :)
20451    # First separate the path from the arguments. This will split at the first
20452    # space.
20453    complete="$PROPER_COMPILER_CXX"
20454    path="${complete%% *}"
20455    tmp="$complete EOL"
20456    arguments="${tmp#* }"
20457
20458    # Cannot rely on the command "which" here since it doesn't always work.
20459    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20460    if test -z "$is_absolute_path"; then
20461      # Path to executable is not absolute. Find it.
20462      IFS_save="$IFS"
20463      IFS=:
20464      for p in $PATH; do
20465        if test -f "$p/$path" && test -x "$p/$path"; then
20466          new_path="$p/$path"
20467          break
20468        fi
20469      done
20470      IFS="$IFS_save"
20471    else
20472      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20473$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20474      new_path="$path"
20475    fi
20476
20477    if test "x$new_path" = x; then
20478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20479$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20480        has_space=`$ECHO "$complete" | $GREP " "`
20481        if test "x$has_space" != x; then
20482          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20483$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20484        fi
20485        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20486      fi
20487  fi
20488
20489      # Now join together the path and the arguments once again
20490      if test "x$arguments" != xEOL; then
20491        new_complete="$new_path ${arguments% *}"
20492      else
20493        new_complete="$new_path"
20494      fi
20495
20496  if test "x$complete" != "x$new_complete"; then
20497      PROPER_COMPILER_CXX="$new_complete"
20498      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20499$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20500    fi
20501
20502    PATH="$RETRY_COMPILER_SAVED_PATH"
20503
20504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20505$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20506
20507    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20508        # Follow a chain of symbolic links. Use readlink
20509        # where it exists, else fall back to horribly
20510        # complicated shell code.
20511        if test "x$READLINK_TESTED" != yes; then
20512            # On MacOSX there is a readlink tool with a different
20513            # purpose than the GNU readlink tool. Check the found readlink.
20514            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20515            if test "x$ISGNU" = x; then
20516                 # A readlink that we do not know how to use.
20517                 # Are there other non-GNU readlinks out there?
20518                 READLINK_TESTED=yes
20519                 READLINK=
20520            fi
20521        fi
20522
20523        if test "x$READLINK" != x; then
20524            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20525        else
20526            # Save the current directory for restoring afterwards
20527            STARTDIR=$PWD
20528            COUNTER=0
20529            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20530            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20531            # Use the system pwd and not the shell builtin to resolve directory symlinks
20532            cd $sym_link_dir
20533            cd `$THEPWDCMD`
20534            sym_link_dir=`$THEPWDCMD`
20535            # Resolve file symlinks
20536            while test $COUNTER -lt 20; do
20537                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20538                if test "x$ISLINK" == x; then
20539                    # This is not a symbolic link! We are done!
20540                    break
20541                fi
20542                # Again resolve directory symlinks since the target of the just found
20543                # link could be in a different directory
20544                cd `$DIRNAME $ISLINK`
20545                sym_link_dir=`$THEPWDCMD`
20546                sym_link_file=`$BASENAME $ISLINK`
20547                let COUNTER=COUNTER+1
20548            done
20549            cd $STARTDIR
20550            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20551        fi
20552    fi
20553
20554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20555$as_echo "$PROPER_COMPILER_CXX" >&6; }
20556    CXX="$PROPER_COMPILER_CXX"
20557  else
20558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20559$as_echo "no, keeping CXX" >&6; }
20560    CXX="$TEST_COMPILER"
20561  fi
20562
20563  COMPILER=$CXX
20564  COMPILER_NAME=$COMPILER_NAME
20565
20566  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20567    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20568    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20569    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20570    if test $? -ne 0; then
20571      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20572
20573      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&5
20574$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20575      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20576$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20577      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20578    else
20579      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20580      COMPILER_VENDOR="Sun Studio"
20581    fi
20582  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20583    # First line typically looks something like:
20584    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20585    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20586    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20587    COMPILER_VENDOR="Microsoft CL.EXE"
20588    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20589    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20590      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20591        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20592      fi
20593    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20594      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20595        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20596      fi
20597    fi
20598  else
20599    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20600    # Check that this is likely to be GCC.
20601    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20602    if test $? -ne 0; then
20603      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20604$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20605      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20606$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20607      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20608    fi
20609
20610    # First line typically looks something like:
20611    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20612    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20613    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20614  fi
20615  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20616  CXX_VERSION="$COMPILER_VERSION"
20617  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20618  CXX_VENDOR="$COMPILER_VENDOR"
20619
20620  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20621$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20622
20623
20624# Now that we have resolved CXX ourself, let autoconf have it's go at it
20625ac_ext=cpp
20626ac_cpp='$CXXCPP $CPPFLAGS'
20627ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20628ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20629ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20630if test -z "$CXX"; then
20631  if test -n "$CCC"; then
20632    CXX=$CCC
20633  else
20634    if test -n "$ac_tool_prefix"; then
20635  for ac_prog in $CXX
20636  do
20637    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20640$as_echo_n "checking for $ac_word... " >&6; }
20641if test "${ac_cv_prog_CXX+set}" = set; then :
20642  $as_echo_n "(cached) " >&6
20643else
20644  if test -n "$CXX"; then
20645  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20646else
20647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20648for as_dir in $PATH
20649do
20650  IFS=$as_save_IFS
20651  test -z "$as_dir" && as_dir=.
20652    for ac_exec_ext in '' $ac_executable_extensions; do
20653  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20654    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20656    break 2
20657  fi
20658done
20659  done
20660IFS=$as_save_IFS
20661
20662fi
20663fi
20664CXX=$ac_cv_prog_CXX
20665if test -n "$CXX"; then
20666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20667$as_echo "$CXX" >&6; }
20668else
20669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20670$as_echo "no" >&6; }
20671fi
20672
20673
20674    test -n "$CXX" && break
20675  done
20676fi
20677if test -z "$CXX"; then
20678  ac_ct_CXX=$CXX
20679  for ac_prog in $CXX
20680do
20681  # Extract the first word of "$ac_prog", so it can be a program name with args.
20682set dummy $ac_prog; ac_word=$2
20683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20684$as_echo_n "checking for $ac_word... " >&6; }
20685if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20686  $as_echo_n "(cached) " >&6
20687else
20688  if test -n "$ac_ct_CXX"; then
20689  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20690else
20691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20692for as_dir in $PATH
20693do
20694  IFS=$as_save_IFS
20695  test -z "$as_dir" && as_dir=.
20696    for ac_exec_ext in '' $ac_executable_extensions; do
20697  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20698    ac_cv_prog_ac_ct_CXX="$ac_prog"
20699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20700    break 2
20701  fi
20702done
20703  done
20704IFS=$as_save_IFS
20705
20706fi
20707fi
20708ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20709if test -n "$ac_ct_CXX"; then
20710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20711$as_echo "$ac_ct_CXX" >&6; }
20712else
20713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20714$as_echo "no" >&6; }
20715fi
20716
20717
20718  test -n "$ac_ct_CXX" && break
20719done
20720
20721  if test "x$ac_ct_CXX" = x; then
20722    CXX="g++"
20723  else
20724    case $cross_compiling:$ac_tool_warned in
20725yes:)
20726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20728ac_tool_warned=yes ;;
20729esac
20730    CXX=$ac_ct_CXX
20731  fi
20732fi
20733
20734  fi
20735fi
20736# Provide some information about the compiler.
20737$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20738set X $ac_compile
20739ac_compiler=$2
20740for ac_option in --version -v -V -qversion; do
20741  { { ac_try="$ac_compiler $ac_option >&5"
20742case "(($ac_try" in
20743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20744  *) ac_try_echo=$ac_try;;
20745esac
20746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20747$as_echo "$ac_try_echo"; } >&5
20748  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20749  ac_status=$?
20750  if test -s conftest.err; then
20751    sed '10a\
20752... rest of stderr output deleted ...
20753         10q' conftest.err >conftest.er1
20754    cat conftest.er1 >&5
20755  fi
20756  rm -f conftest.er1 conftest.err
20757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20758  test $ac_status = 0; }
20759done
20760
20761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20762$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20763if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20764  $as_echo_n "(cached) " >&6
20765else
20766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20767/* end confdefs.h.  */
20768
20769int
20770main ()
20771{
20772#ifndef __GNUC__
20773       choke me
20774#endif
20775
20776  ;
20777  return 0;
20778}
20779_ACEOF
20780if ac_fn_cxx_try_compile "$LINENO"; then :
20781  ac_compiler_gnu=yes
20782else
20783  ac_compiler_gnu=no
20784fi
20785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20786ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20787
20788fi
20789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20790$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20791if test $ac_compiler_gnu = yes; then
20792  GXX=yes
20793else
20794  GXX=
20795fi
20796ac_test_CXXFLAGS=${CXXFLAGS+set}
20797ac_save_CXXFLAGS=$CXXFLAGS
20798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20799$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20800if test "${ac_cv_prog_cxx_g+set}" = set; then :
20801  $as_echo_n "(cached) " >&6
20802else
20803  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20804   ac_cxx_werror_flag=yes
20805   ac_cv_prog_cxx_g=no
20806   CXXFLAGS="-g"
20807   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20808/* end confdefs.h.  */
20809
20810int
20811main ()
20812{
20813
20814  ;
20815  return 0;
20816}
20817_ACEOF
20818if ac_fn_cxx_try_compile "$LINENO"; then :
20819  ac_cv_prog_cxx_g=yes
20820else
20821  CXXFLAGS=""
20822      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20823/* end confdefs.h.  */
20824
20825int
20826main ()
20827{
20828
20829  ;
20830  return 0;
20831}
20832_ACEOF
20833if ac_fn_cxx_try_compile "$LINENO"; then :
20834
20835else
20836  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20837	 CXXFLAGS="-g"
20838	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839/* end confdefs.h.  */
20840
20841int
20842main ()
20843{
20844
20845  ;
20846  return 0;
20847}
20848_ACEOF
20849if ac_fn_cxx_try_compile "$LINENO"; then :
20850  ac_cv_prog_cxx_g=yes
20851fi
20852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20853fi
20854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20855fi
20856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20857   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20858fi
20859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20860$as_echo "$ac_cv_prog_cxx_g" >&6; }
20861if test "$ac_test_CXXFLAGS" = set; then
20862  CXXFLAGS=$ac_save_CXXFLAGS
20863elif test $ac_cv_prog_cxx_g = yes; then
20864  if test "$GXX" = yes; then
20865    CXXFLAGS="-g -O2"
20866  else
20867    CXXFLAGS="-g"
20868  fi
20869else
20870  if test "$GXX" = yes; then
20871    CXXFLAGS="-O2"
20872  else
20873    CXXFLAGS=
20874  fi
20875fi
20876ac_ext=cpp
20877ac_cpp='$CXXCPP $CPPFLAGS'
20878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20881
20882
20883### Locate other tools
20884
20885if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20886    ac_ext=m
20887ac_cpp='$OBJCPP $CPPFLAGS'
20888ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20889ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20890ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20891if test -n "$ac_tool_prefix"; then
20892  for ac_prog in gcc objcc objc cc CC
20893  do
20894    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20895set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20897$as_echo_n "checking for $ac_word... " >&6; }
20898if test "${ac_cv_prog_OBJC+set}" = set; then :
20899  $as_echo_n "(cached) " >&6
20900else
20901  if test -n "$OBJC"; then
20902  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20903else
20904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20905for as_dir in $PATH
20906do
20907  IFS=$as_save_IFS
20908  test -z "$as_dir" && as_dir=.
20909    for ac_exec_ext in '' $ac_executable_extensions; do
20910  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20911    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20913    break 2
20914  fi
20915done
20916  done
20917IFS=$as_save_IFS
20918
20919fi
20920fi
20921OBJC=$ac_cv_prog_OBJC
20922if test -n "$OBJC"; then
20923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20924$as_echo "$OBJC" >&6; }
20925else
20926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20927$as_echo "no" >&6; }
20928fi
20929
20930
20931    test -n "$OBJC" && break
20932  done
20933fi
20934if test -z "$OBJC"; then
20935  ac_ct_OBJC=$OBJC
20936  for ac_prog in gcc objcc objc cc CC
20937do
20938  # Extract the first word of "$ac_prog", so it can be a program name with args.
20939set dummy $ac_prog; 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 test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20943  $as_echo_n "(cached) " >&6
20944else
20945  if test -n "$ac_ct_OBJC"; then
20946  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20947else
20948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20949for as_dir in $PATH
20950do
20951  IFS=$as_save_IFS
20952  test -z "$as_dir" && as_dir=.
20953    for ac_exec_ext in '' $ac_executable_extensions; do
20954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20955    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20957    break 2
20958  fi
20959done
20960  done
20961IFS=$as_save_IFS
20962
20963fi
20964fi
20965ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20966if test -n "$ac_ct_OBJC"; then
20967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20968$as_echo "$ac_ct_OBJC" >&6; }
20969else
20970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20971$as_echo "no" >&6; }
20972fi
20973
20974
20975  test -n "$ac_ct_OBJC" && break
20976done
20977
20978  if test "x$ac_ct_OBJC" = x; then
20979    OBJC="gcc"
20980  else
20981    case $cross_compiling:$ac_tool_warned in
20982yes:)
20983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20985ac_tool_warned=yes ;;
20986esac
20987    OBJC=$ac_ct_OBJC
20988  fi
20989fi
20990
20991# Provide some information about the compiler.
20992$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20993set X $ac_compile
20994ac_compiler=$2
20995for ac_option in --version -v -V -qversion; do
20996  { { ac_try="$ac_compiler $ac_option >&5"
20997case "(($ac_try" in
20998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20999  *) ac_try_echo=$ac_try;;
21000esac
21001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21002$as_echo "$ac_try_echo"; } >&5
21003  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21004  ac_status=$?
21005  if test -s conftest.err; then
21006    sed '10a\
21007... rest of stderr output deleted ...
21008         10q' conftest.err >conftest.er1
21009    cat conftest.er1 >&5
21010  fi
21011  rm -f conftest.er1 conftest.err
21012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21013  test $ac_status = 0; }
21014done
21015
21016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21017$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21018if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21019  $as_echo_n "(cached) " >&6
21020else
21021  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21022/* end confdefs.h.  */
21023
21024int
21025main ()
21026{
21027#ifndef __GNUC__
21028       choke me
21029#endif
21030
21031  ;
21032  return 0;
21033}
21034_ACEOF
21035if ac_fn_objc_try_compile "$LINENO"; then :
21036  ac_compiler_gnu=yes
21037else
21038  ac_compiler_gnu=no
21039fi
21040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21041ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21042
21043fi
21044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21045$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21046if test $ac_compiler_gnu = yes; then
21047  GOBJC=yes
21048else
21049  GOBJC=
21050fi
21051ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21052ac_save_OBJCFLAGS=$OBJCFLAGS
21053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21054$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21055if test "${ac_cv_prog_objc_g+set}" = set; then :
21056  $as_echo_n "(cached) " >&6
21057else
21058  ac_save_objc_werror_flag=$ac_objc_werror_flag
21059   ac_objc_werror_flag=yes
21060   ac_cv_prog_objc_g=no
21061   OBJCFLAGS="-g"
21062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21063/* end confdefs.h.  */
21064
21065int
21066main ()
21067{
21068
21069  ;
21070  return 0;
21071}
21072_ACEOF
21073if ac_fn_objc_try_compile "$LINENO"; then :
21074  ac_cv_prog_objc_g=yes
21075else
21076  OBJCFLAGS=""
21077      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21078/* end confdefs.h.  */
21079
21080int
21081main ()
21082{
21083
21084  ;
21085  return 0;
21086}
21087_ACEOF
21088if ac_fn_objc_try_compile "$LINENO"; then :
21089
21090else
21091  ac_objc_werror_flag=$ac_save_objc_werror_flag
21092	 OBJCFLAGS="-g"
21093	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21094/* end confdefs.h.  */
21095
21096int
21097main ()
21098{
21099
21100  ;
21101  return 0;
21102}
21103_ACEOF
21104if ac_fn_objc_try_compile "$LINENO"; then :
21105  ac_cv_prog_objc_g=yes
21106fi
21107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21108fi
21109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21110fi
21111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21112   ac_objc_werror_flag=$ac_save_objc_werror_flag
21113fi
21114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21115$as_echo "$ac_cv_prog_objc_g" >&6; }
21116if test "$ac_test_OBJCFLAGS" = set; then
21117  OBJCFLAGS=$ac_save_OBJCFLAGS
21118elif test $ac_cv_prog_objc_g = yes; then
21119  if test "$GOBJC" = yes; then
21120    OBJCFLAGS="-g -O2"
21121  else
21122    OBJCFLAGS="-g"
21123  fi
21124else
21125  if test "$GOBJC" = yes; then
21126    OBJCFLAGS="-O2"
21127  else
21128    OBJCFLAGS=
21129  fi
21130fi
21131ac_ext=cpp
21132ac_cpp='$CXXCPP $CPPFLAGS'
21133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21136
21137
21138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21139
21140  # First separate the path from the arguments. This will split at the first
21141  # space.
21142  complete="$OBJC"
21143  path="${complete%% *}"
21144  tmp="$complete EOL"
21145  arguments="${tmp#* }"
21146
21147  # Input might be given as Windows format, start by converting to
21148  # unix format.
21149  new_path=`$CYGPATH -u "$path"`
21150
21151  # Now try to locate executable using which
21152  new_path=`$WHICH "$new_path" 2> /dev/null`
21153  # bat and cmd files are not always considered executable in cygwin causing which
21154  # to not find them
21155  if test "x$new_path" = x \
21156           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21157           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21158    new_path=`$CYGPATH -u "$path"`
21159  fi
21160  if test "x$new_path" = x; then
21161    # Oops. Which didn't find the executable.
21162    # The splitting of arguments from the executable at a space might have been incorrect,
21163    # since paths with space are more likely in Windows. Give it another try with the whole
21164    # argument.
21165    path="$complete"
21166    arguments="EOL"
21167    new_path=`$CYGPATH -u "$path"`
21168    new_path=`$WHICH "$new_path" 2> /dev/null`
21169    # bat and cmd files are not always considered executable in cygwin causing which
21170    # to not find them
21171    if test "x$new_path" = x \
21172             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21173             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21174      new_path=`$CYGPATH -u "$path"`
21175    fi
21176    if test "x$new_path" = x; then
21177      # It's still not found. Now this is an unrecoverable error.
21178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21179$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21180      has_space=`$ECHO "$complete" | $GREP " "`
21181      if test "x$has_space" != x; then
21182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21184      fi
21185      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21186    fi
21187  fi
21188
21189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21192  # "foo.exe" is OK but "foo" is an error.
21193  #
21194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21195  # It is also a way to make sure we got the proper file name for the real test later on.
21196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21197  if test "x$test_shortpath" = x; then
21198    # Short path failed, file does not exist as specified.
21199    # Try adding .exe or .cmd
21200    if test -f "${new_path}.exe"; then
21201       input_to_shortpath="${new_path}.exe"
21202    elif test -f "${new_path}.cmd"; then
21203       input_to_shortpath="${new_path}.cmd"
21204    else
21205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21206$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21207      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21208$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21209      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21210    fi
21211  else
21212    input_to_shortpath="$new_path"
21213  fi
21214
21215  # Call helper function which possibly converts this using DOS-style short mode.
21216  # If so, the updated path is stored in $new_path.
21217  new_path="$input_to_shortpath"
21218
21219  input_path="$input_to_shortpath"
21220  # Check if we need to convert this using DOS-style short mode. If the path
21221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21222  # take no chances and rewrite it.
21223  # Note: m4 eats our [], so we need to use [ and ] instead.
21224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21225  if test "x$has_forbidden_chars" != x; then
21226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21230      # Going to short mode and back again did indeed matter. Since short mode is
21231      # case insensitive, let's make it lowercase to improve readability.
21232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21233      # Now convert it back to Unix-stile (cygpath)
21234      input_path=`$CYGPATH -u "$shortmode_path"`
21235      new_path="$input_path"
21236    fi
21237  fi
21238
21239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21240  if test "x$test_cygdrive_prefix" = x; then
21241    # As a simple fix, exclude /usr/bin since it's not a real path.
21242    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21244      # a path prefixed by /cygdrive for fixpath to work.
21245      new_path="$CYGWIN_ROOT_PATH$input_path"
21246    fi
21247  fi
21248
21249  # remove trailing .exe if any
21250  new_path="${new_path/%.exe/}"
21251
21252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21253
21254  # First separate the path from the arguments. This will split at the first
21255  # space.
21256  complete="$OBJC"
21257  path="${complete%% *}"
21258  tmp="$complete EOL"
21259  arguments="${tmp#* }"
21260
21261  # Input might be given as Windows format, start by converting to
21262  # unix format.
21263  new_path="$path"
21264
21265  windows_path="$new_path"
21266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21267    unix_path=`$CYGPATH -u "$windows_path"`
21268    new_path="$unix_path"
21269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21271    new_path="$unix_path"
21272  fi
21273
21274
21275  # Now try to locate executable using which
21276  new_path=`$WHICH "$new_path" 2> /dev/null`
21277
21278  if test "x$new_path" = x; then
21279    # Oops. Which didn't find the executable.
21280    # The splitting of arguments from the executable at a space might have been incorrect,
21281    # since paths with space are more likely in Windows. Give it another try with the whole
21282    # argument.
21283    path="$complete"
21284    arguments="EOL"
21285    new_path="$path"
21286
21287  windows_path="$new_path"
21288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21289    unix_path=`$CYGPATH -u "$windows_path"`
21290    new_path="$unix_path"
21291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21293    new_path="$unix_path"
21294  fi
21295
21296
21297    new_path=`$WHICH "$new_path" 2> /dev/null`
21298
21299    if test "x$new_path" = x; then
21300      # It's still not found. Now this is an unrecoverable error.
21301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21302$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21303      has_space=`$ECHO "$complete" | $GREP " "`
21304      if test "x$has_space" != x; then
21305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21307      fi
21308      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21309    fi
21310  fi
21311
21312  # Now new_path has a complete unix path to the binary
21313  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21314    # Keep paths in /bin as-is, but remove trailing .exe if any
21315    new_path="${new_path/%.exe/}"
21316    # Do not save /bin paths to all_fixpath_prefixes!
21317  else
21318    # Not in mixed or Windows style, start by that.
21319    new_path=`cmd //c echo $new_path`
21320
21321  input_path="$new_path"
21322  # Check if we need to convert this using DOS-style short mode. If the path
21323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21324  # take no chances and rewrite it.
21325  # Note: m4 eats our [], so we need to use [ and ] instead.
21326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21327  if test "x$has_forbidden_chars" != x; then
21328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21330  fi
21331
21332    # Output is in $new_path
21333
21334  windows_path="$new_path"
21335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21336    unix_path=`$CYGPATH -u "$windows_path"`
21337    new_path="$unix_path"
21338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21340    new_path="$unix_path"
21341  fi
21342
21343    # remove trailing .exe if any
21344    new_path="${new_path/%.exe/}"
21345
21346    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21347    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21348  fi
21349
21350  else
21351    # We're on a posix platform. Hooray! :)
21352    # First separate the path from the arguments. This will split at the first
21353    # space.
21354    complete="$OBJC"
21355    path="${complete%% *}"
21356    tmp="$complete EOL"
21357    arguments="${tmp#* }"
21358
21359    # Cannot rely on the command "which" here since it doesn't always work.
21360    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21361    if test -z "$is_absolute_path"; then
21362      # Path to executable is not absolute. Find it.
21363      IFS_save="$IFS"
21364      IFS=:
21365      for p in $PATH; do
21366        if test -f "$p/$path" && test -x "$p/$path"; then
21367          new_path="$p/$path"
21368          break
21369        fi
21370      done
21371      IFS="$IFS_save"
21372    else
21373      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21374$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21375      new_path="$path"
21376    fi
21377
21378    if test "x$new_path" = x; then
21379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21380$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21381        has_space=`$ECHO "$complete" | $GREP " "`
21382        if test "x$has_space" != x; then
21383          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21385        fi
21386        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21387      fi
21388  fi
21389
21390      # Now join together the path and the arguments once again
21391      if test "x$arguments" != xEOL; then
21392        new_complete="$new_path ${arguments% *}"
21393      else
21394        new_complete="$new_path"
21395      fi
21396
21397  if test "x$complete" != "x$new_complete"; then
21398      OBJC="$new_complete"
21399      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21400$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21401    fi
21402
21403else
21404    OBJC=
21405fi
21406
21407# Restore the flags to the user specified values.
21408# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21409CFLAGS="$ORG_CFLAGS"
21410CXXFLAGS="$ORG_CXXFLAGS"
21411OBJCFLAGS="$ORG_OBJCFLAGS"
21412
21413LD="$CC"
21414LDEXE="$CC"
21415LDCXX="$CXX"
21416LDEXECXX="$CXX"
21417
21418# LDEXE is the linker to use, when creating executables.
21419
21420# Linking C++ libraries.
21421
21422# Linking C++ executables.
21423
21424
21425if test "x$OPENJDK_TARGET_OS" != xwindows; then
21426    if test -n "$ac_tool_prefix"; then
21427  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21428set dummy ${ac_tool_prefix}ar; ac_word=$2
21429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21430$as_echo_n "checking for $ac_word... " >&6; }
21431if test "${ac_cv_prog_AR+set}" = set; then :
21432  $as_echo_n "(cached) " >&6
21433else
21434  if test -n "$AR"; then
21435  ac_cv_prog_AR="$AR" # Let the user override the test.
21436else
21437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21438for as_dir in $PATH
21439do
21440  IFS=$as_save_IFS
21441  test -z "$as_dir" && as_dir=.
21442    for ac_exec_ext in '' $ac_executable_extensions; do
21443  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21444    ac_cv_prog_AR="${ac_tool_prefix}ar"
21445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21446    break 2
21447  fi
21448done
21449  done
21450IFS=$as_save_IFS
21451
21452fi
21453fi
21454AR=$ac_cv_prog_AR
21455if test -n "$AR"; then
21456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21457$as_echo "$AR" >&6; }
21458else
21459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21460$as_echo "no" >&6; }
21461fi
21462
21463
21464fi
21465if test -z "$ac_cv_prog_AR"; then
21466  ac_ct_AR=$AR
21467  # Extract the first word of "ar", so it can be a program name with args.
21468set dummy ar; ac_word=$2
21469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21470$as_echo_n "checking for $ac_word... " >&6; }
21471if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21472  $as_echo_n "(cached) " >&6
21473else
21474  if test -n "$ac_ct_AR"; then
21475  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21476else
21477as_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21484    ac_cv_prog_ac_ct_AR="ar"
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
21492fi
21493fi
21494ac_ct_AR=$ac_cv_prog_ac_ct_AR
21495if test -n "$ac_ct_AR"; then
21496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21497$as_echo "$ac_ct_AR" >&6; }
21498else
21499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21500$as_echo "no" >&6; }
21501fi
21502
21503  if test "x$ac_ct_AR" = x; then
21504    AR=""
21505  else
21506    case $cross_compiling:$ac_tool_warned in
21507yes:)
21508{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21509$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21510ac_tool_warned=yes ;;
21511esac
21512    AR=$ac_ct_AR
21513  fi
21514else
21515  AR="$ac_cv_prog_AR"
21516fi
21517
21518
21519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21520
21521  # First separate the path from the arguments. This will split at the first
21522  # space.
21523  complete="$AR"
21524  path="${complete%% *}"
21525  tmp="$complete EOL"
21526  arguments="${tmp#* }"
21527
21528  # Input might be given as Windows format, start by converting to
21529  # unix format.
21530  new_path=`$CYGPATH -u "$path"`
21531
21532  # Now try to locate executable using which
21533  new_path=`$WHICH "$new_path" 2> /dev/null`
21534  # bat and cmd files are not always considered executable in cygwin causing which
21535  # to not find them
21536  if test "x$new_path" = x \
21537           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21538           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21539    new_path=`$CYGPATH -u "$path"`
21540  fi
21541  if test "x$new_path" = x; then
21542    # Oops. Which didn't find the executable.
21543    # The splitting of arguments from the executable at a space might have been incorrect,
21544    # since paths with space are more likely in Windows. Give it another try with the whole
21545    # argument.
21546    path="$complete"
21547    arguments="EOL"
21548    new_path=`$CYGPATH -u "$path"`
21549    new_path=`$WHICH "$new_path" 2> /dev/null`
21550    # bat and cmd files are not always considered executable in cygwin causing which
21551    # to not find them
21552    if test "x$new_path" = x \
21553             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21554             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21555      new_path=`$CYGPATH -u "$path"`
21556    fi
21557    if test "x$new_path" = x; then
21558      # It's still not found. Now this is an unrecoverable error.
21559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21560$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21561      has_space=`$ECHO "$complete" | $GREP " "`
21562      if test "x$has_space" != x; then
21563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21565      fi
21566      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21567    fi
21568  fi
21569
21570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21573  # "foo.exe" is OK but "foo" is an error.
21574  #
21575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21576  # It is also a way to make sure we got the proper file name for the real test later on.
21577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21578  if test "x$test_shortpath" = x; then
21579    # Short path failed, file does not exist as specified.
21580    # Try adding .exe or .cmd
21581    if test -f "${new_path}.exe"; then
21582       input_to_shortpath="${new_path}.exe"
21583    elif test -f "${new_path}.cmd"; then
21584       input_to_shortpath="${new_path}.cmd"
21585    else
21586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21587$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21590      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21591    fi
21592  else
21593    input_to_shortpath="$new_path"
21594  fi
21595
21596  # Call helper function which possibly converts this using DOS-style short mode.
21597  # If so, the updated path is stored in $new_path.
21598  new_path="$input_to_shortpath"
21599
21600  input_path="$input_to_shortpath"
21601  # Check if we need to convert this using DOS-style short mode. If the path
21602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21603  # take no chances and rewrite it.
21604  # Note: m4 eats our [], so we need to use [ and ] instead.
21605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21606  if test "x$has_forbidden_chars" != x; then
21607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21611      # Going to short mode and back again did indeed matter. Since short mode is
21612      # case insensitive, let's make it lowercase to improve readability.
21613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21614      # Now convert it back to Unix-stile (cygpath)
21615      input_path=`$CYGPATH -u "$shortmode_path"`
21616      new_path="$input_path"
21617    fi
21618  fi
21619
21620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21621  if test "x$test_cygdrive_prefix" = x; then
21622    # As a simple fix, exclude /usr/bin since it's not a real path.
21623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21625      # a path prefixed by /cygdrive for fixpath to work.
21626      new_path="$CYGWIN_ROOT_PATH$input_path"
21627    fi
21628  fi
21629
21630  # remove trailing .exe if any
21631  new_path="${new_path/%.exe/}"
21632
21633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21634
21635  # First separate the path from the arguments. This will split at the first
21636  # space.
21637  complete="$AR"
21638  path="${complete%% *}"
21639  tmp="$complete EOL"
21640  arguments="${tmp#* }"
21641
21642  # Input might be given as Windows format, start by converting to
21643  # unix format.
21644  new_path="$path"
21645
21646  windows_path="$new_path"
21647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21648    unix_path=`$CYGPATH -u "$windows_path"`
21649    new_path="$unix_path"
21650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21652    new_path="$unix_path"
21653  fi
21654
21655
21656  # Now try to locate executable using which
21657  new_path=`$WHICH "$new_path" 2> /dev/null`
21658
21659  if test "x$new_path" = x; then
21660    # Oops. Which didn't find the executable.
21661    # The splitting of arguments from the executable at a space might have been incorrect,
21662    # since paths with space are more likely in Windows. Give it another try with the whole
21663    # argument.
21664    path="$complete"
21665    arguments="EOL"
21666    new_path="$path"
21667
21668  windows_path="$new_path"
21669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21670    unix_path=`$CYGPATH -u "$windows_path"`
21671    new_path="$unix_path"
21672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21674    new_path="$unix_path"
21675  fi
21676
21677
21678    new_path=`$WHICH "$new_path" 2> /dev/null`
21679
21680    if test "x$new_path" = x; then
21681      # It's still not found. Now this is an unrecoverable error.
21682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21683$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21684      has_space=`$ECHO "$complete" | $GREP " "`
21685      if test "x$has_space" != x; then
21686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21688      fi
21689      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21690    fi
21691  fi
21692
21693  # Now new_path has a complete unix path to the binary
21694  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21695    # Keep paths in /bin as-is, but remove trailing .exe if any
21696    new_path="${new_path/%.exe/}"
21697    # Do not save /bin paths to all_fixpath_prefixes!
21698  else
21699    # Not in mixed or Windows style, start by that.
21700    new_path=`cmd //c echo $new_path`
21701
21702  input_path="$new_path"
21703  # Check if we need to convert this using DOS-style short mode. If the path
21704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21705  # take no chances and rewrite it.
21706  # Note: m4 eats our [], so we need to use [ and ] instead.
21707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21708  if test "x$has_forbidden_chars" != x; then
21709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21711  fi
21712
21713    # Output is in $new_path
21714
21715  windows_path="$new_path"
21716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21717    unix_path=`$CYGPATH -u "$windows_path"`
21718    new_path="$unix_path"
21719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21721    new_path="$unix_path"
21722  fi
21723
21724    # remove trailing .exe if any
21725    new_path="${new_path/%.exe/}"
21726
21727    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21728    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21729  fi
21730
21731  else
21732    # We're on a posix platform. Hooray! :)
21733    # First separate the path from the arguments. This will split at the first
21734    # space.
21735    complete="$AR"
21736    path="${complete%% *}"
21737    tmp="$complete EOL"
21738    arguments="${tmp#* }"
21739
21740    # Cannot rely on the command "which" here since it doesn't always work.
21741    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21742    if test -z "$is_absolute_path"; then
21743      # Path to executable is not absolute. Find it.
21744      IFS_save="$IFS"
21745      IFS=:
21746      for p in $PATH; do
21747        if test -f "$p/$path" && test -x "$p/$path"; then
21748          new_path="$p/$path"
21749          break
21750        fi
21751      done
21752      IFS="$IFS_save"
21753    else
21754      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21755$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21756      new_path="$path"
21757    fi
21758
21759    if test "x$new_path" = x; then
21760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21761$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21762        has_space=`$ECHO "$complete" | $GREP " "`
21763        if test "x$has_space" != x; then
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21766        fi
21767        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21768      fi
21769  fi
21770
21771      # Now join together the path and the arguments once again
21772      if test "x$arguments" != xEOL; then
21773        new_complete="$new_path ${arguments% *}"
21774      else
21775        new_complete="$new_path"
21776      fi
21777
21778  if test "x$complete" != "x$new_complete"; then
21779      AR="$new_complete"
21780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21781$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21782    fi
21783
21784fi
21785if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21786    ARFLAGS="-r"
21787else
21788    ARFLAGS=""
21789fi
21790
21791
21792# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21793HOTSPOT_CXX="$CXX"
21794HOTSPOT_LD="$LD"
21795
21796
21797
21798COMPILER_NAME=gcc
21799COMPILER_TYPE=CC
21800if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21801
21802    # For now, assume that we are always compiling using cl.exe.
21803    CC_OUT_OPTION=-Fo
21804    EXE_OUT_OPTION=-out:
21805    LD_OUT_OPTION=-out:
21806    AR_OUT_OPTION=-out:
21807    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21808    # program for something completely different.
21809    # Extract the first word of "link", so it can be a program name with args.
21810set dummy link; ac_word=$2
21811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21812$as_echo_n "checking for $ac_word... " >&6; }
21813if test "${ac_cv_prog_WINLD+set}" = set; then :
21814  $as_echo_n "(cached) " >&6
21815else
21816  if test -n "$WINLD"; then
21817  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21818else
21819  ac_prog_rejected=no
21820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21821for as_dir in $PATH
21822do
21823  IFS=$as_save_IFS
21824  test -z "$as_dir" && as_dir=.
21825    for ac_exec_ext in '' $ac_executable_extensions; do
21826  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21827    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21828       ac_prog_rejected=yes
21829       continue
21830     fi
21831    ac_cv_prog_WINLD="link"
21832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21833    break 2
21834  fi
21835done
21836  done
21837IFS=$as_save_IFS
21838
21839if test $ac_prog_rejected = yes; then
21840  # We found a bogon in the path, so make sure we never use it.
21841  set dummy $ac_cv_prog_WINLD
21842  shift
21843  if test $# != 0; then
21844    # We chose a different compiler from the bogus one.
21845    # However, it has the same basename, so the bogon will be chosen
21846    # first if we set WINLD to just the basename; use the full file name.
21847    shift
21848    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21849  fi
21850fi
21851fi
21852fi
21853WINLD=$ac_cv_prog_WINLD
21854if test -n "$WINLD"; then
21855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21856$as_echo "$WINLD" >&6; }
21857else
21858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21859$as_echo "no" >&6; }
21860fi
21861
21862
21863    # Since we must ignore the first found link, WINLD will contain
21864    # the full path to the link.exe program.
21865
21866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21867
21868  # First separate the path from the arguments. This will split at the first
21869  # space.
21870  complete="$WINLD"
21871  path="${complete%% *}"
21872  tmp="$complete EOL"
21873  arguments="${tmp#* }"
21874
21875  # Input might be given as Windows format, start by converting to
21876  # unix format.
21877  new_path=`$CYGPATH -u "$path"`
21878
21879  # Now try to locate executable using which
21880  new_path=`$WHICH "$new_path" 2> /dev/null`
21881  # bat and cmd files are not always considered executable in cygwin causing which
21882  # to not find them
21883  if test "x$new_path" = x \
21884           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21885           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21886    new_path=`$CYGPATH -u "$path"`
21887  fi
21888  if test "x$new_path" = x; then
21889    # Oops. Which didn't find the executable.
21890    # The splitting of arguments from the executable at a space might have been incorrect,
21891    # since paths with space are more likely in Windows. Give it another try with the whole
21892    # argument.
21893    path="$complete"
21894    arguments="EOL"
21895    new_path=`$CYGPATH -u "$path"`
21896    new_path=`$WHICH "$new_path" 2> /dev/null`
21897    # bat and cmd files are not always considered executable in cygwin causing which
21898    # to not find them
21899    if test "x$new_path" = x \
21900             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21901             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21902      new_path=`$CYGPATH -u "$path"`
21903    fi
21904    if test "x$new_path" = x; then
21905      # It's still not found. Now this is an unrecoverable error.
21906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21907$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21908      has_space=`$ECHO "$complete" | $GREP " "`
21909      if test "x$has_space" != x; then
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21912      fi
21913      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21914    fi
21915  fi
21916
21917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21920  # "foo.exe" is OK but "foo" is an error.
21921  #
21922  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21923  # It is also a way to make sure we got the proper file name for the real test later on.
21924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21925  if test "x$test_shortpath" = x; then
21926    # Short path failed, file does not exist as specified.
21927    # Try adding .exe or .cmd
21928    if test -f "${new_path}.exe"; then
21929       input_to_shortpath="${new_path}.exe"
21930    elif test -f "${new_path}.cmd"; then
21931       input_to_shortpath="${new_path}.cmd"
21932    else
21933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21934$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21937      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21938    fi
21939  else
21940    input_to_shortpath="$new_path"
21941  fi
21942
21943  # Call helper function which possibly converts this using DOS-style short mode.
21944  # If so, the updated path is stored in $new_path.
21945  new_path="$input_to_shortpath"
21946
21947  input_path="$input_to_shortpath"
21948  # Check if we need to convert this using DOS-style short mode. If the path
21949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21950  # take no chances and rewrite it.
21951  # Note: m4 eats our [], so we need to use [ and ] instead.
21952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21953  if test "x$has_forbidden_chars" != x; then
21954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21958      # Going to short mode and back again did indeed matter. Since short mode is
21959      # case insensitive, let's make it lowercase to improve readability.
21960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21961      # Now convert it back to Unix-stile (cygpath)
21962      input_path=`$CYGPATH -u "$shortmode_path"`
21963      new_path="$input_path"
21964    fi
21965  fi
21966
21967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21968  if test "x$test_cygdrive_prefix" = x; then
21969    # As a simple fix, exclude /usr/bin since it's not a real path.
21970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21972      # a path prefixed by /cygdrive for fixpath to work.
21973      new_path="$CYGWIN_ROOT_PATH$input_path"
21974    fi
21975  fi
21976
21977  # remove trailing .exe if any
21978  new_path="${new_path/%.exe/}"
21979
21980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21981
21982  # First separate the path from the arguments. This will split at the first
21983  # space.
21984  complete="$WINLD"
21985  path="${complete%% *}"
21986  tmp="$complete EOL"
21987  arguments="${tmp#* }"
21988
21989  # Input might be given as Windows format, start by converting to
21990  # unix format.
21991  new_path="$path"
21992
21993  windows_path="$new_path"
21994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21995    unix_path=`$CYGPATH -u "$windows_path"`
21996    new_path="$unix_path"
21997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21999    new_path="$unix_path"
22000  fi
22001
22002
22003  # Now try to locate executable using which
22004  new_path=`$WHICH "$new_path" 2> /dev/null`
22005
22006  if test "x$new_path" = x; then
22007    # Oops. Which didn't find the executable.
22008    # The splitting of arguments from the executable at a space might have been incorrect,
22009    # since paths with space are more likely in Windows. Give it another try with the whole
22010    # argument.
22011    path="$complete"
22012    arguments="EOL"
22013    new_path="$path"
22014
22015  windows_path="$new_path"
22016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22017    unix_path=`$CYGPATH -u "$windows_path"`
22018    new_path="$unix_path"
22019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22021    new_path="$unix_path"
22022  fi
22023
22024
22025    new_path=`$WHICH "$new_path" 2> /dev/null`
22026
22027    if test "x$new_path" = x; then
22028      # It's still not found. Now this is an unrecoverable error.
22029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22030$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22031      has_space=`$ECHO "$complete" | $GREP " "`
22032      if test "x$has_space" != x; then
22033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22035      fi
22036      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22037    fi
22038  fi
22039
22040  # Now new_path has a complete unix path to the binary
22041  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22042    # Keep paths in /bin as-is, but remove trailing .exe if any
22043    new_path="${new_path/%.exe/}"
22044    # Do not save /bin paths to all_fixpath_prefixes!
22045  else
22046    # Not in mixed or Windows style, start by that.
22047    new_path=`cmd //c echo $new_path`
22048
22049  input_path="$new_path"
22050  # Check if we need to convert this using DOS-style short mode. If the path
22051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22052  # take no chances and rewrite it.
22053  # Note: m4 eats our [], so we need to use [ and ] instead.
22054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22055  if test "x$has_forbidden_chars" != x; then
22056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22058  fi
22059
22060    # Output is in $new_path
22061
22062  windows_path="$new_path"
22063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22064    unix_path=`$CYGPATH -u "$windows_path"`
22065    new_path="$unix_path"
22066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22068    new_path="$unix_path"
22069  fi
22070
22071    # remove trailing .exe if any
22072    new_path="${new_path/%.exe/}"
22073
22074    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22075    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22076  fi
22077
22078  else
22079    # We're on a posix platform. Hooray! :)
22080    # First separate the path from the arguments. This will split at the first
22081    # space.
22082    complete="$WINLD"
22083    path="${complete%% *}"
22084    tmp="$complete EOL"
22085    arguments="${tmp#* }"
22086
22087    # Cannot rely on the command "which" here since it doesn't always work.
22088    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22089    if test -z "$is_absolute_path"; then
22090      # Path to executable is not absolute. Find it.
22091      IFS_save="$IFS"
22092      IFS=:
22093      for p in $PATH; do
22094        if test -f "$p/$path" && test -x "$p/$path"; then
22095          new_path="$p/$path"
22096          break
22097        fi
22098      done
22099      IFS="$IFS_save"
22100    else
22101      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22102$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22103      new_path="$path"
22104    fi
22105
22106    if test "x$new_path" = x; then
22107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22108$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22109        has_space=`$ECHO "$complete" | $GREP " "`
22110        if test "x$has_space" != x; then
22111          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22112$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22113        fi
22114        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22115      fi
22116  fi
22117
22118      # Now join together the path and the arguments once again
22119      if test "x$arguments" != xEOL; then
22120        new_complete="$new_path ${arguments% *}"
22121      else
22122        new_complete="$new_path"
22123      fi
22124
22125  if test "x$complete" != "x$new_complete"; then
22126      WINLD="$new_complete"
22127      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22128$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22129    fi
22130
22131    printf "Windows linker was found at $WINLD\n"
22132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22133$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22134    "$WINLD" --version > /dev/null
22135    if test $? -eq 0 ; then
22136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22137$as_echo "no" >&6; }
22138      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22139    else
22140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22141$as_echo "yes" >&6; }
22142    fi
22143    LD="$WINLD"
22144    LDEXE="$WINLD"
22145    LDCXX="$WINLD"
22146    LDEXECXX="$WINLD"
22147
22148    # Extract the first word of "mt", so it can be a program name with args.
22149set dummy mt; ac_word=$2
22150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22151$as_echo_n "checking for $ac_word... " >&6; }
22152if test "${ac_cv_prog_MT+set}" = set; then :
22153  $as_echo_n "(cached) " >&6
22154else
22155  if test -n "$MT"; then
22156  ac_cv_prog_MT="$MT" # Let the user override the test.
22157else
22158  ac_prog_rejected=no
22159as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22160for as_dir in $PATH
22161do
22162  IFS=$as_save_IFS
22163  test -z "$as_dir" && as_dir=.
22164    for ac_exec_ext in '' $ac_executable_extensions; do
22165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22166    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22167       ac_prog_rejected=yes
22168       continue
22169     fi
22170    ac_cv_prog_MT="mt"
22171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22172    break 2
22173  fi
22174done
22175  done
22176IFS=$as_save_IFS
22177
22178if test $ac_prog_rejected = yes; then
22179  # We found a bogon in the path, so make sure we never use it.
22180  set dummy $ac_cv_prog_MT
22181  shift
22182  if test $# != 0; then
22183    # We chose a different compiler from the bogus one.
22184    # However, it has the same basename, so the bogon will be chosen
22185    # first if we set MT to just the basename; use the full file name.
22186    shift
22187    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22188  fi
22189fi
22190fi
22191fi
22192MT=$ac_cv_prog_MT
22193if test -n "$MT"; then
22194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22195$as_echo "$MT" >&6; }
22196else
22197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22198$as_echo "no" >&6; }
22199fi
22200
22201
22202
22203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22204
22205  # First separate the path from the arguments. This will split at the first
22206  # space.
22207  complete="$MT"
22208  path="${complete%% *}"
22209  tmp="$complete EOL"
22210  arguments="${tmp#* }"
22211
22212  # Input might be given as Windows format, start by converting to
22213  # unix format.
22214  new_path=`$CYGPATH -u "$path"`
22215
22216  # Now try to locate executable using which
22217  new_path=`$WHICH "$new_path" 2> /dev/null`
22218  # bat and cmd files are not always considered executable in cygwin causing which
22219  # to not find them
22220  if test "x$new_path" = x \
22221           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22222           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22223    new_path=`$CYGPATH -u "$path"`
22224  fi
22225  if test "x$new_path" = x; then
22226    # Oops. Which didn't find the executable.
22227    # The splitting of arguments from the executable at a space might have been incorrect,
22228    # since paths with space are more likely in Windows. Give it another try with the whole
22229    # argument.
22230    path="$complete"
22231    arguments="EOL"
22232    new_path=`$CYGPATH -u "$path"`
22233    new_path=`$WHICH "$new_path" 2> /dev/null`
22234    # bat and cmd files are not always considered executable in cygwin causing which
22235    # to not find them
22236    if test "x$new_path" = x \
22237             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22238             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22239      new_path=`$CYGPATH -u "$path"`
22240    fi
22241    if test "x$new_path" = x; then
22242      # It's still not found. Now this is an unrecoverable error.
22243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22244$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22245      has_space=`$ECHO "$complete" | $GREP " "`
22246      if test "x$has_space" != x; then
22247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22249      fi
22250      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22251    fi
22252  fi
22253
22254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22257  # "foo.exe" is OK but "foo" is an error.
22258  #
22259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22260  # It is also a way to make sure we got the proper file name for the real test later on.
22261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22262  if test "x$test_shortpath" = x; then
22263    # Short path failed, file does not exist as specified.
22264    # Try adding .exe or .cmd
22265    if test -f "${new_path}.exe"; then
22266       input_to_shortpath="${new_path}.exe"
22267    elif test -f "${new_path}.cmd"; then
22268       input_to_shortpath="${new_path}.cmd"
22269    else
22270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22271$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22272      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22273$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22274      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22275    fi
22276  else
22277    input_to_shortpath="$new_path"
22278  fi
22279
22280  # Call helper function which possibly converts this using DOS-style short mode.
22281  # If so, the updated path is stored in $new_path.
22282  new_path="$input_to_shortpath"
22283
22284  input_path="$input_to_shortpath"
22285  # Check if we need to convert this using DOS-style short mode. If the path
22286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22287  # take no chances and rewrite it.
22288  # Note: m4 eats our [], so we need to use [ and ] instead.
22289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22290  if test "x$has_forbidden_chars" != x; then
22291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22295      # Going to short mode and back again did indeed matter. Since short mode is
22296      # case insensitive, let's make it lowercase to improve readability.
22297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22298      # Now convert it back to Unix-stile (cygpath)
22299      input_path=`$CYGPATH -u "$shortmode_path"`
22300      new_path="$input_path"
22301    fi
22302  fi
22303
22304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22305  if test "x$test_cygdrive_prefix" = x; then
22306    # As a simple fix, exclude /usr/bin since it's not a real path.
22307    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22309      # a path prefixed by /cygdrive for fixpath to work.
22310      new_path="$CYGWIN_ROOT_PATH$input_path"
22311    fi
22312  fi
22313
22314  # remove trailing .exe if any
22315  new_path="${new_path/%.exe/}"
22316
22317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22318
22319  # First separate the path from the arguments. This will split at the first
22320  # space.
22321  complete="$MT"
22322  path="${complete%% *}"
22323  tmp="$complete EOL"
22324  arguments="${tmp#* }"
22325
22326  # Input might be given as Windows format, start by converting to
22327  # unix format.
22328  new_path="$path"
22329
22330  windows_path="$new_path"
22331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22332    unix_path=`$CYGPATH -u "$windows_path"`
22333    new_path="$unix_path"
22334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22336    new_path="$unix_path"
22337  fi
22338
22339
22340  # Now try to locate executable using which
22341  new_path=`$WHICH "$new_path" 2> /dev/null`
22342
22343  if test "x$new_path" = x; then
22344    # Oops. Which didn't find the executable.
22345    # The splitting of arguments from the executable at a space might have been incorrect,
22346    # since paths with space are more likely in Windows. Give it another try with the whole
22347    # argument.
22348    path="$complete"
22349    arguments="EOL"
22350    new_path="$path"
22351
22352  windows_path="$new_path"
22353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22354    unix_path=`$CYGPATH -u "$windows_path"`
22355    new_path="$unix_path"
22356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22358    new_path="$unix_path"
22359  fi
22360
22361
22362    new_path=`$WHICH "$new_path" 2> /dev/null`
22363
22364    if test "x$new_path" = x; then
22365      # It's still not found. Now this is an unrecoverable error.
22366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22367$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22368      has_space=`$ECHO "$complete" | $GREP " "`
22369      if test "x$has_space" != x; then
22370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22372      fi
22373      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22374    fi
22375  fi
22376
22377  # Now new_path has a complete unix path to the binary
22378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22379    # Keep paths in /bin as-is, but remove trailing .exe if any
22380    new_path="${new_path/%.exe/}"
22381    # Do not save /bin paths to all_fixpath_prefixes!
22382  else
22383    # Not in mixed or Windows style, start by that.
22384    new_path=`cmd //c echo $new_path`
22385
22386  input_path="$new_path"
22387  # Check if we need to convert this using DOS-style short mode. If the path
22388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22389  # take no chances and rewrite it.
22390  # Note: m4 eats our [], so we need to use [ and ] instead.
22391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22392  if test "x$has_forbidden_chars" != x; then
22393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22395  fi
22396
22397    # Output is in $new_path
22398
22399  windows_path="$new_path"
22400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22401    unix_path=`$CYGPATH -u "$windows_path"`
22402    new_path="$unix_path"
22403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22405    new_path="$unix_path"
22406  fi
22407
22408    # remove trailing .exe if any
22409    new_path="${new_path/%.exe/}"
22410
22411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22413  fi
22414
22415  else
22416    # We're on a posix platform. Hooray! :)
22417    # First separate the path from the arguments. This will split at the first
22418    # space.
22419    complete="$MT"
22420    path="${complete%% *}"
22421    tmp="$complete EOL"
22422    arguments="${tmp#* }"
22423
22424    # Cannot rely on the command "which" here since it doesn't always work.
22425    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22426    if test -z "$is_absolute_path"; then
22427      # Path to executable is not absolute. Find it.
22428      IFS_save="$IFS"
22429      IFS=:
22430      for p in $PATH; do
22431        if test -f "$p/$path" && test -x "$p/$path"; then
22432          new_path="$p/$path"
22433          break
22434        fi
22435      done
22436      IFS="$IFS_save"
22437    else
22438      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22439$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22440      new_path="$path"
22441    fi
22442
22443    if test "x$new_path" = x; then
22444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22445$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22446        has_space=`$ECHO "$complete" | $GREP " "`
22447        if test "x$has_space" != x; then
22448          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22449$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22450        fi
22451        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22452      fi
22453  fi
22454
22455      # Now join together the path and the arguments once again
22456      if test "x$arguments" != xEOL; then
22457        new_complete="$new_path ${arguments% *}"
22458      else
22459        new_complete="$new_path"
22460      fi
22461
22462  if test "x$complete" != "x$new_complete"; then
22463      MT="$new_complete"
22464      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22465$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22466    fi
22467
22468    # The resource compiler
22469    # Extract the first word of "rc", so it can be a program name with args.
22470set dummy rc; ac_word=$2
22471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22472$as_echo_n "checking for $ac_word... " >&6; }
22473if test "${ac_cv_prog_RC+set}" = set; then :
22474  $as_echo_n "(cached) " >&6
22475else
22476  if test -n "$RC"; then
22477  ac_cv_prog_RC="$RC" # Let the user override the test.
22478else
22479  ac_prog_rejected=no
22480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22481for as_dir in $PATH
22482do
22483  IFS=$as_save_IFS
22484  test -z "$as_dir" && as_dir=.
22485    for ac_exec_ext in '' $ac_executable_extensions; do
22486  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22487    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22488       ac_prog_rejected=yes
22489       continue
22490     fi
22491    ac_cv_prog_RC="rc"
22492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22493    break 2
22494  fi
22495done
22496  done
22497IFS=$as_save_IFS
22498
22499if test $ac_prog_rejected = yes; then
22500  # We found a bogon in the path, so make sure we never use it.
22501  set dummy $ac_cv_prog_RC
22502  shift
22503  if test $# != 0; then
22504    # We chose a different compiler from the bogus one.
22505    # However, it has the same basename, so the bogon will be chosen
22506    # first if we set RC to just the basename; use the full file name.
22507    shift
22508    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22509  fi
22510fi
22511fi
22512fi
22513RC=$ac_cv_prog_RC
22514if test -n "$RC"; then
22515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22516$as_echo "$RC" >&6; }
22517else
22518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22519$as_echo "no" >&6; }
22520fi
22521
22522
22523
22524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22525
22526  # First separate the path from the arguments. This will split at the first
22527  # space.
22528  complete="$RC"
22529  path="${complete%% *}"
22530  tmp="$complete EOL"
22531  arguments="${tmp#* }"
22532
22533  # Input might be given as Windows format, start by converting to
22534  # unix format.
22535  new_path=`$CYGPATH -u "$path"`
22536
22537  # Now try to locate executable using which
22538  new_path=`$WHICH "$new_path" 2> /dev/null`
22539  # bat and cmd files are not always considered executable in cygwin causing which
22540  # to not find them
22541  if test "x$new_path" = x \
22542           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22543           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22544    new_path=`$CYGPATH -u "$path"`
22545  fi
22546  if test "x$new_path" = x; then
22547    # Oops. Which didn't find the executable.
22548    # The splitting of arguments from the executable at a space might have been incorrect,
22549    # since paths with space are more likely in Windows. Give it another try with the whole
22550    # argument.
22551    path="$complete"
22552    arguments="EOL"
22553    new_path=`$CYGPATH -u "$path"`
22554    new_path=`$WHICH "$new_path" 2> /dev/null`
22555    # bat and cmd files are not always considered executable in cygwin causing which
22556    # to not find them
22557    if test "x$new_path" = x \
22558             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22559             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22560      new_path=`$CYGPATH -u "$path"`
22561    fi
22562    if test "x$new_path" = x; then
22563      # It's still not found. Now this is an unrecoverable error.
22564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22565$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22566      has_space=`$ECHO "$complete" | $GREP " "`
22567      if test "x$has_space" != x; then
22568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22570      fi
22571      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22572    fi
22573  fi
22574
22575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22578  # "foo.exe" is OK but "foo" is an error.
22579  #
22580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22581  # It is also a way to make sure we got the proper file name for the real test later on.
22582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22583  if test "x$test_shortpath" = x; then
22584    # Short path failed, file does not exist as specified.
22585    # Try adding .exe or .cmd
22586    if test -f "${new_path}.exe"; then
22587       input_to_shortpath="${new_path}.exe"
22588    elif test -f "${new_path}.cmd"; then
22589       input_to_shortpath="${new_path}.cmd"
22590    else
22591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22592$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22595      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22596    fi
22597  else
22598    input_to_shortpath="$new_path"
22599  fi
22600
22601  # Call helper function which possibly converts this using DOS-style short mode.
22602  # If so, the updated path is stored in $new_path.
22603  new_path="$input_to_shortpath"
22604
22605  input_path="$input_to_shortpath"
22606  # Check if we need to convert this using DOS-style short mode. If the path
22607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22608  # take no chances and rewrite it.
22609  # Note: m4 eats our [], so we need to use [ and ] instead.
22610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22611  if test "x$has_forbidden_chars" != x; then
22612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22616      # Going to short mode and back again did indeed matter. Since short mode is
22617      # case insensitive, let's make it lowercase to improve readability.
22618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22619      # Now convert it back to Unix-stile (cygpath)
22620      input_path=`$CYGPATH -u "$shortmode_path"`
22621      new_path="$input_path"
22622    fi
22623  fi
22624
22625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22626  if test "x$test_cygdrive_prefix" = x; then
22627    # As a simple fix, exclude /usr/bin since it's not a real path.
22628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22630      # a path prefixed by /cygdrive for fixpath to work.
22631      new_path="$CYGWIN_ROOT_PATH$input_path"
22632    fi
22633  fi
22634
22635  # remove trailing .exe if any
22636  new_path="${new_path/%.exe/}"
22637
22638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22639
22640  # First separate the path from the arguments. This will split at the first
22641  # space.
22642  complete="$RC"
22643  path="${complete%% *}"
22644  tmp="$complete EOL"
22645  arguments="${tmp#* }"
22646
22647  # Input might be given as Windows format, start by converting to
22648  # unix format.
22649  new_path="$path"
22650
22651  windows_path="$new_path"
22652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22653    unix_path=`$CYGPATH -u "$windows_path"`
22654    new_path="$unix_path"
22655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22657    new_path="$unix_path"
22658  fi
22659
22660
22661  # Now try to locate executable using which
22662  new_path=`$WHICH "$new_path" 2> /dev/null`
22663
22664  if test "x$new_path" = x; then
22665    # Oops. Which didn't find the executable.
22666    # The splitting of arguments from the executable at a space might have been incorrect,
22667    # since paths with space are more likely in Windows. Give it another try with the whole
22668    # argument.
22669    path="$complete"
22670    arguments="EOL"
22671    new_path="$path"
22672
22673  windows_path="$new_path"
22674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22675    unix_path=`$CYGPATH -u "$windows_path"`
22676    new_path="$unix_path"
22677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22679    new_path="$unix_path"
22680  fi
22681
22682
22683    new_path=`$WHICH "$new_path" 2> /dev/null`
22684
22685    if test "x$new_path" = x; then
22686      # It's still not found. Now this is an unrecoverable error.
22687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22688$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22689      has_space=`$ECHO "$complete" | $GREP " "`
22690      if test "x$has_space" != x; then
22691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22693      fi
22694      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22695    fi
22696  fi
22697
22698  # Now new_path has a complete unix path to the binary
22699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22700    # Keep paths in /bin as-is, but remove trailing .exe if any
22701    new_path="${new_path/%.exe/}"
22702    # Do not save /bin paths to all_fixpath_prefixes!
22703  else
22704    # Not in mixed or Windows style, start by that.
22705    new_path=`cmd //c echo $new_path`
22706
22707  input_path="$new_path"
22708  # Check if we need to convert this using DOS-style short mode. If the path
22709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22710  # take no chances and rewrite it.
22711  # Note: m4 eats our [], so we need to use [ and ] instead.
22712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22713  if test "x$has_forbidden_chars" != x; then
22714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22716  fi
22717
22718    # Output is in $new_path
22719
22720  windows_path="$new_path"
22721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22722    unix_path=`$CYGPATH -u "$windows_path"`
22723    new_path="$unix_path"
22724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22726    new_path="$unix_path"
22727  fi
22728
22729    # remove trailing .exe if any
22730    new_path="${new_path/%.exe/}"
22731
22732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22734  fi
22735
22736  else
22737    # We're on a posix platform. Hooray! :)
22738    # First separate the path from the arguments. This will split at the first
22739    # space.
22740    complete="$RC"
22741    path="${complete%% *}"
22742    tmp="$complete EOL"
22743    arguments="${tmp#* }"
22744
22745    # Cannot rely on the command "which" here since it doesn't always work.
22746    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22747    if test -z "$is_absolute_path"; then
22748      # Path to executable is not absolute. Find it.
22749      IFS_save="$IFS"
22750      IFS=:
22751      for p in $PATH; do
22752        if test -f "$p/$path" && test -x "$p/$path"; then
22753          new_path="$p/$path"
22754          break
22755        fi
22756      done
22757      IFS="$IFS_save"
22758    else
22759      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22760$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22761      new_path="$path"
22762    fi
22763
22764    if test "x$new_path" = x; then
22765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22766$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22767        has_space=`$ECHO "$complete" | $GREP " "`
22768        if test "x$has_space" != x; then
22769          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22770$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22771        fi
22772        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22773      fi
22774  fi
22775
22776      # Now join together the path and the arguments once again
22777      if test "x$arguments" != xEOL; then
22778        new_complete="$new_path ${arguments% *}"
22779      else
22780        new_complete="$new_path"
22781      fi
22782
22783  if test "x$complete" != "x$new_complete"; then
22784      RC="$new_complete"
22785      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22786$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22787    fi
22788
22789
22790    # For hotspot, we need these in Windows mixed path,
22791    # so rewrite them all. Need added .exe suffix.
22792    HOTSPOT_CXX="$CXX.exe"
22793    HOTSPOT_LD="$LD.exe"
22794    HOTSPOT_MT="$MT.exe"
22795    HOTSPOT_RC="$RC.exe"
22796
22797  unix_path="$HOTSPOT_CXX"
22798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22799    windows_path=`$CYGPATH -m "$unix_path"`
22800    HOTSPOT_CXX="$windows_path"
22801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22802    windows_path=`cmd //c echo $unix_path`
22803    HOTSPOT_CXX="$windows_path"
22804  fi
22805
22806
22807  unix_path="$HOTSPOT_LD"
22808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22809    windows_path=`$CYGPATH -m "$unix_path"`
22810    HOTSPOT_LD="$windows_path"
22811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22812    windows_path=`cmd //c echo $unix_path`
22813    HOTSPOT_LD="$windows_path"
22814  fi
22815
22816
22817  unix_path="$HOTSPOT_MT"
22818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22819    windows_path=`$CYGPATH -m "$unix_path"`
22820    HOTSPOT_MT="$windows_path"
22821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22822    windows_path=`cmd //c echo $unix_path`
22823    HOTSPOT_MT="$windows_path"
22824  fi
22825
22826
22827  unix_path="$HOTSPOT_RC"
22828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22829    windows_path=`$CYGPATH -m "$unix_path"`
22830    HOTSPOT_RC="$windows_path"
22831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22832    windows_path=`cmd //c echo $unix_path`
22833    HOTSPOT_RC="$windows_path"
22834  fi
22835
22836
22837
22838
22839    RC_FLAGS="-nologo -l 0x409 -r"
22840    if test "x$VARIANT" = xOPT; then :
22841
22842        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22843
22844fi
22845    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22846    if test "x$JDK_UPDATE_VERSION" = x; then :
22847
22848        JDK_UPDATE_VERSION_NOTNULL=0
22849
22850fi
22851    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22852    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22853    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22854    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22855    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22856    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22857    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22858
22859    # lib.exe is used to create static libraries.
22860    # Extract the first word of "lib", so it can be a program name with args.
22861set dummy lib; ac_word=$2
22862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22863$as_echo_n "checking for $ac_word... " >&6; }
22864if test "${ac_cv_prog_WINAR+set}" = set; then :
22865  $as_echo_n "(cached) " >&6
22866else
22867  if test -n "$WINAR"; then
22868  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22869else
22870as_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22877    ac_cv_prog_WINAR="lib"
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
22885fi
22886fi
22887WINAR=$ac_cv_prog_WINAR
22888if test -n "$WINAR"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22890$as_echo "$WINAR" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897
22898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22899
22900  # First separate the path from the arguments. This will split at the first
22901  # space.
22902  complete="$WINAR"
22903  path="${complete%% *}"
22904  tmp="$complete EOL"
22905  arguments="${tmp#* }"
22906
22907  # Input might be given as Windows format, start by converting to
22908  # unix format.
22909  new_path=`$CYGPATH -u "$path"`
22910
22911  # Now try to locate executable using which
22912  new_path=`$WHICH "$new_path" 2> /dev/null`
22913  # bat and cmd files are not always considered executable in cygwin causing which
22914  # to not find them
22915  if test "x$new_path" = x \
22916           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22917           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22918    new_path=`$CYGPATH -u "$path"`
22919  fi
22920  if test "x$new_path" = x; then
22921    # Oops. Which didn't find the executable.
22922    # The splitting of arguments from the executable at a space might have been incorrect,
22923    # since paths with space are more likely in Windows. Give it another try with the whole
22924    # argument.
22925    path="$complete"
22926    arguments="EOL"
22927    new_path=`$CYGPATH -u "$path"`
22928    new_path=`$WHICH "$new_path" 2> /dev/null`
22929    # bat and cmd files are not always considered executable in cygwin causing which
22930    # to not find them
22931    if test "x$new_path" = x \
22932             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22933             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22934      new_path=`$CYGPATH -u "$path"`
22935    fi
22936    if test "x$new_path" = x; then
22937      # It's still not found. Now this is an unrecoverable error.
22938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22939$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22940      has_space=`$ECHO "$complete" | $GREP " "`
22941      if test "x$has_space" != x; then
22942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22944      fi
22945      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22946    fi
22947  fi
22948
22949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22952  # "foo.exe" is OK but "foo" is an error.
22953  #
22954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22955  # It is also a way to make sure we got the proper file name for the real test later on.
22956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22957  if test "x$test_shortpath" = x; then
22958    # Short path failed, file does not exist as specified.
22959    # Try adding .exe or .cmd
22960    if test -f "${new_path}.exe"; then
22961       input_to_shortpath="${new_path}.exe"
22962    elif test -f "${new_path}.cmd"; then
22963       input_to_shortpath="${new_path}.cmd"
22964    else
22965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22966$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22967      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22968$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22969      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22970    fi
22971  else
22972    input_to_shortpath="$new_path"
22973  fi
22974
22975  # Call helper function which possibly converts this using DOS-style short mode.
22976  # If so, the updated path is stored in $new_path.
22977  new_path="$input_to_shortpath"
22978
22979  input_path="$input_to_shortpath"
22980  # Check if we need to convert this using DOS-style short mode. If the path
22981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22982  # take no chances and rewrite it.
22983  # Note: m4 eats our [], so we need to use [ and ] instead.
22984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22985  if test "x$has_forbidden_chars" != x; then
22986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22990      # Going to short mode and back again did indeed matter. Since short mode is
22991      # case insensitive, let's make it lowercase to improve readability.
22992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22993      # Now convert it back to Unix-stile (cygpath)
22994      input_path=`$CYGPATH -u "$shortmode_path"`
22995      new_path="$input_path"
22996    fi
22997  fi
22998
22999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23000  if test "x$test_cygdrive_prefix" = x; then
23001    # As a simple fix, exclude /usr/bin since it's not a real path.
23002    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23004      # a path prefixed by /cygdrive for fixpath to work.
23005      new_path="$CYGWIN_ROOT_PATH$input_path"
23006    fi
23007  fi
23008
23009  # remove trailing .exe if any
23010  new_path="${new_path/%.exe/}"
23011
23012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23013
23014  # First separate the path from the arguments. This will split at the first
23015  # space.
23016  complete="$WINAR"
23017  path="${complete%% *}"
23018  tmp="$complete EOL"
23019  arguments="${tmp#* }"
23020
23021  # Input might be given as Windows format, start by converting to
23022  # unix format.
23023  new_path="$path"
23024
23025  windows_path="$new_path"
23026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23027    unix_path=`$CYGPATH -u "$windows_path"`
23028    new_path="$unix_path"
23029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23031    new_path="$unix_path"
23032  fi
23033
23034
23035  # Now try to locate executable using which
23036  new_path=`$WHICH "$new_path" 2> /dev/null`
23037
23038  if test "x$new_path" = x; then
23039    # Oops. Which didn't find the executable.
23040    # The splitting of arguments from the executable at a space might have been incorrect,
23041    # since paths with space are more likely in Windows. Give it another try with the whole
23042    # argument.
23043    path="$complete"
23044    arguments="EOL"
23045    new_path="$path"
23046
23047  windows_path="$new_path"
23048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23049    unix_path=`$CYGPATH -u "$windows_path"`
23050    new_path="$unix_path"
23051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23053    new_path="$unix_path"
23054  fi
23055
23056
23057    new_path=`$WHICH "$new_path" 2> /dev/null`
23058
23059    if test "x$new_path" = x; then
23060      # It's still not found. Now this is an unrecoverable error.
23061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23062$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23063      has_space=`$ECHO "$complete" | $GREP " "`
23064      if test "x$has_space" != x; then
23065        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23066$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23067      fi
23068      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23069    fi
23070  fi
23071
23072  # Now new_path has a complete unix path to the binary
23073  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23074    # Keep paths in /bin as-is, but remove trailing .exe if any
23075    new_path="${new_path/%.exe/}"
23076    # Do not save /bin paths to all_fixpath_prefixes!
23077  else
23078    # Not in mixed or Windows style, start by that.
23079    new_path=`cmd //c echo $new_path`
23080
23081  input_path="$new_path"
23082  # Check if we need to convert this using DOS-style short mode. If the path
23083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23084  # take no chances and rewrite it.
23085  # Note: m4 eats our [], so we need to use [ and ] instead.
23086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23087  if test "x$has_forbidden_chars" != x; then
23088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23090  fi
23091
23092    # Output is in $new_path
23093
23094  windows_path="$new_path"
23095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23096    unix_path=`$CYGPATH -u "$windows_path"`
23097    new_path="$unix_path"
23098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23100    new_path="$unix_path"
23101  fi
23102
23103    # remove trailing .exe if any
23104    new_path="${new_path/%.exe/}"
23105
23106    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23107    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23108  fi
23109
23110  else
23111    # We're on a posix platform. Hooray! :)
23112    # First separate the path from the arguments. This will split at the first
23113    # space.
23114    complete="$WINAR"
23115    path="${complete%% *}"
23116    tmp="$complete EOL"
23117    arguments="${tmp#* }"
23118
23119    # Cannot rely on the command "which" here since it doesn't always work.
23120    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23121    if test -z "$is_absolute_path"; then
23122      # Path to executable is not absolute. Find it.
23123      IFS_save="$IFS"
23124      IFS=:
23125      for p in $PATH; do
23126        if test -f "$p/$path" && test -x "$p/$path"; then
23127          new_path="$p/$path"
23128          break
23129        fi
23130      done
23131      IFS="$IFS_save"
23132    else
23133      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23134$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23135      new_path="$path"
23136    fi
23137
23138    if test "x$new_path" = x; then
23139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23140$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23141        has_space=`$ECHO "$complete" | $GREP " "`
23142        if test "x$has_space" != x; then
23143          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23144$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23145        fi
23146        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23147      fi
23148  fi
23149
23150      # Now join together the path and the arguments once again
23151      if test "x$arguments" != xEOL; then
23152        new_complete="$new_path ${arguments% *}"
23153      else
23154        new_complete="$new_path"
23155      fi
23156
23157  if test "x$complete" != "x$new_complete"; then
23158      WINAR="$new_complete"
23159      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23160$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23161    fi
23162
23163    AR="$WINAR"
23164    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23165
23166    # Extract the first word of "dumpbin", so it can be a program name with args.
23167set dummy dumpbin; ac_word=$2
23168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23169$as_echo_n "checking for $ac_word... " >&6; }
23170if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23171  $as_echo_n "(cached) " >&6
23172else
23173  if test -n "$DUMPBIN"; then
23174  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23175else
23176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23177for as_dir in $PATH
23178do
23179  IFS=$as_save_IFS
23180  test -z "$as_dir" && as_dir=.
23181    for ac_exec_ext in '' $ac_executable_extensions; do
23182  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23183    ac_cv_prog_DUMPBIN="dumpbin"
23184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23185    break 2
23186  fi
23187done
23188  done
23189IFS=$as_save_IFS
23190
23191fi
23192fi
23193DUMPBIN=$ac_cv_prog_DUMPBIN
23194if test -n "$DUMPBIN"; then
23195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23196$as_echo "$DUMPBIN" >&6; }
23197else
23198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23199$as_echo "no" >&6; }
23200fi
23201
23202
23203
23204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23205
23206  # First separate the path from the arguments. This will split at the first
23207  # space.
23208  complete="$DUMPBIN"
23209  path="${complete%% *}"
23210  tmp="$complete EOL"
23211  arguments="${tmp#* }"
23212
23213  # Input might be given as Windows format, start by converting to
23214  # unix format.
23215  new_path=`$CYGPATH -u "$path"`
23216
23217  # Now try to locate executable using which
23218  new_path=`$WHICH "$new_path" 2> /dev/null`
23219  # bat and cmd files are not always considered executable in cygwin causing which
23220  # to not find them
23221  if test "x$new_path" = x \
23222           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23223           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23224    new_path=`$CYGPATH -u "$path"`
23225  fi
23226  if test "x$new_path" = x; then
23227    # Oops. Which didn't find the executable.
23228    # The splitting of arguments from the executable at a space might have been incorrect,
23229    # since paths with space are more likely in Windows. Give it another try with the whole
23230    # argument.
23231    path="$complete"
23232    arguments="EOL"
23233    new_path=`$CYGPATH -u "$path"`
23234    new_path=`$WHICH "$new_path" 2> /dev/null`
23235    # bat and cmd files are not always considered executable in cygwin causing which
23236    # to not find them
23237    if test "x$new_path" = x \
23238             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23239             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23240      new_path=`$CYGPATH -u "$path"`
23241    fi
23242    if test "x$new_path" = x; then
23243      # It's still not found. Now this is an unrecoverable error.
23244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23245$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23246      has_space=`$ECHO "$complete" | $GREP " "`
23247      if test "x$has_space" != x; then
23248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23250      fi
23251      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23252    fi
23253  fi
23254
23255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23258  # "foo.exe" is OK but "foo" is an error.
23259  #
23260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23261  # It is also a way to make sure we got the proper file name for the real test later on.
23262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23263  if test "x$test_shortpath" = x; then
23264    # Short path failed, file does not exist as specified.
23265    # Try adding .exe or .cmd
23266    if test -f "${new_path}.exe"; then
23267       input_to_shortpath="${new_path}.exe"
23268    elif test -f "${new_path}.cmd"; then
23269       input_to_shortpath="${new_path}.cmd"
23270    else
23271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23272$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23275      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23276    fi
23277  else
23278    input_to_shortpath="$new_path"
23279  fi
23280
23281  # Call helper function which possibly converts this using DOS-style short mode.
23282  # If so, the updated path is stored in $new_path.
23283  new_path="$input_to_shortpath"
23284
23285  input_path="$input_to_shortpath"
23286  # Check if we need to convert this using DOS-style short mode. If the path
23287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23288  # take no chances and rewrite it.
23289  # Note: m4 eats our [], so we need to use [ and ] instead.
23290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23291  if test "x$has_forbidden_chars" != x; then
23292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23296      # Going to short mode and back again did indeed matter. Since short mode is
23297      # case insensitive, let's make it lowercase to improve readability.
23298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23299      # Now convert it back to Unix-stile (cygpath)
23300      input_path=`$CYGPATH -u "$shortmode_path"`
23301      new_path="$input_path"
23302    fi
23303  fi
23304
23305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23306  if test "x$test_cygdrive_prefix" = x; then
23307    # As a simple fix, exclude /usr/bin since it's not a real path.
23308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23310      # a path prefixed by /cygdrive for fixpath to work.
23311      new_path="$CYGWIN_ROOT_PATH$input_path"
23312    fi
23313  fi
23314
23315  # remove trailing .exe if any
23316  new_path="${new_path/%.exe/}"
23317
23318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23319
23320  # First separate the path from the arguments. This will split at the first
23321  # space.
23322  complete="$DUMPBIN"
23323  path="${complete%% *}"
23324  tmp="$complete EOL"
23325  arguments="${tmp#* }"
23326
23327  # Input might be given as Windows format, start by converting to
23328  # unix format.
23329  new_path="$path"
23330
23331  windows_path="$new_path"
23332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23333    unix_path=`$CYGPATH -u "$windows_path"`
23334    new_path="$unix_path"
23335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23337    new_path="$unix_path"
23338  fi
23339
23340
23341  # Now try to locate executable using which
23342  new_path=`$WHICH "$new_path" 2> /dev/null`
23343
23344  if test "x$new_path" = x; then
23345    # Oops. Which didn't find the executable.
23346    # The splitting of arguments from the executable at a space might have been incorrect,
23347    # since paths with space are more likely in Windows. Give it another try with the whole
23348    # argument.
23349    path="$complete"
23350    arguments="EOL"
23351    new_path="$path"
23352
23353  windows_path="$new_path"
23354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23355    unix_path=`$CYGPATH -u "$windows_path"`
23356    new_path="$unix_path"
23357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23359    new_path="$unix_path"
23360  fi
23361
23362
23363    new_path=`$WHICH "$new_path" 2> /dev/null`
23364
23365    if test "x$new_path" = x; then
23366      # It's still not found. Now this is an unrecoverable error.
23367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23368$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23369      has_space=`$ECHO "$complete" | $GREP " "`
23370      if test "x$has_space" != x; then
23371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23373      fi
23374      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23375    fi
23376  fi
23377
23378  # Now new_path has a complete unix path to the binary
23379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23380    # Keep paths in /bin as-is, but remove trailing .exe if any
23381    new_path="${new_path/%.exe/}"
23382    # Do not save /bin paths to all_fixpath_prefixes!
23383  else
23384    # Not in mixed or Windows style, start by that.
23385    new_path=`cmd //c echo $new_path`
23386
23387  input_path="$new_path"
23388  # Check if we need to convert this using DOS-style short mode. If the path
23389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23390  # take no chances and rewrite it.
23391  # Note: m4 eats our [], so we need to use [ and ] instead.
23392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23393  if test "x$has_forbidden_chars" != x; then
23394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23396  fi
23397
23398    # Output is in $new_path
23399
23400  windows_path="$new_path"
23401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23402    unix_path=`$CYGPATH -u "$windows_path"`
23403    new_path="$unix_path"
23404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23406    new_path="$unix_path"
23407  fi
23408
23409    # remove trailing .exe if any
23410    new_path="${new_path/%.exe/}"
23411
23412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23414  fi
23415
23416  else
23417    # We're on a posix platform. Hooray! :)
23418    # First separate the path from the arguments. This will split at the first
23419    # space.
23420    complete="$DUMPBIN"
23421    path="${complete%% *}"
23422    tmp="$complete EOL"
23423    arguments="${tmp#* }"
23424
23425    # Cannot rely on the command "which" here since it doesn't always work.
23426    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23427    if test -z "$is_absolute_path"; then
23428      # Path to executable is not absolute. Find it.
23429      IFS_save="$IFS"
23430      IFS=:
23431      for p in $PATH; do
23432        if test -f "$p/$path" && test -x "$p/$path"; then
23433          new_path="$p/$path"
23434          break
23435        fi
23436      done
23437      IFS="$IFS_save"
23438    else
23439      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23440$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23441      new_path="$path"
23442    fi
23443
23444    if test "x$new_path" = x; then
23445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23446$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23447        has_space=`$ECHO "$complete" | $GREP " "`
23448        if test "x$has_space" != x; then
23449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23451        fi
23452        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23453      fi
23454  fi
23455
23456      # Now join together the path and the arguments once again
23457      if test "x$arguments" != xEOL; then
23458        new_complete="$new_path ${arguments% *}"
23459      else
23460        new_complete="$new_path"
23461      fi
23462
23463  if test "x$complete" != "x$new_complete"; then
23464      DUMPBIN="$new_complete"
23465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23466$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23467    fi
23468
23469
23470    COMPILER_TYPE=CL
23471    CCXXFLAGS="$CCXXFLAGS -nologo"
23472
23473fi
23474
23475
23476
23477ac_ext=c
23478ac_cpp='$CPP $CPPFLAGS'
23479ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23480ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23481ac_compiler_gnu=$ac_cv_c_compiler_gnu
23482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23483$as_echo_n "checking how to run the C preprocessor... " >&6; }
23484# On Suns, sometimes $CPP names a directory.
23485if test -n "$CPP" && test -d "$CPP"; then
23486  CPP=
23487fi
23488if test -z "$CPP"; then
23489  if test "${ac_cv_prog_CPP+set}" = set; then :
23490  $as_echo_n "(cached) " >&6
23491else
23492      # Double quotes because CPP needs to be expanded
23493    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23494    do
23495      ac_preproc_ok=false
23496for ac_c_preproc_warn_flag in '' yes
23497do
23498  # Use a header file that comes with gcc, so configuring glibc
23499  # with a fresh cross-compiler works.
23500  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23501  # <limits.h> exists even on freestanding compilers.
23502  # On the NeXT, cc -E runs the code through the compiler's parser,
23503  # not just through cpp. "Syntax error" is here to catch this case.
23504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23505/* end confdefs.h.  */
23506#ifdef __STDC__
23507# include <limits.h>
23508#else
23509# include <assert.h>
23510#endif
23511		     Syntax error
23512_ACEOF
23513if ac_fn_c_try_cpp "$LINENO"; then :
23514
23515else
23516  # Broken: fails on valid input.
23517continue
23518fi
23519rm -f conftest.err conftest.i conftest.$ac_ext
23520
23521  # OK, works on sane cases.  Now check whether nonexistent headers
23522  # can be detected and how.
23523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23524/* end confdefs.h.  */
23525#include <ac_nonexistent.h>
23526_ACEOF
23527if ac_fn_c_try_cpp "$LINENO"; then :
23528  # Broken: success on invalid input.
23529continue
23530else
23531  # Passes both tests.
23532ac_preproc_ok=:
23533break
23534fi
23535rm -f conftest.err conftest.i conftest.$ac_ext
23536
23537done
23538# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23539rm -f conftest.i conftest.err conftest.$ac_ext
23540if $ac_preproc_ok; then :
23541  break
23542fi
23543
23544    done
23545    ac_cv_prog_CPP=$CPP
23546
23547fi
23548  CPP=$ac_cv_prog_CPP
23549else
23550  ac_cv_prog_CPP=$CPP
23551fi
23552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23553$as_echo "$CPP" >&6; }
23554ac_preproc_ok=false
23555for ac_c_preproc_warn_flag in '' yes
23556do
23557  # Use a header file that comes with gcc, so configuring glibc
23558  # with a fresh cross-compiler works.
23559  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23560  # <limits.h> exists even on freestanding compilers.
23561  # On the NeXT, cc -E runs the code through the compiler's parser,
23562  # not just through cpp. "Syntax error" is here to catch this case.
23563  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23564/* end confdefs.h.  */
23565#ifdef __STDC__
23566# include <limits.h>
23567#else
23568# include <assert.h>
23569#endif
23570		     Syntax error
23571_ACEOF
23572if ac_fn_c_try_cpp "$LINENO"; then :
23573
23574else
23575  # Broken: fails on valid input.
23576continue
23577fi
23578rm -f conftest.err conftest.i conftest.$ac_ext
23579
23580  # OK, works on sane cases.  Now check whether nonexistent headers
23581  # can be detected and how.
23582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23583/* end confdefs.h.  */
23584#include <ac_nonexistent.h>
23585_ACEOF
23586if ac_fn_c_try_cpp "$LINENO"; then :
23587  # Broken: success on invalid input.
23588continue
23589else
23590  # Passes both tests.
23591ac_preproc_ok=:
23592break
23593fi
23594rm -f conftest.err conftest.i conftest.$ac_ext
23595
23596done
23597# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23598rm -f conftest.i conftest.err conftest.$ac_ext
23599if $ac_preproc_ok; then :
23600
23601else
23602  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23603$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23604as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23605See \`config.log' for more details" "$LINENO" 5 ; }
23606fi
23607
23608ac_ext=cpp
23609ac_cpp='$CXXCPP $CPPFLAGS'
23610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23613
23614
23615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23616
23617  # First separate the path from the arguments. This will split at the first
23618  # space.
23619  complete="$CPP"
23620  path="${complete%% *}"
23621  tmp="$complete EOL"
23622  arguments="${tmp#* }"
23623
23624  # Input might be given as Windows format, start by converting to
23625  # unix format.
23626  new_path=`$CYGPATH -u "$path"`
23627
23628  # Now try to locate executable using which
23629  new_path=`$WHICH "$new_path" 2> /dev/null`
23630  # bat and cmd files are not always considered executable in cygwin causing which
23631  # to not find them
23632  if test "x$new_path" = x \
23633           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23634           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23635    new_path=`$CYGPATH -u "$path"`
23636  fi
23637  if test "x$new_path" = x; then
23638    # Oops. Which didn't find the executable.
23639    # The splitting of arguments from the executable at a space might have been incorrect,
23640    # since paths with space are more likely in Windows. Give it another try with the whole
23641    # argument.
23642    path="$complete"
23643    arguments="EOL"
23644    new_path=`$CYGPATH -u "$path"`
23645    new_path=`$WHICH "$new_path" 2> /dev/null`
23646    # bat and cmd files are not always considered executable in cygwin causing which
23647    # to not find them
23648    if test "x$new_path" = x \
23649             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23650             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23651      new_path=`$CYGPATH -u "$path"`
23652    fi
23653    if test "x$new_path" = x; then
23654      # It's still not found. Now this is an unrecoverable error.
23655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23656$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23657      has_space=`$ECHO "$complete" | $GREP " "`
23658      if test "x$has_space" != x; then
23659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23661      fi
23662      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23663    fi
23664  fi
23665
23666  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23667  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23668  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23669  # "foo.exe" is OK but "foo" is an error.
23670  #
23671  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23672  # It is also a way to make sure we got the proper file name for the real test later on.
23673  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23674  if test "x$test_shortpath" = x; then
23675    # Short path failed, file does not exist as specified.
23676    # Try adding .exe or .cmd
23677    if test -f "${new_path}.exe"; then
23678       input_to_shortpath="${new_path}.exe"
23679    elif test -f "${new_path}.cmd"; then
23680       input_to_shortpath="${new_path}.cmd"
23681    else
23682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23683$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23684      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23685$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23686      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23687    fi
23688  else
23689    input_to_shortpath="$new_path"
23690  fi
23691
23692  # Call helper function which possibly converts this using DOS-style short mode.
23693  # If so, the updated path is stored in $new_path.
23694  new_path="$input_to_shortpath"
23695
23696  input_path="$input_to_shortpath"
23697  # Check if we need to convert this using DOS-style short mode. If the path
23698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23699  # take no chances and rewrite it.
23700  # Note: m4 eats our [], so we need to use [ and ] instead.
23701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23702  if test "x$has_forbidden_chars" != x; then
23703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23707      # Going to short mode and back again did indeed matter. Since short mode is
23708      # case insensitive, let's make it lowercase to improve readability.
23709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23710      # Now convert it back to Unix-stile (cygpath)
23711      input_path=`$CYGPATH -u "$shortmode_path"`
23712      new_path="$input_path"
23713    fi
23714  fi
23715
23716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23717  if test "x$test_cygdrive_prefix" = x; then
23718    # As a simple fix, exclude /usr/bin since it's not a real path.
23719    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23721      # a path prefixed by /cygdrive for fixpath to work.
23722      new_path="$CYGWIN_ROOT_PATH$input_path"
23723    fi
23724  fi
23725
23726  # remove trailing .exe if any
23727  new_path="${new_path/%.exe/}"
23728
23729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23730
23731  # First separate the path from the arguments. This will split at the first
23732  # space.
23733  complete="$CPP"
23734  path="${complete%% *}"
23735  tmp="$complete EOL"
23736  arguments="${tmp#* }"
23737
23738  # Input might be given as Windows format, start by converting to
23739  # unix format.
23740  new_path="$path"
23741
23742  windows_path="$new_path"
23743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23744    unix_path=`$CYGPATH -u "$windows_path"`
23745    new_path="$unix_path"
23746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23748    new_path="$unix_path"
23749  fi
23750
23751
23752  # Now try to locate executable using which
23753  new_path=`$WHICH "$new_path" 2> /dev/null`
23754
23755  if test "x$new_path" = x; then
23756    # Oops. Which didn't find the executable.
23757    # The splitting of arguments from the executable at a space might have been incorrect,
23758    # since paths with space are more likely in Windows. Give it another try with the whole
23759    # argument.
23760    path="$complete"
23761    arguments="EOL"
23762    new_path="$path"
23763
23764  windows_path="$new_path"
23765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23766    unix_path=`$CYGPATH -u "$windows_path"`
23767    new_path="$unix_path"
23768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23770    new_path="$unix_path"
23771  fi
23772
23773
23774    new_path=`$WHICH "$new_path" 2> /dev/null`
23775
23776    if test "x$new_path" = x; then
23777      # It's still not found. Now this is an unrecoverable error.
23778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23779$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23780      has_space=`$ECHO "$complete" | $GREP " "`
23781      if test "x$has_space" != x; then
23782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23784      fi
23785      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23786    fi
23787  fi
23788
23789  # Now new_path has a complete unix path to the binary
23790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23791    # Keep paths in /bin as-is, but remove trailing .exe if any
23792    new_path="${new_path/%.exe/}"
23793    # Do not save /bin paths to all_fixpath_prefixes!
23794  else
23795    # Not in mixed or Windows style, start by that.
23796    new_path=`cmd //c echo $new_path`
23797
23798  input_path="$new_path"
23799  # Check if we need to convert this using DOS-style short mode. If the path
23800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23801  # take no chances and rewrite it.
23802  # Note: m4 eats our [], so we need to use [ and ] instead.
23803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23804  if test "x$has_forbidden_chars" != x; then
23805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23807  fi
23808
23809    # Output is in $new_path
23810
23811  windows_path="$new_path"
23812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23813    unix_path=`$CYGPATH -u "$windows_path"`
23814    new_path="$unix_path"
23815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23817    new_path="$unix_path"
23818  fi
23819
23820    # remove trailing .exe if any
23821    new_path="${new_path/%.exe/}"
23822
23823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23825  fi
23826
23827  else
23828    # We're on a posix platform. Hooray! :)
23829    # First separate the path from the arguments. This will split at the first
23830    # space.
23831    complete="$CPP"
23832    path="${complete%% *}"
23833    tmp="$complete EOL"
23834    arguments="${tmp#* }"
23835
23836    # Cannot rely on the command "which" here since it doesn't always work.
23837    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23838    if test -z "$is_absolute_path"; then
23839      # Path to executable is not absolute. Find it.
23840      IFS_save="$IFS"
23841      IFS=:
23842      for p in $PATH; do
23843        if test -f "$p/$path" && test -x "$p/$path"; then
23844          new_path="$p/$path"
23845          break
23846        fi
23847      done
23848      IFS="$IFS_save"
23849    else
23850      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23851$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23852      new_path="$path"
23853    fi
23854
23855    if test "x$new_path" = x; then
23856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23857$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23858        has_space=`$ECHO "$complete" | $GREP " "`
23859        if test "x$has_space" != x; then
23860          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23861$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23862        fi
23863        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23864      fi
23865  fi
23866
23867      # Now join together the path and the arguments once again
23868      if test "x$arguments" != xEOL; then
23869        new_complete="$new_path ${arguments% *}"
23870      else
23871        new_complete="$new_path"
23872      fi
23873
23874  if test "x$complete" != "x$new_complete"; then
23875      CPP="$new_complete"
23876      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23877$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23878    fi
23879
23880
23881ac_ext=cpp
23882ac_cpp='$CXXCPP $CPPFLAGS'
23883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23887$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23888if test -z "$CXXCPP"; then
23889  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23890  $as_echo_n "(cached) " >&6
23891else
23892      # Double quotes because CXXCPP needs to be expanded
23893    for CXXCPP in "$CXX -E" "/lib/cpp"
23894    do
23895      ac_preproc_ok=false
23896for ac_cxx_preproc_warn_flag in '' yes
23897do
23898  # Use a header file that comes with gcc, so configuring glibc
23899  # with a fresh cross-compiler works.
23900  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23901  # <limits.h> exists even on freestanding compilers.
23902  # On the NeXT, cc -E runs the code through the compiler's parser,
23903  # not just through cpp. "Syntax error" is here to catch this case.
23904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23905/* end confdefs.h.  */
23906#ifdef __STDC__
23907# include <limits.h>
23908#else
23909# include <assert.h>
23910#endif
23911		     Syntax error
23912_ACEOF
23913if ac_fn_cxx_try_cpp "$LINENO"; then :
23914
23915else
23916  # Broken: fails on valid input.
23917continue
23918fi
23919rm -f conftest.err conftest.i conftest.$ac_ext
23920
23921  # OK, works on sane cases.  Now check whether nonexistent headers
23922  # can be detected and how.
23923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23924/* end confdefs.h.  */
23925#include <ac_nonexistent.h>
23926_ACEOF
23927if ac_fn_cxx_try_cpp "$LINENO"; then :
23928  # Broken: success on invalid input.
23929continue
23930else
23931  # Passes both tests.
23932ac_preproc_ok=:
23933break
23934fi
23935rm -f conftest.err conftest.i conftest.$ac_ext
23936
23937done
23938# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23939rm -f conftest.i conftest.err conftest.$ac_ext
23940if $ac_preproc_ok; then :
23941  break
23942fi
23943
23944    done
23945    ac_cv_prog_CXXCPP=$CXXCPP
23946
23947fi
23948  CXXCPP=$ac_cv_prog_CXXCPP
23949else
23950  ac_cv_prog_CXXCPP=$CXXCPP
23951fi
23952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23953$as_echo "$CXXCPP" >&6; }
23954ac_preproc_ok=false
23955for ac_cxx_preproc_warn_flag in '' yes
23956do
23957  # Use a header file that comes with gcc, so configuring glibc
23958  # with a fresh cross-compiler works.
23959  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23960  # <limits.h> exists even on freestanding compilers.
23961  # On the NeXT, cc -E runs the code through the compiler's parser,
23962  # not just through cpp. "Syntax error" is here to catch this case.
23963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23964/* end confdefs.h.  */
23965#ifdef __STDC__
23966# include <limits.h>
23967#else
23968# include <assert.h>
23969#endif
23970		     Syntax error
23971_ACEOF
23972if ac_fn_cxx_try_cpp "$LINENO"; then :
23973
23974else
23975  # Broken: fails on valid input.
23976continue
23977fi
23978rm -f conftest.err conftest.i conftest.$ac_ext
23979
23980  # OK, works on sane cases.  Now check whether nonexistent headers
23981  # can be detected and how.
23982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23983/* end confdefs.h.  */
23984#include <ac_nonexistent.h>
23985_ACEOF
23986if ac_fn_cxx_try_cpp "$LINENO"; then :
23987  # Broken: success on invalid input.
23988continue
23989else
23990  # Passes both tests.
23991ac_preproc_ok=:
23992break
23993fi
23994rm -f conftest.err conftest.i conftest.$ac_ext
23995
23996done
23997# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23998rm -f conftest.i conftest.err conftest.$ac_ext
23999if $ac_preproc_ok; then :
24000
24001else
24002  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24004as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24005See \`config.log' for more details" "$LINENO" 5 ; }
24006fi
24007
24008ac_ext=cpp
24009ac_cpp='$CXXCPP $CPPFLAGS'
24010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24013
24014
24015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24016
24017  # First separate the path from the arguments. This will split at the first
24018  # space.
24019  complete="$CXXCPP"
24020  path="${complete%% *}"
24021  tmp="$complete EOL"
24022  arguments="${tmp#* }"
24023
24024  # Input might be given as Windows format, start by converting to
24025  # unix format.
24026  new_path=`$CYGPATH -u "$path"`
24027
24028  # Now try to locate executable using which
24029  new_path=`$WHICH "$new_path" 2> /dev/null`
24030  # bat and cmd files are not always considered executable in cygwin causing which
24031  # to not find them
24032  if test "x$new_path" = x \
24033           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24034           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24035    new_path=`$CYGPATH -u "$path"`
24036  fi
24037  if test "x$new_path" = x; then
24038    # Oops. Which didn't find the executable.
24039    # The splitting of arguments from the executable at a space might have been incorrect,
24040    # since paths with space are more likely in Windows. Give it another try with the whole
24041    # argument.
24042    path="$complete"
24043    arguments="EOL"
24044    new_path=`$CYGPATH -u "$path"`
24045    new_path=`$WHICH "$new_path" 2> /dev/null`
24046    # bat and cmd files are not always considered executable in cygwin causing which
24047    # to not find them
24048    if test "x$new_path" = x \
24049             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24050             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24051      new_path=`$CYGPATH -u "$path"`
24052    fi
24053    if test "x$new_path" = x; then
24054      # It's still not found. Now this is an unrecoverable error.
24055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24056$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24057      has_space=`$ECHO "$complete" | $GREP " "`
24058      if test "x$has_space" != x; then
24059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24061      fi
24062      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24063    fi
24064  fi
24065
24066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24069  # "foo.exe" is OK but "foo" is an error.
24070  #
24071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24072  # It is also a way to make sure we got the proper file name for the real test later on.
24073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24074  if test "x$test_shortpath" = x; then
24075    # Short path failed, file does not exist as specified.
24076    # Try adding .exe or .cmd
24077    if test -f "${new_path}.exe"; then
24078       input_to_shortpath="${new_path}.exe"
24079    elif test -f "${new_path}.cmd"; then
24080       input_to_shortpath="${new_path}.cmd"
24081    else
24082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24083$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24086      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24087    fi
24088  else
24089    input_to_shortpath="$new_path"
24090  fi
24091
24092  # Call helper function which possibly converts this using DOS-style short mode.
24093  # If so, the updated path is stored in $new_path.
24094  new_path="$input_to_shortpath"
24095
24096  input_path="$input_to_shortpath"
24097  # Check if we need to convert this using DOS-style short mode. If the path
24098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24099  # take no chances and rewrite it.
24100  # Note: m4 eats our [], so we need to use [ and ] instead.
24101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24102  if test "x$has_forbidden_chars" != x; then
24103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24107      # Going to short mode and back again did indeed matter. Since short mode is
24108      # case insensitive, let's make it lowercase to improve readability.
24109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24110      # Now convert it back to Unix-stile (cygpath)
24111      input_path=`$CYGPATH -u "$shortmode_path"`
24112      new_path="$input_path"
24113    fi
24114  fi
24115
24116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24117  if test "x$test_cygdrive_prefix" = x; then
24118    # As a simple fix, exclude /usr/bin since it's not a real path.
24119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24121      # a path prefixed by /cygdrive for fixpath to work.
24122      new_path="$CYGWIN_ROOT_PATH$input_path"
24123    fi
24124  fi
24125
24126  # remove trailing .exe if any
24127  new_path="${new_path/%.exe/}"
24128
24129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24130
24131  # First separate the path from the arguments. This will split at the first
24132  # space.
24133  complete="$CXXCPP"
24134  path="${complete%% *}"
24135  tmp="$complete EOL"
24136  arguments="${tmp#* }"
24137
24138  # Input might be given as Windows format, start by converting to
24139  # unix format.
24140  new_path="$path"
24141
24142  windows_path="$new_path"
24143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24144    unix_path=`$CYGPATH -u "$windows_path"`
24145    new_path="$unix_path"
24146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24148    new_path="$unix_path"
24149  fi
24150
24151
24152  # Now try to locate executable using which
24153  new_path=`$WHICH "$new_path" 2> /dev/null`
24154
24155  if test "x$new_path" = x; then
24156    # Oops. Which didn't find the executable.
24157    # The splitting of arguments from the executable at a space might have been incorrect,
24158    # since paths with space are more likely in Windows. Give it another try with the whole
24159    # argument.
24160    path="$complete"
24161    arguments="EOL"
24162    new_path="$path"
24163
24164  windows_path="$new_path"
24165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24166    unix_path=`$CYGPATH -u "$windows_path"`
24167    new_path="$unix_path"
24168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24170    new_path="$unix_path"
24171  fi
24172
24173
24174    new_path=`$WHICH "$new_path" 2> /dev/null`
24175
24176    if test "x$new_path" = x; then
24177      # It's still not found. Now this is an unrecoverable error.
24178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24179$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24180      has_space=`$ECHO "$complete" | $GREP " "`
24181      if test "x$has_space" != x; then
24182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24184      fi
24185      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24186    fi
24187  fi
24188
24189  # Now new_path has a complete unix path to the binary
24190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24191    # Keep paths in /bin as-is, but remove trailing .exe if any
24192    new_path="${new_path/%.exe/}"
24193    # Do not save /bin paths to all_fixpath_prefixes!
24194  else
24195    # Not in mixed or Windows style, start by that.
24196    new_path=`cmd //c echo $new_path`
24197
24198  input_path="$new_path"
24199  # Check if we need to convert this using DOS-style short mode. If the path
24200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24201  # take no chances and rewrite it.
24202  # Note: m4 eats our [], so we need to use [ and ] instead.
24203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24204  if test "x$has_forbidden_chars" != x; then
24205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24207  fi
24208
24209    # Output is in $new_path
24210
24211  windows_path="$new_path"
24212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24213    unix_path=`$CYGPATH -u "$windows_path"`
24214    new_path="$unix_path"
24215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24217    new_path="$unix_path"
24218  fi
24219
24220    # remove trailing .exe if any
24221    new_path="${new_path/%.exe/}"
24222
24223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24225  fi
24226
24227  else
24228    # We're on a posix platform. Hooray! :)
24229    # First separate the path from the arguments. This will split at the first
24230    # space.
24231    complete="$CXXCPP"
24232    path="${complete%% *}"
24233    tmp="$complete EOL"
24234    arguments="${tmp#* }"
24235
24236    # Cannot rely on the command "which" here since it doesn't always work.
24237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24238    if test -z "$is_absolute_path"; then
24239      # Path to executable is not absolute. Find it.
24240      IFS_save="$IFS"
24241      IFS=:
24242      for p in $PATH; do
24243        if test -f "$p/$path" && test -x "$p/$path"; then
24244          new_path="$p/$path"
24245          break
24246        fi
24247      done
24248      IFS="$IFS_save"
24249    else
24250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24251$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24252      new_path="$path"
24253    fi
24254
24255    if test "x$new_path" = x; then
24256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24257$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24258        has_space=`$ECHO "$complete" | $GREP " "`
24259        if test "x$has_space" != x; then
24260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24262        fi
24263        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24264      fi
24265  fi
24266
24267      # Now join together the path and the arguments once again
24268      if test "x$arguments" != xEOL; then
24269        new_complete="$new_path ${arguments% *}"
24270      else
24271        new_complete="$new_path"
24272      fi
24273
24274  if test "x$complete" != "x$new_complete"; then
24275      CXXCPP="$new_complete"
24276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24277$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24278    fi
24279
24280
24281if test "x$COMPILE_TYPE" != "xcross"; then
24282    # If we are not cross compiling, use the same compilers for
24283    # building the build platform executables. The cross-compilation
24284    # case needed to be done earlier, but this can only be done after
24285    # the native tools have been localized.
24286    BUILD_CC="$CC"
24287    BUILD_CXX="$CXX"
24288    BUILD_LD="$LD"
24289fi
24290
24291# for solaris we really need solaris tools, and not gnu equivalent
24292#   these seems to normally reside in /usr/ccs/bin so add that to path before
24293#   starting to probe
24294#
24295#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24296#         so that it can be overriden --with-tools-dir
24297if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24298    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24299fi
24300
24301# Find the right assembler.
24302if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24303    # Extract the first word of "as", so it can be a program name with args.
24304set dummy as; ac_word=$2
24305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24306$as_echo_n "checking for $ac_word... " >&6; }
24307if test "${ac_cv_path_AS+set}" = set; then :
24308  $as_echo_n "(cached) " >&6
24309else
24310  case $AS in
24311  [\\/]* | ?:[\\/]*)
24312  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24313  ;;
24314  *)
24315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24316for as_dir in $PATH
24317do
24318  IFS=$as_save_IFS
24319  test -z "$as_dir" && as_dir=.
24320    for ac_exec_ext in '' $ac_executable_extensions; do
24321  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24322    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24324    break 2
24325  fi
24326done
24327  done
24328IFS=$as_save_IFS
24329
24330  ;;
24331esac
24332fi
24333AS=$ac_cv_path_AS
24334if test -n "$AS"; then
24335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24336$as_echo "$AS" >&6; }
24337else
24338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24339$as_echo "no" >&6; }
24340fi
24341
24342
24343
24344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24345
24346  # First separate the path from the arguments. This will split at the first
24347  # space.
24348  complete="$AS"
24349  path="${complete%% *}"
24350  tmp="$complete EOL"
24351  arguments="${tmp#* }"
24352
24353  # Input might be given as Windows format, start by converting to
24354  # unix format.
24355  new_path=`$CYGPATH -u "$path"`
24356
24357  # Now try to locate executable using which
24358  new_path=`$WHICH "$new_path" 2> /dev/null`
24359  # bat and cmd files are not always considered executable in cygwin causing which
24360  # to not find them
24361  if test "x$new_path" = x \
24362           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24363           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24364    new_path=`$CYGPATH -u "$path"`
24365  fi
24366  if test "x$new_path" = x; then
24367    # Oops. Which didn't find the executable.
24368    # The splitting of arguments from the executable at a space might have been incorrect,
24369    # since paths with space are more likely in Windows. Give it another try with the whole
24370    # argument.
24371    path="$complete"
24372    arguments="EOL"
24373    new_path=`$CYGPATH -u "$path"`
24374    new_path=`$WHICH "$new_path" 2> /dev/null`
24375    # bat and cmd files are not always considered executable in cygwin causing which
24376    # to not find them
24377    if test "x$new_path" = x \
24378             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24379             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24380      new_path=`$CYGPATH -u "$path"`
24381    fi
24382    if test "x$new_path" = x; then
24383      # It's still not found. Now this is an unrecoverable error.
24384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24385$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24386      has_space=`$ECHO "$complete" | $GREP " "`
24387      if test "x$has_space" != x; then
24388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24390      fi
24391      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24392    fi
24393  fi
24394
24395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24398  # "foo.exe" is OK but "foo" is an error.
24399  #
24400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24401  # It is also a way to make sure we got the proper file name for the real test later on.
24402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24403  if test "x$test_shortpath" = x; then
24404    # Short path failed, file does not exist as specified.
24405    # Try adding .exe or .cmd
24406    if test -f "${new_path}.exe"; then
24407       input_to_shortpath="${new_path}.exe"
24408    elif test -f "${new_path}.cmd"; then
24409       input_to_shortpath="${new_path}.cmd"
24410    else
24411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24412$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24415      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24416    fi
24417  else
24418    input_to_shortpath="$new_path"
24419  fi
24420
24421  # Call helper function which possibly converts this using DOS-style short mode.
24422  # If so, the updated path is stored in $new_path.
24423  new_path="$input_to_shortpath"
24424
24425  input_path="$input_to_shortpath"
24426  # Check if we need to convert this using DOS-style short mode. If the path
24427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24428  # take no chances and rewrite it.
24429  # Note: m4 eats our [], so we need to use [ and ] instead.
24430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24431  if test "x$has_forbidden_chars" != x; then
24432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24436      # Going to short mode and back again did indeed matter. Since short mode is
24437      # case insensitive, let's make it lowercase to improve readability.
24438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24439      # Now convert it back to Unix-stile (cygpath)
24440      input_path=`$CYGPATH -u "$shortmode_path"`
24441      new_path="$input_path"
24442    fi
24443  fi
24444
24445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24446  if test "x$test_cygdrive_prefix" = x; then
24447    # As a simple fix, exclude /usr/bin since it's not a real path.
24448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24450      # a path prefixed by /cygdrive for fixpath to work.
24451      new_path="$CYGWIN_ROOT_PATH$input_path"
24452    fi
24453  fi
24454
24455  # remove trailing .exe if any
24456  new_path="${new_path/%.exe/}"
24457
24458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24459
24460  # First separate the path from the arguments. This will split at the first
24461  # space.
24462  complete="$AS"
24463  path="${complete%% *}"
24464  tmp="$complete EOL"
24465  arguments="${tmp#* }"
24466
24467  # Input might be given as Windows format, start by converting to
24468  # unix format.
24469  new_path="$path"
24470
24471  windows_path="$new_path"
24472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24473    unix_path=`$CYGPATH -u "$windows_path"`
24474    new_path="$unix_path"
24475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24477    new_path="$unix_path"
24478  fi
24479
24480
24481  # Now try to locate executable using which
24482  new_path=`$WHICH "$new_path" 2> /dev/null`
24483
24484  if test "x$new_path" = x; then
24485    # Oops. Which didn't find the executable.
24486    # The splitting of arguments from the executable at a space might have been incorrect,
24487    # since paths with space are more likely in Windows. Give it another try with the whole
24488    # argument.
24489    path="$complete"
24490    arguments="EOL"
24491    new_path="$path"
24492
24493  windows_path="$new_path"
24494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24495    unix_path=`$CYGPATH -u "$windows_path"`
24496    new_path="$unix_path"
24497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24499    new_path="$unix_path"
24500  fi
24501
24502
24503    new_path=`$WHICH "$new_path" 2> /dev/null`
24504
24505    if test "x$new_path" = x; then
24506      # It's still not found. Now this is an unrecoverable error.
24507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24508$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24509      has_space=`$ECHO "$complete" | $GREP " "`
24510      if test "x$has_space" != x; then
24511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24513      fi
24514      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24515    fi
24516  fi
24517
24518  # Now new_path has a complete unix path to the binary
24519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24520    # Keep paths in /bin as-is, but remove trailing .exe if any
24521    new_path="${new_path/%.exe/}"
24522    # Do not save /bin paths to all_fixpath_prefixes!
24523  else
24524    # Not in mixed or Windows style, start by that.
24525    new_path=`cmd //c echo $new_path`
24526
24527  input_path="$new_path"
24528  # Check if we need to convert this using DOS-style short mode. If the path
24529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24530  # take no chances and rewrite it.
24531  # Note: m4 eats our [], so we need to use [ and ] instead.
24532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24533  if test "x$has_forbidden_chars" != x; then
24534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24536  fi
24537
24538    # Output is in $new_path
24539
24540  windows_path="$new_path"
24541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24542    unix_path=`$CYGPATH -u "$windows_path"`
24543    new_path="$unix_path"
24544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24546    new_path="$unix_path"
24547  fi
24548
24549    # remove trailing .exe if any
24550    new_path="${new_path/%.exe/}"
24551
24552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24554  fi
24555
24556  else
24557    # We're on a posix platform. Hooray! :)
24558    # First separate the path from the arguments. This will split at the first
24559    # space.
24560    complete="$AS"
24561    path="${complete%% *}"
24562    tmp="$complete EOL"
24563    arguments="${tmp#* }"
24564
24565    # Cannot rely on the command "which" here since it doesn't always work.
24566    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24567    if test -z "$is_absolute_path"; then
24568      # Path to executable is not absolute. Find it.
24569      IFS_save="$IFS"
24570      IFS=:
24571      for p in $PATH; do
24572        if test -f "$p/$path" && test -x "$p/$path"; then
24573          new_path="$p/$path"
24574          break
24575        fi
24576      done
24577      IFS="$IFS_save"
24578    else
24579      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24580$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24581      new_path="$path"
24582    fi
24583
24584    if test "x$new_path" = x; then
24585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24586$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24587        has_space=`$ECHO "$complete" | $GREP " "`
24588        if test "x$has_space" != x; then
24589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24591        fi
24592        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24593      fi
24594  fi
24595
24596      # Now join together the path and the arguments once again
24597      if test "x$arguments" != xEOL; then
24598        new_complete="$new_path ${arguments% *}"
24599      else
24600        new_complete="$new_path"
24601      fi
24602
24603  if test "x$complete" != "x$new_complete"; then
24604      AS="$new_complete"
24605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24606$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24607    fi
24608
24609else
24610    AS="$CC -c"
24611fi
24612
24613
24614if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24615    for ac_prog in gnm nm
24616do
24617  # Extract the first word of "$ac_prog", so it can be a program name with args.
24618set dummy $ac_prog; ac_word=$2
24619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24620$as_echo_n "checking for $ac_word... " >&6; }
24621if test "${ac_cv_path_NM+set}" = set; then :
24622  $as_echo_n "(cached) " >&6
24623else
24624  case $NM in
24625  [\\/]* | ?:[\\/]*)
24626  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24627  ;;
24628  *)
24629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24630for as_dir in $PATH
24631do
24632  IFS=$as_save_IFS
24633  test -z "$as_dir" && as_dir=.
24634    for ac_exec_ext in '' $ac_executable_extensions; do
24635  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24636    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24638    break 2
24639  fi
24640done
24641  done
24642IFS=$as_save_IFS
24643
24644  ;;
24645esac
24646fi
24647NM=$ac_cv_path_NM
24648if test -n "$NM"; then
24649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24650$as_echo "$NM" >&6; }
24651else
24652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24653$as_echo "no" >&6; }
24654fi
24655
24656
24657  test -n "$NM" && break
24658done
24659
24660
24661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24662
24663  # First separate the path from the arguments. This will split at the first
24664  # space.
24665  complete="$NM"
24666  path="${complete%% *}"
24667  tmp="$complete EOL"
24668  arguments="${tmp#* }"
24669
24670  # Input might be given as Windows format, start by converting to
24671  # unix format.
24672  new_path=`$CYGPATH -u "$path"`
24673
24674  # Now try to locate executable using which
24675  new_path=`$WHICH "$new_path" 2> /dev/null`
24676  # bat and cmd files are not always considered executable in cygwin causing which
24677  # to not find them
24678  if test "x$new_path" = x \
24679           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24680           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24681    new_path=`$CYGPATH -u "$path"`
24682  fi
24683  if test "x$new_path" = x; then
24684    # Oops. Which didn't find the executable.
24685    # The splitting of arguments from the executable at a space might have been incorrect,
24686    # since paths with space are more likely in Windows. Give it another try with the whole
24687    # argument.
24688    path="$complete"
24689    arguments="EOL"
24690    new_path=`$CYGPATH -u "$path"`
24691    new_path=`$WHICH "$new_path" 2> /dev/null`
24692    # bat and cmd files are not always considered executable in cygwin causing which
24693    # to not find them
24694    if test "x$new_path" = x \
24695             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24696             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24697      new_path=`$CYGPATH -u "$path"`
24698    fi
24699    if test "x$new_path" = x; then
24700      # It's still not found. Now this is an unrecoverable error.
24701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24702$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24703      has_space=`$ECHO "$complete" | $GREP " "`
24704      if test "x$has_space" != x; then
24705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24707      fi
24708      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24709    fi
24710  fi
24711
24712  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24713  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24714  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24715  # "foo.exe" is OK but "foo" is an error.
24716  #
24717  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24718  # It is also a way to make sure we got the proper file name for the real test later on.
24719  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24720  if test "x$test_shortpath" = x; then
24721    # Short path failed, file does not exist as specified.
24722    # Try adding .exe or .cmd
24723    if test -f "${new_path}.exe"; then
24724       input_to_shortpath="${new_path}.exe"
24725    elif test -f "${new_path}.cmd"; then
24726       input_to_shortpath="${new_path}.cmd"
24727    else
24728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24729$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24730      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24731$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24732      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24733    fi
24734  else
24735    input_to_shortpath="$new_path"
24736  fi
24737
24738  # Call helper function which possibly converts this using DOS-style short mode.
24739  # If so, the updated path is stored in $new_path.
24740  new_path="$input_to_shortpath"
24741
24742  input_path="$input_to_shortpath"
24743  # Check if we need to convert this using DOS-style short mode. If the path
24744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24745  # take no chances and rewrite it.
24746  # Note: m4 eats our [], so we need to use [ and ] instead.
24747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24748  if test "x$has_forbidden_chars" != x; then
24749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24753      # Going to short mode and back again did indeed matter. Since short mode is
24754      # case insensitive, let's make it lowercase to improve readability.
24755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24756      # Now convert it back to Unix-stile (cygpath)
24757      input_path=`$CYGPATH -u "$shortmode_path"`
24758      new_path="$input_path"
24759    fi
24760  fi
24761
24762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24763  if test "x$test_cygdrive_prefix" = x; then
24764    # As a simple fix, exclude /usr/bin since it's not a real path.
24765    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24767      # a path prefixed by /cygdrive for fixpath to work.
24768      new_path="$CYGWIN_ROOT_PATH$input_path"
24769    fi
24770  fi
24771
24772  # remove trailing .exe if any
24773  new_path="${new_path/%.exe/}"
24774
24775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24776
24777  # First separate the path from the arguments. This will split at the first
24778  # space.
24779  complete="$NM"
24780  path="${complete%% *}"
24781  tmp="$complete EOL"
24782  arguments="${tmp#* }"
24783
24784  # Input might be given as Windows format, start by converting to
24785  # unix format.
24786  new_path="$path"
24787
24788  windows_path="$new_path"
24789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24790    unix_path=`$CYGPATH -u "$windows_path"`
24791    new_path="$unix_path"
24792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24794    new_path="$unix_path"
24795  fi
24796
24797
24798  # Now try to locate executable using which
24799  new_path=`$WHICH "$new_path" 2> /dev/null`
24800
24801  if test "x$new_path" = x; then
24802    # Oops. Which didn't find the executable.
24803    # The splitting of arguments from the executable at a space might have been incorrect,
24804    # since paths with space are more likely in Windows. Give it another try with the whole
24805    # argument.
24806    path="$complete"
24807    arguments="EOL"
24808    new_path="$path"
24809
24810  windows_path="$new_path"
24811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24812    unix_path=`$CYGPATH -u "$windows_path"`
24813    new_path="$unix_path"
24814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24816    new_path="$unix_path"
24817  fi
24818
24819
24820    new_path=`$WHICH "$new_path" 2> /dev/null`
24821
24822    if test "x$new_path" = x; then
24823      # It's still not found. Now this is an unrecoverable error.
24824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24825$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24826      has_space=`$ECHO "$complete" | $GREP " "`
24827      if test "x$has_space" != x; then
24828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24830      fi
24831      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24832    fi
24833  fi
24834
24835  # Now new_path has a complete unix path to the binary
24836  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24837    # Keep paths in /bin as-is, but remove trailing .exe if any
24838    new_path="${new_path/%.exe/}"
24839    # Do not save /bin paths to all_fixpath_prefixes!
24840  else
24841    # Not in mixed or Windows style, start by that.
24842    new_path=`cmd //c echo $new_path`
24843
24844  input_path="$new_path"
24845  # Check if we need to convert this using DOS-style short mode. If the path
24846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24847  # take no chances and rewrite it.
24848  # Note: m4 eats our [], so we need to use [ and ] instead.
24849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24850  if test "x$has_forbidden_chars" != x; then
24851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24853  fi
24854
24855    # Output is in $new_path
24856
24857  windows_path="$new_path"
24858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24859    unix_path=`$CYGPATH -u "$windows_path"`
24860    new_path="$unix_path"
24861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24863    new_path="$unix_path"
24864  fi
24865
24866    # remove trailing .exe if any
24867    new_path="${new_path/%.exe/}"
24868
24869    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24870    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24871  fi
24872
24873  else
24874    # We're on a posix platform. Hooray! :)
24875    # First separate the path from the arguments. This will split at the first
24876    # space.
24877    complete="$NM"
24878    path="${complete%% *}"
24879    tmp="$complete EOL"
24880    arguments="${tmp#* }"
24881
24882    # Cannot rely on the command "which" here since it doesn't always work.
24883    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24884    if test -z "$is_absolute_path"; then
24885      # Path to executable is not absolute. Find it.
24886      IFS_save="$IFS"
24887      IFS=:
24888      for p in $PATH; do
24889        if test -f "$p/$path" && test -x "$p/$path"; then
24890          new_path="$p/$path"
24891          break
24892        fi
24893      done
24894      IFS="$IFS_save"
24895    else
24896      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24897$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24898      new_path="$path"
24899    fi
24900
24901    if test "x$new_path" = x; then
24902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24903$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24904        has_space=`$ECHO "$complete" | $GREP " "`
24905        if test "x$has_space" != x; then
24906          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24907$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24908        fi
24909        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24910      fi
24911  fi
24912
24913      # Now join together the path and the arguments once again
24914      if test "x$arguments" != xEOL; then
24915        new_complete="$new_path ${arguments% *}"
24916      else
24917        new_complete="$new_path"
24918      fi
24919
24920  if test "x$complete" != "x$new_complete"; then
24921      NM="$new_complete"
24922      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24923$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24924    fi
24925
24926    # Extract the first word of "strip", so it can be a program name with args.
24927set dummy strip; ac_word=$2
24928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24929$as_echo_n "checking for $ac_word... " >&6; }
24930if test "${ac_cv_path_STRIP+set}" = set; then :
24931  $as_echo_n "(cached) " >&6
24932else
24933  case $STRIP in
24934  [\\/]* | ?:[\\/]*)
24935  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24936  ;;
24937  *)
24938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24939for as_dir in $PATH
24940do
24941  IFS=$as_save_IFS
24942  test -z "$as_dir" && as_dir=.
24943    for ac_exec_ext in '' $ac_executable_extensions; do
24944  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24945    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24947    break 2
24948  fi
24949done
24950  done
24951IFS=$as_save_IFS
24952
24953  ;;
24954esac
24955fi
24956STRIP=$ac_cv_path_STRIP
24957if test -n "$STRIP"; then
24958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24959$as_echo "$STRIP" >&6; }
24960else
24961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24962$as_echo "no" >&6; }
24963fi
24964
24965
24966
24967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24968
24969  # First separate the path from the arguments. This will split at the first
24970  # space.
24971  complete="$STRIP"
24972  path="${complete%% *}"
24973  tmp="$complete EOL"
24974  arguments="${tmp#* }"
24975
24976  # Input might be given as Windows format, start by converting to
24977  # unix format.
24978  new_path=`$CYGPATH -u "$path"`
24979
24980  # Now try to locate executable using which
24981  new_path=`$WHICH "$new_path" 2> /dev/null`
24982  # bat and cmd files are not always considered executable in cygwin causing which
24983  # to not find them
24984  if test "x$new_path" = x \
24985           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24986           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24987    new_path=`$CYGPATH -u "$path"`
24988  fi
24989  if test "x$new_path" = x; then
24990    # Oops. Which didn't find the executable.
24991    # The splitting of arguments from the executable at a space might have been incorrect,
24992    # since paths with space are more likely in Windows. Give it another try with the whole
24993    # argument.
24994    path="$complete"
24995    arguments="EOL"
24996    new_path=`$CYGPATH -u "$path"`
24997    new_path=`$WHICH "$new_path" 2> /dev/null`
24998    # bat and cmd files are not always considered executable in cygwin causing which
24999    # to not find them
25000    if test "x$new_path" = x \
25001             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25002             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25003      new_path=`$CYGPATH -u "$path"`
25004    fi
25005    if test "x$new_path" = x; then
25006      # It's still not found. Now this is an unrecoverable error.
25007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25008$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25009      has_space=`$ECHO "$complete" | $GREP " "`
25010      if test "x$has_space" != x; then
25011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25013      fi
25014      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25015    fi
25016  fi
25017
25018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25021  # "foo.exe" is OK but "foo" is an error.
25022  #
25023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25024  # It is also a way to make sure we got the proper file name for the real test later on.
25025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25026  if test "x$test_shortpath" = x; then
25027    # Short path failed, file does not exist as specified.
25028    # Try adding .exe or .cmd
25029    if test -f "${new_path}.exe"; then
25030       input_to_shortpath="${new_path}.exe"
25031    elif test -f "${new_path}.cmd"; then
25032       input_to_shortpath="${new_path}.cmd"
25033    else
25034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25035$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25038      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25039    fi
25040  else
25041    input_to_shortpath="$new_path"
25042  fi
25043
25044  # Call helper function which possibly converts this using DOS-style short mode.
25045  # If so, the updated path is stored in $new_path.
25046  new_path="$input_to_shortpath"
25047
25048  input_path="$input_to_shortpath"
25049  # Check if we need to convert this using DOS-style short mode. If the path
25050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25051  # take no chances and rewrite it.
25052  # Note: m4 eats our [], so we need to use [ and ] instead.
25053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25054  if test "x$has_forbidden_chars" != x; then
25055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25059      # Going to short mode and back again did indeed matter. Since short mode is
25060      # case insensitive, let's make it lowercase to improve readability.
25061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25062      # Now convert it back to Unix-stile (cygpath)
25063      input_path=`$CYGPATH -u "$shortmode_path"`
25064      new_path="$input_path"
25065    fi
25066  fi
25067
25068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25069  if test "x$test_cygdrive_prefix" = x; then
25070    # As a simple fix, exclude /usr/bin since it's not a real path.
25071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25073      # a path prefixed by /cygdrive for fixpath to work.
25074      new_path="$CYGWIN_ROOT_PATH$input_path"
25075    fi
25076  fi
25077
25078  # remove trailing .exe if any
25079  new_path="${new_path/%.exe/}"
25080
25081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25082
25083  # First separate the path from the arguments. This will split at the first
25084  # space.
25085  complete="$STRIP"
25086  path="${complete%% *}"
25087  tmp="$complete EOL"
25088  arguments="${tmp#* }"
25089
25090  # Input might be given as Windows format, start by converting to
25091  # unix format.
25092  new_path="$path"
25093
25094  windows_path="$new_path"
25095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25096    unix_path=`$CYGPATH -u "$windows_path"`
25097    new_path="$unix_path"
25098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25100    new_path="$unix_path"
25101  fi
25102
25103
25104  # Now try to locate executable using which
25105  new_path=`$WHICH "$new_path" 2> /dev/null`
25106
25107  if test "x$new_path" = x; then
25108    # Oops. Which didn't find the executable.
25109    # The splitting of arguments from the executable at a space might have been incorrect,
25110    # since paths with space are more likely in Windows. Give it another try with the whole
25111    # argument.
25112    path="$complete"
25113    arguments="EOL"
25114    new_path="$path"
25115
25116  windows_path="$new_path"
25117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25118    unix_path=`$CYGPATH -u "$windows_path"`
25119    new_path="$unix_path"
25120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25122    new_path="$unix_path"
25123  fi
25124
25125
25126    new_path=`$WHICH "$new_path" 2> /dev/null`
25127
25128    if test "x$new_path" = x; then
25129      # It's still not found. Now this is an unrecoverable error.
25130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25131$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25132      has_space=`$ECHO "$complete" | $GREP " "`
25133      if test "x$has_space" != x; then
25134        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25135$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25136      fi
25137      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25138    fi
25139  fi
25140
25141  # Now new_path has a complete unix path to the binary
25142  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25143    # Keep paths in /bin as-is, but remove trailing .exe if any
25144    new_path="${new_path/%.exe/}"
25145    # Do not save /bin paths to all_fixpath_prefixes!
25146  else
25147    # Not in mixed or Windows style, start by that.
25148    new_path=`cmd //c echo $new_path`
25149
25150  input_path="$new_path"
25151  # Check if we need to convert this using DOS-style short mode. If the path
25152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25153  # take no chances and rewrite it.
25154  # Note: m4 eats our [], so we need to use [ and ] instead.
25155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25156  if test "x$has_forbidden_chars" != x; then
25157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25159  fi
25160
25161    # Output is in $new_path
25162
25163  windows_path="$new_path"
25164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25165    unix_path=`$CYGPATH -u "$windows_path"`
25166    new_path="$unix_path"
25167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25169    new_path="$unix_path"
25170  fi
25171
25172    # remove trailing .exe if any
25173    new_path="${new_path/%.exe/}"
25174
25175    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25176    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25177  fi
25178
25179  else
25180    # We're on a posix platform. Hooray! :)
25181    # First separate the path from the arguments. This will split at the first
25182    # space.
25183    complete="$STRIP"
25184    path="${complete%% *}"
25185    tmp="$complete EOL"
25186    arguments="${tmp#* }"
25187
25188    # Cannot rely on the command "which" here since it doesn't always work.
25189    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25190    if test -z "$is_absolute_path"; then
25191      # Path to executable is not absolute. Find it.
25192      IFS_save="$IFS"
25193      IFS=:
25194      for p in $PATH; do
25195        if test -f "$p/$path" && test -x "$p/$path"; then
25196          new_path="$p/$path"
25197          break
25198        fi
25199      done
25200      IFS="$IFS_save"
25201    else
25202      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25203$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25204      new_path="$path"
25205    fi
25206
25207    if test "x$new_path" = x; then
25208        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25209$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25210        has_space=`$ECHO "$complete" | $GREP " "`
25211        if test "x$has_space" != x; then
25212          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25213$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25214        fi
25215        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25216      fi
25217  fi
25218
25219      # Now join together the path and the arguments once again
25220      if test "x$arguments" != xEOL; then
25221        new_complete="$new_path ${arguments% *}"
25222      else
25223        new_complete="$new_path"
25224      fi
25225
25226  if test "x$complete" != "x$new_complete"; then
25227      STRIP="$new_complete"
25228      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25229$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25230    fi
25231
25232    # Extract the first word of "mcs", so it can be a program name with args.
25233set dummy mcs; ac_word=$2
25234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25235$as_echo_n "checking for $ac_word... " >&6; }
25236if test "${ac_cv_path_MCS+set}" = set; then :
25237  $as_echo_n "(cached) " >&6
25238else
25239  case $MCS in
25240  [\\/]* | ?:[\\/]*)
25241  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25242  ;;
25243  *)
25244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25245for as_dir in $PATH
25246do
25247  IFS=$as_save_IFS
25248  test -z "$as_dir" && as_dir=.
25249    for ac_exec_ext in '' $ac_executable_extensions; do
25250  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25251    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25253    break 2
25254  fi
25255done
25256  done
25257IFS=$as_save_IFS
25258
25259  ;;
25260esac
25261fi
25262MCS=$ac_cv_path_MCS
25263if test -n "$MCS"; then
25264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25265$as_echo "$MCS" >&6; }
25266else
25267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25268$as_echo "no" >&6; }
25269fi
25270
25271
25272
25273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25274
25275  # First separate the path from the arguments. This will split at the first
25276  # space.
25277  complete="$MCS"
25278  path="${complete%% *}"
25279  tmp="$complete EOL"
25280  arguments="${tmp#* }"
25281
25282  # Input might be given as Windows format, start by converting to
25283  # unix format.
25284  new_path=`$CYGPATH -u "$path"`
25285
25286  # Now try to locate executable using which
25287  new_path=`$WHICH "$new_path" 2> /dev/null`
25288  # bat and cmd files are not always considered executable in cygwin causing which
25289  # to not find them
25290  if test "x$new_path" = x \
25291           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25292           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25293    new_path=`$CYGPATH -u "$path"`
25294  fi
25295  if test "x$new_path" = x; then
25296    # Oops. Which didn't find the executable.
25297    # The splitting of arguments from the executable at a space might have been incorrect,
25298    # since paths with space are more likely in Windows. Give it another try with the whole
25299    # argument.
25300    path="$complete"
25301    arguments="EOL"
25302    new_path=`$CYGPATH -u "$path"`
25303    new_path=`$WHICH "$new_path" 2> /dev/null`
25304    # bat and cmd files are not always considered executable in cygwin causing which
25305    # to not find them
25306    if test "x$new_path" = x \
25307             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25308             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25309      new_path=`$CYGPATH -u "$path"`
25310    fi
25311    if test "x$new_path" = x; then
25312      # It's still not found. Now this is an unrecoverable error.
25313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25314$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25315      has_space=`$ECHO "$complete" | $GREP " "`
25316      if test "x$has_space" != x; then
25317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25319      fi
25320      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25321    fi
25322  fi
25323
25324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25327  # "foo.exe" is OK but "foo" is an error.
25328  #
25329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25330  # It is also a way to make sure we got the proper file name for the real test later on.
25331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25332  if test "x$test_shortpath" = x; then
25333    # Short path failed, file does not exist as specified.
25334    # Try adding .exe or .cmd
25335    if test -f "${new_path}.exe"; then
25336       input_to_shortpath="${new_path}.exe"
25337    elif test -f "${new_path}.cmd"; then
25338       input_to_shortpath="${new_path}.cmd"
25339    else
25340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25341$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25342      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25343$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25344      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25345    fi
25346  else
25347    input_to_shortpath="$new_path"
25348  fi
25349
25350  # Call helper function which possibly converts this using DOS-style short mode.
25351  # If so, the updated path is stored in $new_path.
25352  new_path="$input_to_shortpath"
25353
25354  input_path="$input_to_shortpath"
25355  # Check if we need to convert this using DOS-style short mode. If the path
25356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25357  # take no chances and rewrite it.
25358  # Note: m4 eats our [], so we need to use [ and ] instead.
25359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25360  if test "x$has_forbidden_chars" != x; then
25361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25365      # Going to short mode and back again did indeed matter. Since short mode is
25366      # case insensitive, let's make it lowercase to improve readability.
25367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25368      # Now convert it back to Unix-stile (cygpath)
25369      input_path=`$CYGPATH -u "$shortmode_path"`
25370      new_path="$input_path"
25371    fi
25372  fi
25373
25374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25375  if test "x$test_cygdrive_prefix" = x; then
25376    # As a simple fix, exclude /usr/bin since it's not a real path.
25377    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25379      # a path prefixed by /cygdrive for fixpath to work.
25380      new_path="$CYGWIN_ROOT_PATH$input_path"
25381    fi
25382  fi
25383
25384  # remove trailing .exe if any
25385  new_path="${new_path/%.exe/}"
25386
25387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25388
25389  # First separate the path from the arguments. This will split at the first
25390  # space.
25391  complete="$MCS"
25392  path="${complete%% *}"
25393  tmp="$complete EOL"
25394  arguments="${tmp#* }"
25395
25396  # Input might be given as Windows format, start by converting to
25397  # unix format.
25398  new_path="$path"
25399
25400  windows_path="$new_path"
25401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25402    unix_path=`$CYGPATH -u "$windows_path"`
25403    new_path="$unix_path"
25404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25406    new_path="$unix_path"
25407  fi
25408
25409
25410  # Now try to locate executable using which
25411  new_path=`$WHICH "$new_path" 2> /dev/null`
25412
25413  if test "x$new_path" = x; then
25414    # Oops. Which didn't find the executable.
25415    # The splitting of arguments from the executable at a space might have been incorrect,
25416    # since paths with space are more likely in Windows. Give it another try with the whole
25417    # argument.
25418    path="$complete"
25419    arguments="EOL"
25420    new_path="$path"
25421
25422  windows_path="$new_path"
25423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25424    unix_path=`$CYGPATH -u "$windows_path"`
25425    new_path="$unix_path"
25426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25428    new_path="$unix_path"
25429  fi
25430
25431
25432    new_path=`$WHICH "$new_path" 2> /dev/null`
25433
25434    if test "x$new_path" = x; then
25435      # It's still not found. Now this is an unrecoverable error.
25436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25437$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25438      has_space=`$ECHO "$complete" | $GREP " "`
25439      if test "x$has_space" != x; then
25440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25442      fi
25443      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25444    fi
25445  fi
25446
25447  # Now new_path has a complete unix path to the binary
25448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25449    # Keep paths in /bin as-is, but remove trailing .exe if any
25450    new_path="${new_path/%.exe/}"
25451    # Do not save /bin paths to all_fixpath_prefixes!
25452  else
25453    # Not in mixed or Windows style, start by that.
25454    new_path=`cmd //c echo $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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25465  fi
25466
25467    # Output is in $new_path
25468
25469  windows_path="$new_path"
25470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25471    unix_path=`$CYGPATH -u "$windows_path"`
25472    new_path="$unix_path"
25473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25475    new_path="$unix_path"
25476  fi
25477
25478    # remove trailing .exe if any
25479    new_path="${new_path/%.exe/}"
25480
25481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25483  fi
25484
25485  else
25486    # We're on a posix platform. Hooray! :)
25487    # First separate the path from the arguments. This will split at the first
25488    # space.
25489    complete="$MCS"
25490    path="${complete%% *}"
25491    tmp="$complete EOL"
25492    arguments="${tmp#* }"
25493
25494    # Cannot rely on the command "which" here since it doesn't always work.
25495    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25496    if test -z "$is_absolute_path"; then
25497      # Path to executable is not absolute. Find it.
25498      IFS_save="$IFS"
25499      IFS=:
25500      for p in $PATH; do
25501        if test -f "$p/$path" && test -x "$p/$path"; then
25502          new_path="$p/$path"
25503          break
25504        fi
25505      done
25506      IFS="$IFS_save"
25507    else
25508      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25509$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25510      new_path="$path"
25511    fi
25512
25513    if test "x$new_path" = x; then
25514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25515$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25516        has_space=`$ECHO "$complete" | $GREP " "`
25517        if test "x$has_space" != x; then
25518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25520        fi
25521        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25522      fi
25523  fi
25524
25525      # Now join together the path and the arguments once again
25526      if test "x$arguments" != xEOL; then
25527        new_complete="$new_path ${arguments% *}"
25528      else
25529        new_complete="$new_path"
25530      fi
25531
25532  if test "x$complete" != "x$new_complete"; then
25533      MCS="$new_complete"
25534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25535$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25536    fi
25537
25538elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25539    if test -n "$ac_tool_prefix"; then
25540  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25541set dummy ${ac_tool_prefix}nm; ac_word=$2
25542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25543$as_echo_n "checking for $ac_word... " >&6; }
25544if test "${ac_cv_prog_NM+set}" = set; then :
25545  $as_echo_n "(cached) " >&6
25546else
25547  if test -n "$NM"; then
25548  ac_cv_prog_NM="$NM" # Let the user override the test.
25549else
25550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25551for as_dir in $PATH
25552do
25553  IFS=$as_save_IFS
25554  test -z "$as_dir" && as_dir=.
25555    for ac_exec_ext in '' $ac_executable_extensions; do
25556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25557    ac_cv_prog_NM="${ac_tool_prefix}nm"
25558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25559    break 2
25560  fi
25561done
25562  done
25563IFS=$as_save_IFS
25564
25565fi
25566fi
25567NM=$ac_cv_prog_NM
25568if test -n "$NM"; then
25569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25570$as_echo "$NM" >&6; }
25571else
25572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25573$as_echo "no" >&6; }
25574fi
25575
25576
25577fi
25578if test -z "$ac_cv_prog_NM"; then
25579  ac_ct_NM=$NM
25580  # Extract the first word of "nm", so it can be a program name with args.
25581set dummy nm; ac_word=$2
25582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25583$as_echo_n "checking for $ac_word... " >&6; }
25584if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25585  $as_echo_n "(cached) " >&6
25586else
25587  if test -n "$ac_ct_NM"; then
25588  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25589else
25590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25591for as_dir in $PATH
25592do
25593  IFS=$as_save_IFS
25594  test -z "$as_dir" && as_dir=.
25595    for ac_exec_ext in '' $ac_executable_extensions; do
25596  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25597    ac_cv_prog_ac_ct_NM="nm"
25598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25599    break 2
25600  fi
25601done
25602  done
25603IFS=$as_save_IFS
25604
25605fi
25606fi
25607ac_ct_NM=$ac_cv_prog_ac_ct_NM
25608if test -n "$ac_ct_NM"; then
25609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25610$as_echo "$ac_ct_NM" >&6; }
25611else
25612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25613$as_echo "no" >&6; }
25614fi
25615
25616  if test "x$ac_ct_NM" = x; then
25617    NM=""
25618  else
25619    case $cross_compiling:$ac_tool_warned in
25620yes:)
25621{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25622$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25623ac_tool_warned=yes ;;
25624esac
25625    NM=$ac_ct_NM
25626  fi
25627else
25628  NM="$ac_cv_prog_NM"
25629fi
25630
25631
25632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25633
25634  # First separate the path from the arguments. This will split at the first
25635  # space.
25636  complete="$NM"
25637  path="${complete%% *}"
25638  tmp="$complete EOL"
25639  arguments="${tmp#* }"
25640
25641  # Input might be given as Windows format, start by converting to
25642  # unix format.
25643  new_path=`$CYGPATH -u "$path"`
25644
25645  # Now try to locate executable using which
25646  new_path=`$WHICH "$new_path" 2> /dev/null`
25647  # bat and cmd files are not always considered executable in cygwin causing which
25648  # to not find them
25649  if test "x$new_path" = x \
25650           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25651           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25652    new_path=`$CYGPATH -u "$path"`
25653  fi
25654  if test "x$new_path" = x; then
25655    # Oops. Which didn't find the executable.
25656    # The splitting of arguments from the executable at a space might have been incorrect,
25657    # since paths with space are more likely in Windows. Give it another try with the whole
25658    # argument.
25659    path="$complete"
25660    arguments="EOL"
25661    new_path=`$CYGPATH -u "$path"`
25662    new_path=`$WHICH "$new_path" 2> /dev/null`
25663    # bat and cmd files are not always considered executable in cygwin causing which
25664    # to not find them
25665    if test "x$new_path" = x \
25666             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25667             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25668      new_path=`$CYGPATH -u "$path"`
25669    fi
25670    if test "x$new_path" = x; then
25671      # It's still not found. Now this is an unrecoverable error.
25672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25673$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25674      has_space=`$ECHO "$complete" | $GREP " "`
25675      if test "x$has_space" != x; then
25676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25678      fi
25679      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25680    fi
25681  fi
25682
25683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25686  # "foo.exe" is OK but "foo" is an error.
25687  #
25688  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25689  # It is also a way to make sure we got the proper file name for the real test later on.
25690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25691  if test "x$test_shortpath" = x; then
25692    # Short path failed, file does not exist as specified.
25693    # Try adding .exe or .cmd
25694    if test -f "${new_path}.exe"; then
25695       input_to_shortpath="${new_path}.exe"
25696    elif test -f "${new_path}.cmd"; then
25697       input_to_shortpath="${new_path}.cmd"
25698    else
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25700$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25703      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25704    fi
25705  else
25706    input_to_shortpath="$new_path"
25707  fi
25708
25709  # Call helper function which possibly converts this using DOS-style short mode.
25710  # If so, the updated path is stored in $new_path.
25711  new_path="$input_to_shortpath"
25712
25713  input_path="$input_to_shortpath"
25714  # Check if we need to convert this using DOS-style short mode. If the path
25715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25716  # take no chances and rewrite it.
25717  # Note: m4 eats our [], so we need to use [ and ] instead.
25718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25719  if test "x$has_forbidden_chars" != x; then
25720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25724      # Going to short mode and back again did indeed matter. Since short mode is
25725      # case insensitive, let's make it lowercase to improve readability.
25726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25727      # Now convert it back to Unix-stile (cygpath)
25728      input_path=`$CYGPATH -u "$shortmode_path"`
25729      new_path="$input_path"
25730    fi
25731  fi
25732
25733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25734  if test "x$test_cygdrive_prefix" = x; then
25735    # As a simple fix, exclude /usr/bin since it's not a real path.
25736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25738      # a path prefixed by /cygdrive for fixpath to work.
25739      new_path="$CYGWIN_ROOT_PATH$input_path"
25740    fi
25741  fi
25742
25743  # remove trailing .exe if any
25744  new_path="${new_path/%.exe/}"
25745
25746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25747
25748  # First separate the path from the arguments. This will split at the first
25749  # space.
25750  complete="$NM"
25751  path="${complete%% *}"
25752  tmp="$complete EOL"
25753  arguments="${tmp#* }"
25754
25755  # Input might be given as Windows format, start by converting to
25756  # unix format.
25757  new_path="$path"
25758
25759  windows_path="$new_path"
25760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25761    unix_path=`$CYGPATH -u "$windows_path"`
25762    new_path="$unix_path"
25763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25765    new_path="$unix_path"
25766  fi
25767
25768
25769  # Now try to locate executable using which
25770  new_path=`$WHICH "$new_path" 2> /dev/null`
25771
25772  if test "x$new_path" = x; then
25773    # Oops. Which didn't find the executable.
25774    # The splitting of arguments from the executable at a space might have been incorrect,
25775    # since paths with space are more likely in Windows. Give it another try with the whole
25776    # argument.
25777    path="$complete"
25778    arguments="EOL"
25779    new_path="$path"
25780
25781  windows_path="$new_path"
25782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25783    unix_path=`$CYGPATH -u "$windows_path"`
25784    new_path="$unix_path"
25785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25787    new_path="$unix_path"
25788  fi
25789
25790
25791    new_path=`$WHICH "$new_path" 2> /dev/null`
25792
25793    if test "x$new_path" = x; then
25794      # It's still not found. Now this is an unrecoverable error.
25795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25796$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25797      has_space=`$ECHO "$complete" | $GREP " "`
25798      if test "x$has_space" != x; then
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25801      fi
25802      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25803    fi
25804  fi
25805
25806  # Now new_path has a complete unix path to the binary
25807  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25808    # Keep paths in /bin as-is, but remove trailing .exe if any
25809    new_path="${new_path/%.exe/}"
25810    # Do not save /bin paths to all_fixpath_prefixes!
25811  else
25812    # Not in mixed or Windows style, start by that.
25813    new_path=`cmd //c echo $new_path`
25814
25815  input_path="$new_path"
25816  # Check if we need to convert this using DOS-style short mode. If the path
25817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25818  # take no chances and rewrite it.
25819  # Note: m4 eats our [], so we need to use [ and ] instead.
25820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25821  if test "x$has_forbidden_chars" != x; then
25822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25824  fi
25825
25826    # Output is in $new_path
25827
25828  windows_path="$new_path"
25829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25830    unix_path=`$CYGPATH -u "$windows_path"`
25831    new_path="$unix_path"
25832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25834    new_path="$unix_path"
25835  fi
25836
25837    # remove trailing .exe if any
25838    new_path="${new_path/%.exe/}"
25839
25840    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25841    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25842  fi
25843
25844  else
25845    # We're on a posix platform. Hooray! :)
25846    # First separate the path from the arguments. This will split at the first
25847    # space.
25848    complete="$NM"
25849    path="${complete%% *}"
25850    tmp="$complete EOL"
25851    arguments="${tmp#* }"
25852
25853    # Cannot rely on the command "which" here since it doesn't always work.
25854    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25855    if test -z "$is_absolute_path"; then
25856      # Path to executable is not absolute. Find it.
25857      IFS_save="$IFS"
25858      IFS=:
25859      for p in $PATH; do
25860        if test -f "$p/$path" && test -x "$p/$path"; then
25861          new_path="$p/$path"
25862          break
25863        fi
25864      done
25865      IFS="$IFS_save"
25866    else
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25868$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25869      new_path="$path"
25870    fi
25871
25872    if test "x$new_path" = x; then
25873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25874$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25875        has_space=`$ECHO "$complete" | $GREP " "`
25876        if test "x$has_space" != x; then
25877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25879        fi
25880        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25881      fi
25882  fi
25883
25884      # Now join together the path and the arguments once again
25885      if test "x$arguments" != xEOL; then
25886        new_complete="$new_path ${arguments% *}"
25887      else
25888        new_complete="$new_path"
25889      fi
25890
25891  if test "x$complete" != "x$new_complete"; then
25892      NM="$new_complete"
25893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25894$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25895    fi
25896
25897    if test -n "$ac_tool_prefix"; then
25898  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25899set dummy ${ac_tool_prefix}strip; ac_word=$2
25900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25901$as_echo_n "checking for $ac_word... " >&6; }
25902if test "${ac_cv_prog_STRIP+set}" = set; then :
25903  $as_echo_n "(cached) " >&6
25904else
25905  if test -n "$STRIP"; then
25906  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25907else
25908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25909for as_dir in $PATH
25910do
25911  IFS=$as_save_IFS
25912  test -z "$as_dir" && as_dir=.
25913    for ac_exec_ext in '' $ac_executable_extensions; do
25914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25915    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25917    break 2
25918  fi
25919done
25920  done
25921IFS=$as_save_IFS
25922
25923fi
25924fi
25925STRIP=$ac_cv_prog_STRIP
25926if test -n "$STRIP"; then
25927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25928$as_echo "$STRIP" >&6; }
25929else
25930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25931$as_echo "no" >&6; }
25932fi
25933
25934
25935fi
25936if test -z "$ac_cv_prog_STRIP"; then
25937  ac_ct_STRIP=$STRIP
25938  # Extract the first word of "strip", so it can be a program name with args.
25939set dummy strip; ac_word=$2
25940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25941$as_echo_n "checking for $ac_word... " >&6; }
25942if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25943  $as_echo_n "(cached) " >&6
25944else
25945  if test -n "$ac_ct_STRIP"; then
25946  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25947else
25948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25949for as_dir in $PATH
25950do
25951  IFS=$as_save_IFS
25952  test -z "$as_dir" && as_dir=.
25953    for ac_exec_ext in '' $ac_executable_extensions; do
25954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25955    ac_cv_prog_ac_ct_STRIP="strip"
25956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25957    break 2
25958  fi
25959done
25960  done
25961IFS=$as_save_IFS
25962
25963fi
25964fi
25965ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25966if test -n "$ac_ct_STRIP"; then
25967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25968$as_echo "$ac_ct_STRIP" >&6; }
25969else
25970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25971$as_echo "no" >&6; }
25972fi
25973
25974  if test "x$ac_ct_STRIP" = x; then
25975    STRIP=""
25976  else
25977    case $cross_compiling:$ac_tool_warned in
25978yes:)
25979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25981ac_tool_warned=yes ;;
25982esac
25983    STRIP=$ac_ct_STRIP
25984  fi
25985else
25986  STRIP="$ac_cv_prog_STRIP"
25987fi
25988
25989
25990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25991
25992  # First separate the path from the arguments. This will split at the first
25993  # space.
25994  complete="$STRIP"
25995  path="${complete%% *}"
25996  tmp="$complete EOL"
25997  arguments="${tmp#* }"
25998
25999  # Input might be given as Windows format, start by converting to
26000  # unix format.
26001  new_path=`$CYGPATH -u "$path"`
26002
26003  # Now try to locate executable using which
26004  new_path=`$WHICH "$new_path" 2> /dev/null`
26005  # bat and cmd files are not always considered executable in cygwin causing which
26006  # to not find them
26007  if test "x$new_path" = x \
26008           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26009           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26010    new_path=`$CYGPATH -u "$path"`
26011  fi
26012  if test "x$new_path" = x; then
26013    # Oops. Which didn't find the executable.
26014    # The splitting of arguments from the executable at a space might have been incorrect,
26015    # since paths with space are more likely in Windows. Give it another try with the whole
26016    # argument.
26017    path="$complete"
26018    arguments="EOL"
26019    new_path=`$CYGPATH -u "$path"`
26020    new_path=`$WHICH "$new_path" 2> /dev/null`
26021    # bat and cmd files are not always considered executable in cygwin causing which
26022    # to not find them
26023    if test "x$new_path" = x \
26024             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26025             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26026      new_path=`$CYGPATH -u "$path"`
26027    fi
26028    if test "x$new_path" = x; then
26029      # It's still not found. Now this is an unrecoverable error.
26030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26031$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26032      has_space=`$ECHO "$complete" | $GREP " "`
26033      if test "x$has_space" != x; then
26034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26036      fi
26037      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26038    fi
26039  fi
26040
26041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26044  # "foo.exe" is OK but "foo" is an error.
26045  #
26046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26047  # It is also a way to make sure we got the proper file name for the real test later on.
26048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26049  if test "x$test_shortpath" = x; then
26050    # Short path failed, file does not exist as specified.
26051    # Try adding .exe or .cmd
26052    if test -f "${new_path}.exe"; then
26053       input_to_shortpath="${new_path}.exe"
26054    elif test -f "${new_path}.cmd"; then
26055       input_to_shortpath="${new_path}.cmd"
26056    else
26057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26058$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26059      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26060$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26061      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26062    fi
26063  else
26064    input_to_shortpath="$new_path"
26065  fi
26066
26067  # Call helper function which possibly converts this using DOS-style short mode.
26068  # If so, the updated path is stored in $new_path.
26069  new_path="$input_to_shortpath"
26070
26071  input_path="$input_to_shortpath"
26072  # Check if we need to convert this using DOS-style short mode. If the path
26073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26074  # take no chances and rewrite it.
26075  # Note: m4 eats our [], so we need to use [ and ] instead.
26076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26077  if test "x$has_forbidden_chars" != x; then
26078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26082      # Going to short mode and back again did indeed matter. Since short mode is
26083      # case insensitive, let's make it lowercase to improve readability.
26084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26085      # Now convert it back to Unix-stile (cygpath)
26086      input_path=`$CYGPATH -u "$shortmode_path"`
26087      new_path="$input_path"
26088    fi
26089  fi
26090
26091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26092  if test "x$test_cygdrive_prefix" = x; then
26093    # As a simple fix, exclude /usr/bin since it's not a real path.
26094    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26096      # a path prefixed by /cygdrive for fixpath to work.
26097      new_path="$CYGWIN_ROOT_PATH$input_path"
26098    fi
26099  fi
26100
26101  # remove trailing .exe if any
26102  new_path="${new_path/%.exe/}"
26103
26104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26105
26106  # First separate the path from the arguments. This will split at the first
26107  # space.
26108  complete="$STRIP"
26109  path="${complete%% *}"
26110  tmp="$complete EOL"
26111  arguments="${tmp#* }"
26112
26113  # Input might be given as Windows format, start by converting to
26114  # unix format.
26115  new_path="$path"
26116
26117  windows_path="$new_path"
26118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26119    unix_path=`$CYGPATH -u "$windows_path"`
26120    new_path="$unix_path"
26121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26123    new_path="$unix_path"
26124  fi
26125
26126
26127  # Now try to locate executable using which
26128  new_path=`$WHICH "$new_path" 2> /dev/null`
26129
26130  if test "x$new_path" = x; then
26131    # Oops. Which didn't find the executable.
26132    # The splitting of arguments from the executable at a space might have been incorrect,
26133    # since paths with space are more likely in Windows. Give it another try with the whole
26134    # argument.
26135    path="$complete"
26136    arguments="EOL"
26137    new_path="$path"
26138
26139  windows_path="$new_path"
26140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26141    unix_path=`$CYGPATH -u "$windows_path"`
26142    new_path="$unix_path"
26143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26145    new_path="$unix_path"
26146  fi
26147
26148
26149    new_path=`$WHICH "$new_path" 2> /dev/null`
26150
26151    if test "x$new_path" = x; then
26152      # It's still not found. Now this is an unrecoverable error.
26153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26154$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26155      has_space=`$ECHO "$complete" | $GREP " "`
26156      if test "x$has_space" != x; then
26157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26159      fi
26160      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26161    fi
26162  fi
26163
26164  # Now new_path has a complete unix path to the binary
26165  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26166    # Keep paths in /bin as-is, but remove trailing .exe if any
26167    new_path="${new_path/%.exe/}"
26168    # Do not save /bin paths to all_fixpath_prefixes!
26169  else
26170    # Not in mixed or Windows style, start by that.
26171    new_path=`cmd //c echo $new_path`
26172
26173  input_path="$new_path"
26174  # Check if we need to convert this using DOS-style short mode. If the path
26175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26176  # take no chances and rewrite it.
26177  # Note: m4 eats our [], so we need to use [ and ] instead.
26178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26179  if test "x$has_forbidden_chars" != x; then
26180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26182  fi
26183
26184    # Output is in $new_path
26185
26186  windows_path="$new_path"
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188    unix_path=`$CYGPATH -u "$windows_path"`
26189    new_path="$unix_path"
26190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26192    new_path="$unix_path"
26193  fi
26194
26195    # remove trailing .exe if any
26196    new_path="${new_path/%.exe/}"
26197
26198    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26199    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26200  fi
26201
26202  else
26203    # We're on a posix platform. Hooray! :)
26204    # First separate the path from the arguments. This will split at the first
26205    # space.
26206    complete="$STRIP"
26207    path="${complete%% *}"
26208    tmp="$complete EOL"
26209    arguments="${tmp#* }"
26210
26211    # Cannot rely on the command "which" here since it doesn't always work.
26212    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26213    if test -z "$is_absolute_path"; then
26214      # Path to executable is not absolute. Find it.
26215      IFS_save="$IFS"
26216      IFS=:
26217      for p in $PATH; do
26218        if test -f "$p/$path" && test -x "$p/$path"; then
26219          new_path="$p/$path"
26220          break
26221        fi
26222      done
26223      IFS="$IFS_save"
26224    else
26225      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26226$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26227      new_path="$path"
26228    fi
26229
26230    if test "x$new_path" = x; then
26231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26232$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26233        has_space=`$ECHO "$complete" | $GREP " "`
26234        if test "x$has_space" != x; then
26235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26237        fi
26238        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26239      fi
26240  fi
26241
26242      # Now join together the path and the arguments once again
26243      if test "x$arguments" != xEOL; then
26244        new_complete="$new_path ${arguments% *}"
26245      else
26246        new_complete="$new_path"
26247      fi
26248
26249  if test "x$complete" != "x$new_complete"; then
26250      STRIP="$new_complete"
26251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26252$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26253    fi
26254
26255fi
26256
26257# objcopy is used for moving debug symbols to separate files when
26258# full debug symbols are enabled.
26259if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26260    if test -n "$ac_tool_prefix"; then
26261  for ac_prog in gobjcopy objcopy
26262  do
26263    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26264set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26266$as_echo_n "checking for $ac_word... " >&6; }
26267if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26268  $as_echo_n "(cached) " >&6
26269else
26270  if test -n "$OBJCOPY"; then
26271  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26272else
26273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26274for as_dir in $PATH
26275do
26276  IFS=$as_save_IFS
26277  test -z "$as_dir" && as_dir=.
26278    for ac_exec_ext in '' $ac_executable_extensions; do
26279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26280    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26282    break 2
26283  fi
26284done
26285  done
26286IFS=$as_save_IFS
26287
26288fi
26289fi
26290OBJCOPY=$ac_cv_prog_OBJCOPY
26291if test -n "$OBJCOPY"; then
26292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26293$as_echo "$OBJCOPY" >&6; }
26294else
26295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26296$as_echo "no" >&6; }
26297fi
26298
26299
26300    test -n "$OBJCOPY" && break
26301  done
26302fi
26303if test -z "$OBJCOPY"; then
26304  ac_ct_OBJCOPY=$OBJCOPY
26305  for ac_prog in gobjcopy objcopy
26306do
26307  # Extract the first word of "$ac_prog", so it can be a program name with args.
26308set dummy $ac_prog; ac_word=$2
26309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26310$as_echo_n "checking for $ac_word... " >&6; }
26311if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26312  $as_echo_n "(cached) " >&6
26313else
26314  if test -n "$ac_ct_OBJCOPY"; then
26315  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26316else
26317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26318for as_dir in $PATH
26319do
26320  IFS=$as_save_IFS
26321  test -z "$as_dir" && as_dir=.
26322    for ac_exec_ext in '' $ac_executable_extensions; do
26323  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26324    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26326    break 2
26327  fi
26328done
26329  done
26330IFS=$as_save_IFS
26331
26332fi
26333fi
26334ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26335if test -n "$ac_ct_OBJCOPY"; then
26336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26337$as_echo "$ac_ct_OBJCOPY" >&6; }
26338else
26339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26340$as_echo "no" >&6; }
26341fi
26342
26343
26344  test -n "$ac_ct_OBJCOPY" && break
26345done
26346
26347  if test "x$ac_ct_OBJCOPY" = x; then
26348    OBJCOPY=""
26349  else
26350    case $cross_compiling:$ac_tool_warned in
26351yes:)
26352{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26353$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26354ac_tool_warned=yes ;;
26355esac
26356    OBJCOPY=$ac_ct_OBJCOPY
26357  fi
26358fi
26359
26360    # Only call fixup if objcopy was found.
26361    if test -n "$OBJCOPY"; then
26362
26363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26364
26365  # First separate the path from the arguments. This will split at the first
26366  # space.
26367  complete="$OBJCOPY"
26368  path="${complete%% *}"
26369  tmp="$complete EOL"
26370  arguments="${tmp#* }"
26371
26372  # Input might be given as Windows format, start by converting to
26373  # unix format.
26374  new_path=`$CYGPATH -u "$path"`
26375
26376  # Now try to locate executable using which
26377  new_path=`$WHICH "$new_path" 2> /dev/null`
26378  # bat and cmd files are not always considered executable in cygwin causing which
26379  # to not find them
26380  if test "x$new_path" = x \
26381           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26382           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26383    new_path=`$CYGPATH -u "$path"`
26384  fi
26385  if test "x$new_path" = x; then
26386    # Oops. Which didn't find the executable.
26387    # The splitting of arguments from the executable at a space might have been incorrect,
26388    # since paths with space are more likely in Windows. Give it another try with the whole
26389    # argument.
26390    path="$complete"
26391    arguments="EOL"
26392    new_path=`$CYGPATH -u "$path"`
26393    new_path=`$WHICH "$new_path" 2> /dev/null`
26394    # bat and cmd files are not always considered executable in cygwin causing which
26395    # to not find them
26396    if test "x$new_path" = x \
26397             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26398             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26399      new_path=`$CYGPATH -u "$path"`
26400    fi
26401    if test "x$new_path" = x; then
26402      # It's still not found. Now this is an unrecoverable error.
26403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26404$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26405      has_space=`$ECHO "$complete" | $GREP " "`
26406      if test "x$has_space" != x; then
26407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26409      fi
26410      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26411    fi
26412  fi
26413
26414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26417  # "foo.exe" is OK but "foo" is an error.
26418  #
26419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26420  # It is also a way to make sure we got the proper file name for the real test later on.
26421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26422  if test "x$test_shortpath" = x; then
26423    # Short path failed, file does not exist as specified.
26424    # Try adding .exe or .cmd
26425    if test -f "${new_path}.exe"; then
26426       input_to_shortpath="${new_path}.exe"
26427    elif test -f "${new_path}.cmd"; then
26428       input_to_shortpath="${new_path}.cmd"
26429    else
26430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26431$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26434      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26435    fi
26436  else
26437    input_to_shortpath="$new_path"
26438  fi
26439
26440  # Call helper function which possibly converts this using DOS-style short mode.
26441  # If so, the updated path is stored in $new_path.
26442  new_path="$input_to_shortpath"
26443
26444  input_path="$input_to_shortpath"
26445  # Check if we need to convert this using DOS-style short mode. If the path
26446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26447  # take no chances and rewrite it.
26448  # Note: m4 eats our [], so we need to use [ and ] instead.
26449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26450  if test "x$has_forbidden_chars" != x; then
26451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26455      # Going to short mode and back again did indeed matter. Since short mode is
26456      # case insensitive, let's make it lowercase to improve readability.
26457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26458      # Now convert it back to Unix-stile (cygpath)
26459      input_path=`$CYGPATH -u "$shortmode_path"`
26460      new_path="$input_path"
26461    fi
26462  fi
26463
26464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26465  if test "x$test_cygdrive_prefix" = x; then
26466    # As a simple fix, exclude /usr/bin since it's not a real path.
26467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26469      # a path prefixed by /cygdrive for fixpath to work.
26470      new_path="$CYGWIN_ROOT_PATH$input_path"
26471    fi
26472  fi
26473
26474  # remove trailing .exe if any
26475  new_path="${new_path/%.exe/}"
26476
26477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26478
26479  # First separate the path from the arguments. This will split at the first
26480  # space.
26481  complete="$OBJCOPY"
26482  path="${complete%% *}"
26483  tmp="$complete EOL"
26484  arguments="${tmp#* }"
26485
26486  # Input might be given as Windows format, start by converting to
26487  # unix format.
26488  new_path="$path"
26489
26490  windows_path="$new_path"
26491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26492    unix_path=`$CYGPATH -u "$windows_path"`
26493    new_path="$unix_path"
26494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26496    new_path="$unix_path"
26497  fi
26498
26499
26500  # Now try to locate executable using which
26501  new_path=`$WHICH "$new_path" 2> /dev/null`
26502
26503  if test "x$new_path" = x; then
26504    # Oops. Which didn't find the executable.
26505    # The splitting of arguments from the executable at a space might have been incorrect,
26506    # since paths with space are more likely in Windows. Give it another try with the whole
26507    # argument.
26508    path="$complete"
26509    arguments="EOL"
26510    new_path="$path"
26511
26512  windows_path="$new_path"
26513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26514    unix_path=`$CYGPATH -u "$windows_path"`
26515    new_path="$unix_path"
26516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26518    new_path="$unix_path"
26519  fi
26520
26521
26522    new_path=`$WHICH "$new_path" 2> /dev/null`
26523
26524    if test "x$new_path" = x; then
26525      # It's still not found. Now this is an unrecoverable error.
26526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26527$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26528      has_space=`$ECHO "$complete" | $GREP " "`
26529      if test "x$has_space" != x; then
26530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26532      fi
26533      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26534    fi
26535  fi
26536
26537  # Now new_path has a complete unix path to the binary
26538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26539    # Keep paths in /bin as-is, but remove trailing .exe if any
26540    new_path="${new_path/%.exe/}"
26541    # Do not save /bin paths to all_fixpath_prefixes!
26542  else
26543    # Not in mixed or Windows style, start by that.
26544    new_path=`cmd //c echo $new_path`
26545
26546  input_path="$new_path"
26547  # Check if we need to convert this using DOS-style short mode. If the path
26548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26549  # take no chances and rewrite it.
26550  # Note: m4 eats our [], so we need to use [ and ] instead.
26551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26552  if test "x$has_forbidden_chars" != x; then
26553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26555  fi
26556
26557    # Output is in $new_path
26558
26559  windows_path="$new_path"
26560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26561    unix_path=`$CYGPATH -u "$windows_path"`
26562    new_path="$unix_path"
26563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26565    new_path="$unix_path"
26566  fi
26567
26568    # remove trailing .exe if any
26569    new_path="${new_path/%.exe/}"
26570
26571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26573  fi
26574
26575  else
26576    # We're on a posix platform. Hooray! :)
26577    # First separate the path from the arguments. This will split at the first
26578    # space.
26579    complete="$OBJCOPY"
26580    path="${complete%% *}"
26581    tmp="$complete EOL"
26582    arguments="${tmp#* }"
26583
26584    # Cannot rely on the command "which" here since it doesn't always work.
26585    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26586    if test -z "$is_absolute_path"; then
26587      # Path to executable is not absolute. Find it.
26588      IFS_save="$IFS"
26589      IFS=:
26590      for p in $PATH; do
26591        if test -f "$p/$path" && test -x "$p/$path"; then
26592          new_path="$p/$path"
26593          break
26594        fi
26595      done
26596      IFS="$IFS_save"
26597    else
26598      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26599$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26600      new_path="$path"
26601    fi
26602
26603    if test "x$new_path" = x; then
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26605$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26606        has_space=`$ECHO "$complete" | $GREP " "`
26607        if test "x$has_space" != x; then
26608          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26609$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26610        fi
26611        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26612      fi
26613  fi
26614
26615      # Now join together the path and the arguments once again
26616      if test "x$arguments" != xEOL; then
26617        new_complete="$new_path ${arguments% *}"
26618      else
26619        new_complete="$new_path"
26620      fi
26621
26622  if test "x$complete" != "x$new_complete"; then
26623      OBJCOPY="$new_complete"
26624      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26625$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26626    fi
26627
26628    fi
26629fi
26630
26631if test -n "$ac_tool_prefix"; then
26632  for ac_prog in gobjdump objdump
26633  do
26634    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26635set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26637$as_echo_n "checking for $ac_word... " >&6; }
26638if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26639  $as_echo_n "(cached) " >&6
26640else
26641  if test -n "$OBJDUMP"; then
26642  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26643else
26644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26645for as_dir in $PATH
26646do
26647  IFS=$as_save_IFS
26648  test -z "$as_dir" && as_dir=.
26649    for ac_exec_ext in '' $ac_executable_extensions; do
26650  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26651    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26653    break 2
26654  fi
26655done
26656  done
26657IFS=$as_save_IFS
26658
26659fi
26660fi
26661OBJDUMP=$ac_cv_prog_OBJDUMP
26662if test -n "$OBJDUMP"; then
26663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26664$as_echo "$OBJDUMP" >&6; }
26665else
26666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26667$as_echo "no" >&6; }
26668fi
26669
26670
26671    test -n "$OBJDUMP" && break
26672  done
26673fi
26674if test -z "$OBJDUMP"; then
26675  ac_ct_OBJDUMP=$OBJDUMP
26676  for ac_prog in gobjdump objdump
26677do
26678  # Extract the first word of "$ac_prog", so it can be a program name with args.
26679set dummy $ac_prog; ac_word=$2
26680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26681$as_echo_n "checking for $ac_word... " >&6; }
26682if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26683  $as_echo_n "(cached) " >&6
26684else
26685  if test -n "$ac_ct_OBJDUMP"; then
26686  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26687else
26688as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26689for as_dir in $PATH
26690do
26691  IFS=$as_save_IFS
26692  test -z "$as_dir" && as_dir=.
26693    for ac_exec_ext in '' $ac_executable_extensions; do
26694  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26695    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26697    break 2
26698  fi
26699done
26700  done
26701IFS=$as_save_IFS
26702
26703fi
26704fi
26705ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26706if test -n "$ac_ct_OBJDUMP"; then
26707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26708$as_echo "$ac_ct_OBJDUMP" >&6; }
26709else
26710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26711$as_echo "no" >&6; }
26712fi
26713
26714
26715  test -n "$ac_ct_OBJDUMP" && break
26716done
26717
26718  if test "x$ac_ct_OBJDUMP" = x; then
26719    OBJDUMP=""
26720  else
26721    case $cross_compiling:$ac_tool_warned in
26722yes:)
26723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26725ac_tool_warned=yes ;;
26726esac
26727    OBJDUMP=$ac_ct_OBJDUMP
26728  fi
26729fi
26730
26731if test "x$OBJDUMP" != x; then
26732  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26733
26734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735
26736  # First separate the path from the arguments. This will split at the first
26737  # space.
26738  complete="$OBJDUMP"
26739  path="${complete%% *}"
26740  tmp="$complete EOL"
26741  arguments="${tmp#* }"
26742
26743  # Input might be given as Windows format, start by converting to
26744  # unix format.
26745  new_path=`$CYGPATH -u "$path"`
26746
26747  # Now try to locate executable using which
26748  new_path=`$WHICH "$new_path" 2> /dev/null`
26749  # bat and cmd files are not always considered executable in cygwin causing which
26750  # to not find them
26751  if test "x$new_path" = x \
26752           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26753           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26754    new_path=`$CYGPATH -u "$path"`
26755  fi
26756  if test "x$new_path" = x; then
26757    # Oops. Which didn't find the executable.
26758    # The splitting of arguments from the executable at a space might have been incorrect,
26759    # since paths with space are more likely in Windows. Give it another try with the whole
26760    # argument.
26761    path="$complete"
26762    arguments="EOL"
26763    new_path=`$CYGPATH -u "$path"`
26764    new_path=`$WHICH "$new_path" 2> /dev/null`
26765    # bat and cmd files are not always considered executable in cygwin causing which
26766    # to not find them
26767    if test "x$new_path" = x \
26768             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26769             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26770      new_path=`$CYGPATH -u "$path"`
26771    fi
26772    if test "x$new_path" = x; then
26773      # It's still not found. Now this is an unrecoverable error.
26774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26775$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26776      has_space=`$ECHO "$complete" | $GREP " "`
26777      if test "x$has_space" != x; then
26778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26780      fi
26781      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26782    fi
26783  fi
26784
26785  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26786  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26787  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26788  # "foo.exe" is OK but "foo" is an error.
26789  #
26790  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26791  # It is also a way to make sure we got the proper file name for the real test later on.
26792  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26793  if test "x$test_shortpath" = x; then
26794    # Short path failed, file does not exist as specified.
26795    # Try adding .exe or .cmd
26796    if test -f "${new_path}.exe"; then
26797       input_to_shortpath="${new_path}.exe"
26798    elif test -f "${new_path}.cmd"; then
26799       input_to_shortpath="${new_path}.cmd"
26800    else
26801      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26802$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26803      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26804$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26805      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26806    fi
26807  else
26808    input_to_shortpath="$new_path"
26809  fi
26810
26811  # Call helper function which possibly converts this using DOS-style short mode.
26812  # If so, the updated path is stored in $new_path.
26813  new_path="$input_to_shortpath"
26814
26815  input_path="$input_to_shortpath"
26816  # Check if we need to convert this using DOS-style short mode. If the path
26817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26818  # take no chances and rewrite it.
26819  # Note: m4 eats our [], so we need to use [ and ] instead.
26820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26821  if test "x$has_forbidden_chars" != x; then
26822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26826      # Going to short mode and back again did indeed matter. Since short mode is
26827      # case insensitive, let's make it lowercase to improve readability.
26828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26829      # Now convert it back to Unix-stile (cygpath)
26830      input_path=`$CYGPATH -u "$shortmode_path"`
26831      new_path="$input_path"
26832    fi
26833  fi
26834
26835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26836  if test "x$test_cygdrive_prefix" = x; then
26837    # As a simple fix, exclude /usr/bin since it's not a real path.
26838    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26840      # a path prefixed by /cygdrive for fixpath to work.
26841      new_path="$CYGWIN_ROOT_PATH$input_path"
26842    fi
26843  fi
26844
26845  # remove trailing .exe if any
26846  new_path="${new_path/%.exe/}"
26847
26848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26849
26850  # First separate the path from the arguments. This will split at the first
26851  # space.
26852  complete="$OBJDUMP"
26853  path="${complete%% *}"
26854  tmp="$complete EOL"
26855  arguments="${tmp#* }"
26856
26857  # Input might be given as Windows format, start by converting to
26858  # unix format.
26859  new_path="$path"
26860
26861  windows_path="$new_path"
26862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26863    unix_path=`$CYGPATH -u "$windows_path"`
26864    new_path="$unix_path"
26865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26867    new_path="$unix_path"
26868  fi
26869
26870
26871  # Now try to locate executable using which
26872  new_path=`$WHICH "$new_path" 2> /dev/null`
26873
26874  if test "x$new_path" = x; then
26875    # Oops. Which didn't find the executable.
26876    # The splitting of arguments from the executable at a space might have been incorrect,
26877    # since paths with space are more likely in Windows. Give it another try with the whole
26878    # argument.
26879    path="$complete"
26880    arguments="EOL"
26881    new_path="$path"
26882
26883  windows_path="$new_path"
26884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26885    unix_path=`$CYGPATH -u "$windows_path"`
26886    new_path="$unix_path"
26887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26889    new_path="$unix_path"
26890  fi
26891
26892
26893    new_path=`$WHICH "$new_path" 2> /dev/null`
26894
26895    if test "x$new_path" = x; then
26896      # It's still not found. Now this is an unrecoverable error.
26897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26898$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26899      has_space=`$ECHO "$complete" | $GREP " "`
26900      if test "x$has_space" != x; then
26901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26903      fi
26904      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26905    fi
26906  fi
26907
26908  # Now new_path has a complete unix path to the binary
26909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26910    # Keep paths in /bin as-is, but remove trailing .exe if any
26911    new_path="${new_path/%.exe/}"
26912    # Do not save /bin paths to all_fixpath_prefixes!
26913  else
26914    # Not in mixed or Windows style, start by that.
26915    new_path=`cmd //c echo $new_path`
26916
26917  input_path="$new_path"
26918  # Check if we need to convert this using DOS-style short mode. If the path
26919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26920  # take no chances and rewrite it.
26921  # Note: m4 eats our [], so we need to use [ and ] instead.
26922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26923  if test "x$has_forbidden_chars" != x; then
26924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26926  fi
26927
26928    # Output is in $new_path
26929
26930  windows_path="$new_path"
26931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26932    unix_path=`$CYGPATH -u "$windows_path"`
26933    new_path="$unix_path"
26934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26936    new_path="$unix_path"
26937  fi
26938
26939    # remove trailing .exe if any
26940    new_path="${new_path/%.exe/}"
26941
26942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26944  fi
26945
26946  else
26947    # We're on a posix platform. Hooray! :)
26948    # First separate the path from the arguments. This will split at the first
26949    # space.
26950    complete="$OBJDUMP"
26951    path="${complete%% *}"
26952    tmp="$complete EOL"
26953    arguments="${tmp#* }"
26954
26955    # Cannot rely on the command "which" here since it doesn't always work.
26956    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26957    if test -z "$is_absolute_path"; then
26958      # Path to executable is not absolute. Find it.
26959      IFS_save="$IFS"
26960      IFS=:
26961      for p in $PATH; do
26962        if test -f "$p/$path" && test -x "$p/$path"; then
26963          new_path="$p/$path"
26964          break
26965        fi
26966      done
26967      IFS="$IFS_save"
26968    else
26969      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26970$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26971      new_path="$path"
26972    fi
26973
26974    if test "x$new_path" = x; then
26975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26976$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26977        has_space=`$ECHO "$complete" | $GREP " "`
26978        if test "x$has_space" != x; then
26979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26981        fi
26982        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26983      fi
26984  fi
26985
26986      # Now join together the path and the arguments once again
26987      if test "x$arguments" != xEOL; then
26988        new_complete="$new_path ${arguments% *}"
26989      else
26990        new_complete="$new_path"
26991      fi
26992
26993  if test "x$complete" != "x$new_complete"; then
26994      OBJDUMP="$new_complete"
26995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26996$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26997    fi
26998
26999fi
27000
27001if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27002   # Extract the first word of "lipo", so it can be a program name with args.
27003set dummy lipo; ac_word=$2
27004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27005$as_echo_n "checking for $ac_word... " >&6; }
27006if test "${ac_cv_path_LIPO+set}" = set; then :
27007  $as_echo_n "(cached) " >&6
27008else
27009  case $LIPO in
27010  [\\/]* | ?:[\\/]*)
27011  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27012  ;;
27013  *)
27014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27015for as_dir in $PATH
27016do
27017  IFS=$as_save_IFS
27018  test -z "$as_dir" && as_dir=.
27019    for ac_exec_ext in '' $ac_executable_extensions; do
27020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27021    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27023    break 2
27024  fi
27025done
27026  done
27027IFS=$as_save_IFS
27028
27029  ;;
27030esac
27031fi
27032LIPO=$ac_cv_path_LIPO
27033if test -n "$LIPO"; then
27034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27035$as_echo "$LIPO" >&6; }
27036else
27037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27038$as_echo "no" >&6; }
27039fi
27040
27041
27042
27043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27044
27045  # First separate the path from the arguments. This will split at the first
27046  # space.
27047  complete="$LIPO"
27048  path="${complete%% *}"
27049  tmp="$complete EOL"
27050  arguments="${tmp#* }"
27051
27052  # Input might be given as Windows format, start by converting to
27053  # unix format.
27054  new_path=`$CYGPATH -u "$path"`
27055
27056  # Now try to locate executable using which
27057  new_path=`$WHICH "$new_path" 2> /dev/null`
27058  # bat and cmd files are not always considered executable in cygwin causing which
27059  # to not find them
27060  if test "x$new_path" = x \
27061           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27062           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27063    new_path=`$CYGPATH -u "$path"`
27064  fi
27065  if test "x$new_path" = x; then
27066    # Oops. Which didn't find the executable.
27067    # The splitting of arguments from the executable at a space might have been incorrect,
27068    # since paths with space are more likely in Windows. Give it another try with the whole
27069    # argument.
27070    path="$complete"
27071    arguments="EOL"
27072    new_path=`$CYGPATH -u "$path"`
27073    new_path=`$WHICH "$new_path" 2> /dev/null`
27074    # bat and cmd files are not always considered executable in cygwin causing which
27075    # to not find them
27076    if test "x$new_path" = x \
27077             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27078             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27079      new_path=`$CYGPATH -u "$path"`
27080    fi
27081    if test "x$new_path" = x; then
27082      # It's still not found. Now this is an unrecoverable error.
27083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27084$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27085      has_space=`$ECHO "$complete" | $GREP " "`
27086      if test "x$has_space" != x; then
27087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27089      fi
27090      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27091    fi
27092  fi
27093
27094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27097  # "foo.exe" is OK but "foo" is an error.
27098  #
27099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27100  # It is also a way to make sure we got the proper file name for the real test later on.
27101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27102  if test "x$test_shortpath" = x; then
27103    # Short path failed, file does not exist as specified.
27104    # Try adding .exe or .cmd
27105    if test -f "${new_path}.exe"; then
27106       input_to_shortpath="${new_path}.exe"
27107    elif test -f "${new_path}.cmd"; then
27108       input_to_shortpath="${new_path}.cmd"
27109    else
27110      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27111$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27112      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27113$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27114      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27115    fi
27116  else
27117    input_to_shortpath="$new_path"
27118  fi
27119
27120  # Call helper function which possibly converts this using DOS-style short mode.
27121  # If so, the updated path is stored in $new_path.
27122  new_path="$input_to_shortpath"
27123
27124  input_path="$input_to_shortpath"
27125  # Check if we need to convert this using DOS-style short mode. If the path
27126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27127  # take no chances and rewrite it.
27128  # Note: m4 eats our [], so we need to use [ and ] instead.
27129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27130  if test "x$has_forbidden_chars" != x; then
27131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27135      # Going to short mode and back again did indeed matter. Since short mode is
27136      # case insensitive, let's make it lowercase to improve readability.
27137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27138      # Now convert it back to Unix-stile (cygpath)
27139      input_path=`$CYGPATH -u "$shortmode_path"`
27140      new_path="$input_path"
27141    fi
27142  fi
27143
27144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27145  if test "x$test_cygdrive_prefix" = x; then
27146    # As a simple fix, exclude /usr/bin since it's not a real path.
27147    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27149      # a path prefixed by /cygdrive for fixpath to work.
27150      new_path="$CYGWIN_ROOT_PATH$input_path"
27151    fi
27152  fi
27153
27154  # remove trailing .exe if any
27155  new_path="${new_path/%.exe/}"
27156
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158
27159  # First separate the path from the arguments. This will split at the first
27160  # space.
27161  complete="$LIPO"
27162  path="${complete%% *}"
27163  tmp="$complete EOL"
27164  arguments="${tmp#* }"
27165
27166  # Input might be given as Windows format, start by converting to
27167  # unix format.
27168  new_path="$path"
27169
27170  windows_path="$new_path"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    new_path="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    new_path="$unix_path"
27177  fi
27178
27179
27180  # Now try to locate executable using which
27181  new_path=`$WHICH "$new_path" 2> /dev/null`
27182
27183  if test "x$new_path" = x; then
27184    # Oops. Which didn't find the executable.
27185    # The splitting of arguments from the executable at a space might have been incorrect,
27186    # since paths with space are more likely in Windows. Give it another try with the whole
27187    # argument.
27188    path="$complete"
27189    arguments="EOL"
27190    new_path="$path"
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
27202    new_path=`$WHICH "$new_path" 2> /dev/null`
27203
27204    if test "x$new_path" = x; then
27205      # It's still not found. Now this is an unrecoverable error.
27206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27207$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27208      has_space=`$ECHO "$complete" | $GREP " "`
27209      if test "x$has_space" != x; then
27210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27212      fi
27213      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27214    fi
27215  fi
27216
27217  # Now new_path has a complete unix path to the binary
27218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27219    # Keep paths in /bin as-is, but remove trailing .exe if any
27220    new_path="${new_path/%.exe/}"
27221    # Do not save /bin paths to all_fixpath_prefixes!
27222  else
27223    # Not in mixed or Windows style, start by that.
27224    new_path=`cmd //c echo $new_path`
27225
27226  input_path="$new_path"
27227  # Check if we need to convert this using DOS-style short mode. If the path
27228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27229  # take no chances and rewrite it.
27230  # Note: m4 eats our [], so we need to use [ and ] instead.
27231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27232  if test "x$has_forbidden_chars" != x; then
27233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27235  fi
27236
27237    # Output is in $new_path
27238
27239  windows_path="$new_path"
27240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27241    unix_path=`$CYGPATH -u "$windows_path"`
27242    new_path="$unix_path"
27243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27245    new_path="$unix_path"
27246  fi
27247
27248    # remove trailing .exe if any
27249    new_path="${new_path/%.exe/}"
27250
27251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27253  fi
27254
27255  else
27256    # We're on a posix platform. Hooray! :)
27257    # First separate the path from the arguments. This will split at the first
27258    # space.
27259    complete="$LIPO"
27260    path="${complete%% *}"
27261    tmp="$complete EOL"
27262    arguments="${tmp#* }"
27263
27264    # Cannot rely on the command "which" here since it doesn't always work.
27265    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27266    if test -z "$is_absolute_path"; then
27267      # Path to executable is not absolute. Find it.
27268      IFS_save="$IFS"
27269      IFS=:
27270      for p in $PATH; do
27271        if test -f "$p/$path" && test -x "$p/$path"; then
27272          new_path="$p/$path"
27273          break
27274        fi
27275      done
27276      IFS="$IFS_save"
27277    else
27278      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27279$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27280      new_path="$path"
27281    fi
27282
27283    if test "x$new_path" = x; then
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27285$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27286        has_space=`$ECHO "$complete" | $GREP " "`
27287        if test "x$has_space" != x; then
27288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27290        fi
27291        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27292      fi
27293  fi
27294
27295      # Now join together the path and the arguments once again
27296      if test "x$arguments" != xEOL; then
27297        new_complete="$new_path ${arguments% *}"
27298      else
27299        new_complete="$new_path"
27300      fi
27301
27302  if test "x$complete" != "x$new_complete"; then
27303      LIPO="$new_complete"
27304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27305$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27306    fi
27307
27308fi
27309
27310# Restore old path without tools dir
27311PATH="$OLD_PATH"
27312
27313
27314# FIXME: Currently we must test this after paths but before flags. Fix!
27315
27316# And we can test some aspects on the target using configure macros.
27317
27318
27319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27320$as_echo_n "checking for ANSI C header files... " >&6; }
27321if test "${ac_cv_header_stdc+set}" = set; then :
27322  $as_echo_n "(cached) " >&6
27323else
27324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27325/* end confdefs.h.  */
27326#include <stdlib.h>
27327#include <stdarg.h>
27328#include <string.h>
27329#include <float.h>
27330
27331int
27332main ()
27333{
27334
27335  ;
27336  return 0;
27337}
27338_ACEOF
27339if ac_fn_cxx_try_compile "$LINENO"; then :
27340  ac_cv_header_stdc=yes
27341else
27342  ac_cv_header_stdc=no
27343fi
27344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27345
27346if test $ac_cv_header_stdc = yes; then
27347  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27349/* end confdefs.h.  */
27350#include <string.h>
27351
27352_ACEOF
27353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27354  $EGREP "memchr" >/dev/null 2>&1; then :
27355
27356else
27357  ac_cv_header_stdc=no
27358fi
27359rm -f conftest*
27360
27361fi
27362
27363if test $ac_cv_header_stdc = yes; then
27364  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27366/* end confdefs.h.  */
27367#include <stdlib.h>
27368
27369_ACEOF
27370if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27371  $EGREP "free" >/dev/null 2>&1; then :
27372
27373else
27374  ac_cv_header_stdc=no
27375fi
27376rm -f conftest*
27377
27378fi
27379
27380if test $ac_cv_header_stdc = yes; then
27381  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27382  if test "$cross_compiling" = yes; then :
27383  :
27384else
27385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27386/* end confdefs.h.  */
27387#include <ctype.h>
27388#include <stdlib.h>
27389#if ((' ' & 0x0FF) == 0x020)
27390# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27391# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27392#else
27393# define ISLOWER(c) \
27394		   (('a' <= (c) && (c) <= 'i') \
27395		     || ('j' <= (c) && (c) <= 'r') \
27396		     || ('s' <= (c) && (c) <= 'z'))
27397# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27398#endif
27399
27400#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27401int
27402main ()
27403{
27404  int i;
27405  for (i = 0; i < 256; i++)
27406    if (XOR (islower (i), ISLOWER (i))
27407	|| toupper (i) != TOUPPER (i))
27408      return 2;
27409  return 0;
27410}
27411_ACEOF
27412if ac_fn_cxx_try_run "$LINENO"; then :
27413
27414else
27415  ac_cv_header_stdc=no
27416fi
27417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27418  conftest.$ac_objext conftest.beam conftest.$ac_ext
27419fi
27420
27421fi
27422fi
27423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27424$as_echo "$ac_cv_header_stdc" >&6; }
27425if test $ac_cv_header_stdc = yes; then
27426
27427$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27428
27429fi
27430
27431# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27432for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27433		  inttypes.h stdint.h unistd.h
27434do :
27435  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27436ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27437"
27438if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27439  cat >>confdefs.h <<_ACEOF
27440#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27441_ACEOF
27442
27443fi
27444
27445done
27446
27447
27448
27449###############################################################################
27450#
27451# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27452# (The JVM can use 32 or 64 bit Java pointers but that decision
27453# is made at runtime.)
27454#
27455if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27456  # Always specify -m flags on Solaris
27457
27458  # keep track of c/cxx flags that we added outselves...
27459  #   to prevent emitting warning...
27460  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27461  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27462  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27463
27464  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27465  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27466  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27467
27468  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27469  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27470  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27471
27472elif test "x$COMPILE_TYPE" = xreduced; then
27473  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27474    # Specify -m if running reduced on other Posix platforms
27475
27476  # keep track of c/cxx flags that we added outselves...
27477  #   to prevent emitting warning...
27478  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27480  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27481
27482  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27483  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27484  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27485
27486  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27487  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27488  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27489
27490  fi
27491fi
27492
27493# Make compilation sanity check
27494for ac_header in stdio.h
27495do :
27496  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27497if test "x$ac_cv_header_stdio_h" = x""yes; then :
27498  cat >>confdefs.h <<_ACEOF
27499#define HAVE_STDIO_H 1
27500_ACEOF
27501
27502else
27503
27504  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27505$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27506  if test "x$COMPILE_TYPE" = xreduced; then
27507    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27508$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27509  elif test "x$COMPILE_TYPE" = xcross; then
27510    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27511$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27512  fi
27513  as_fn_error $? "Cannot continue." "$LINENO" 5
27514
27515fi
27516
27517done
27518
27519
27520# The cast to long int works around a bug in the HP C Compiler
27521# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27522# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27523# This bug is HP SR number 8606223364.
27524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27525$as_echo_n "checking size of int *... " >&6; }
27526if test "${ac_cv_sizeof_int_p+set}" = set; then :
27527  $as_echo_n "(cached) " >&6
27528else
27529  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27530
27531else
27532  if test "$ac_cv_type_int_p" = yes; then
27533     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27535as_fn_error 77 "cannot compute sizeof (int *)
27536See \`config.log' for more details" "$LINENO" 5 ; }
27537   else
27538     ac_cv_sizeof_int_p=0
27539   fi
27540fi
27541
27542fi
27543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27544$as_echo "$ac_cv_sizeof_int_p" >&6; }
27545
27546
27547
27548cat >>confdefs.h <<_ACEOF
27549#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27550_ACEOF
27551
27552
27553
27554if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27555  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27556  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27557fi
27558
27559if test "x$SIZEOF_INT_P" = x; then
27560    # The test failed, lets stick to the assumed value.
27561    { $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
27562$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27563else
27564    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27565
27566    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27567        as_fn_error $? "The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)" "$LINENO" 5
27568    fi
27569fi
27570
27571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27572$as_echo_n "checking for target address size... " >&6; }
27573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27574$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27575
27576
27577###############################################################################
27578#
27579# Is the target little of big endian?
27580#
27581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27582$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27583if test "${ac_cv_c_bigendian+set}" = set; then :
27584  $as_echo_n "(cached) " >&6
27585else
27586  ac_cv_c_bigendian=unknown
27587    # See if we're dealing with a universal compiler.
27588    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27589/* end confdefs.h.  */
27590#ifndef __APPLE_CC__
27591	       not a universal capable compiler
27592	     #endif
27593	     typedef int dummy;
27594
27595_ACEOF
27596if ac_fn_cxx_try_compile "$LINENO"; then :
27597
27598	# Check for potential -arch flags.  It is not universal unless
27599	# there are at least two -arch flags with different values.
27600	ac_arch=
27601	ac_prev=
27602	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27603	 if test -n "$ac_prev"; then
27604	   case $ac_word in
27605	     i?86 | x86_64 | ppc | ppc64)
27606	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27607		 ac_arch=$ac_word
27608	       else
27609		 ac_cv_c_bigendian=universal
27610		 break
27611	       fi
27612	       ;;
27613	   esac
27614	   ac_prev=
27615	 elif test "x$ac_word" = "x-arch"; then
27616	   ac_prev=arch
27617	 fi
27618       done
27619fi
27620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27621    if test $ac_cv_c_bigendian = unknown; then
27622      # See if sys/param.h defines the BYTE_ORDER macro.
27623      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27624/* end confdefs.h.  */
27625#include <sys/types.h>
27626	     #include <sys/param.h>
27627
27628int
27629main ()
27630{
27631#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27632		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27633		     && LITTLE_ENDIAN)
27634	      bogus endian macros
27635	     #endif
27636
27637  ;
27638  return 0;
27639}
27640_ACEOF
27641if ac_fn_cxx_try_compile "$LINENO"; then :
27642  # It does; now see whether it defined to BIG_ENDIAN or not.
27643	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27644/* end confdefs.h.  */
27645#include <sys/types.h>
27646		#include <sys/param.h>
27647
27648int
27649main ()
27650{
27651#if BYTE_ORDER != BIG_ENDIAN
27652		 not big endian
27653		#endif
27654
27655  ;
27656  return 0;
27657}
27658_ACEOF
27659if ac_fn_cxx_try_compile "$LINENO"; then :
27660  ac_cv_c_bigendian=yes
27661else
27662  ac_cv_c_bigendian=no
27663fi
27664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27665fi
27666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27667    fi
27668    if test $ac_cv_c_bigendian = unknown; then
27669      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27671/* end confdefs.h.  */
27672#include <limits.h>
27673
27674int
27675main ()
27676{
27677#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27678	      bogus endian macros
27679	     #endif
27680
27681  ;
27682  return 0;
27683}
27684_ACEOF
27685if ac_fn_cxx_try_compile "$LINENO"; then :
27686  # It does; now see whether it defined to _BIG_ENDIAN or not.
27687	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27688/* end confdefs.h.  */
27689#include <limits.h>
27690
27691int
27692main ()
27693{
27694#ifndef _BIG_ENDIAN
27695		 not big endian
27696		#endif
27697
27698  ;
27699  return 0;
27700}
27701_ACEOF
27702if ac_fn_cxx_try_compile "$LINENO"; then :
27703  ac_cv_c_bigendian=yes
27704else
27705  ac_cv_c_bigendian=no
27706fi
27707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27708fi
27709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27710    fi
27711    if test $ac_cv_c_bigendian = unknown; then
27712      # Compile a test program.
27713      if test "$cross_compiling" = yes; then :
27714  # Try to guess by grepping values from an object file.
27715	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27716/* end confdefs.h.  */
27717short int ascii_mm[] =
27718		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27719		short int ascii_ii[] =
27720		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27721		int use_ascii (int i) {
27722		  return ascii_mm[i] + ascii_ii[i];
27723		}
27724		short int ebcdic_ii[] =
27725		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27726		short int ebcdic_mm[] =
27727		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27728		int use_ebcdic (int i) {
27729		  return ebcdic_mm[i] + ebcdic_ii[i];
27730		}
27731		extern int foo;
27732
27733int
27734main ()
27735{
27736return use_ascii (foo) == use_ebcdic (foo);
27737  ;
27738  return 0;
27739}
27740_ACEOF
27741if ac_fn_cxx_try_compile "$LINENO"; then :
27742  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27743	      ac_cv_c_bigendian=yes
27744	    fi
27745	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27746	      if test "$ac_cv_c_bigendian" = unknown; then
27747		ac_cv_c_bigendian=no
27748	      else
27749		# finding both strings is unlikely to happen, but who knows?
27750		ac_cv_c_bigendian=unknown
27751	      fi
27752	    fi
27753fi
27754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27755else
27756  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27757/* end confdefs.h.  */
27758$ac_includes_default
27759int
27760main ()
27761{
27762
27763	     /* Are we little or big endian?  From Harbison&Steele.  */
27764	     union
27765	     {
27766	       long int l;
27767	       char c[sizeof (long int)];
27768	     } u;
27769	     u.l = 1;
27770	     return u.c[sizeof (long int) - 1] == 1;
27771
27772  ;
27773  return 0;
27774}
27775_ACEOF
27776if ac_fn_cxx_try_run "$LINENO"; then :
27777  ac_cv_c_bigendian=no
27778else
27779  ac_cv_c_bigendian=yes
27780fi
27781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27782  conftest.$ac_objext conftest.beam conftest.$ac_ext
27783fi
27784
27785    fi
27786fi
27787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27788$as_echo "$ac_cv_c_bigendian" >&6; }
27789 case $ac_cv_c_bigendian in #(
27790   yes)
27791     ENDIAN="big";; #(
27792   no)
27793     ENDIAN="little" ;; #(
27794   universal)
27795     ENDIAN="universal_endianness"
27796     ;; #(
27797   *)
27798     ENDIAN="unknown" ;;
27799 esac
27800
27801
27802if test "x$ENDIAN" = xuniversal_endianness; then
27803    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27804fi
27805if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27806    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
27807fi
27808
27809
27810# Configure flags for the tools
27811
27812
27813###############################################################################
27814#
27815# How to compile shared libraries.
27816#
27817
27818if test "x$GCC" = xyes; then
27819    COMPILER_NAME=gcc
27820    PICFLAG="-fPIC"
27821    LIBRARY_PREFIX=lib
27822    SHARED_LIBRARY='lib$1.so'
27823    STATIC_LIBRARY='lib$1.a'
27824    SHARED_LIBRARY_FLAGS="-shared"
27825    SHARED_LIBRARY_SUFFIX='.so'
27826    STATIC_LIBRARY_SUFFIX='.a'
27827    OBJ_SUFFIX='.o'
27828    EXE_SUFFIX=''
27829    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27830    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27831    C_FLAG_REORDER=''
27832    CXX_FLAG_REORDER=''
27833    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27834    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27835    LD="$CC"
27836    LDEXE="$CC"
27837    LDCXX="$CXX"
27838    LDEXECXX="$CXX"
27839    POST_STRIP_CMD="$STRIP -g"
27840
27841    # Linking is different on MacOSX
27842    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27843        # Might change in the future to clang.
27844        COMPILER_NAME=gcc
27845        SHARED_LIBRARY='lib$1.dylib'
27846        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27847        SHARED_LIBRARY_SUFFIX='.dylib'
27848        EXE_SUFFIX=''
27849        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27850        SET_SHARED_LIBRARY_MAPFILE=''
27851        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27852        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27853        POST_STRIP_CMD="$STRIP -S"
27854    fi
27855else
27856    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27857        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27858        COMPILER_NAME=ossc
27859        PICFLAG="-KPIC"
27860        LIBRARY_PREFIX=lib
27861        SHARED_LIBRARY='lib$1.so'
27862        STATIC_LIBRARY='lib$1.a'
27863        SHARED_LIBRARY_FLAGS="-G"
27864        SHARED_LIBRARY_SUFFIX='.so'
27865        STATIC_LIBRARY_SUFFIX='.a'
27866        OBJ_SUFFIX='.o'
27867        EXE_SUFFIX=''
27868        SET_SHARED_LIBRARY_NAME=''
27869        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27870	C_FLAG_REORDER='-xF'
27871	CXX_FLAG_REORDER='-xF'
27872        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27873        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27874        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27875        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27876        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27877        POST_STRIP_CMD="$STRIP -x"
27878        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27879    fi
27880    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27881        # If it is not gcc, then assume it is the MS Visual Studio compiler
27882        COMPILER_NAME=cl
27883        PICFLAG=""
27884        LIBRARY_PREFIX=
27885        SHARED_LIBRARY='$1.dll'
27886        STATIC_LIBRARY='$1.lib'
27887        SHARED_LIBRARY_FLAGS="-LD"
27888        SHARED_LIBRARY_SUFFIX='.dll'
27889        STATIC_LIBRARY_SUFFIX='.lib'
27890        OBJ_SUFFIX='.obj'
27891        EXE_SUFFIX='.exe'
27892        SET_SHARED_LIBRARY_NAME=''
27893        SET_SHARED_LIBRARY_MAPFILE=''
27894        SET_SHARED_LIBRARY_ORIGIN=''
27895        SET_EXECUTABLE_ORIGIN=''
27896    fi
27897fi
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916# The (cross) compiler is now configured, we can now test capabilities
27917# of the target platform.
27918
27919
27920
27921###############################################################################
27922#
27923# Setup the opt flags for different compilers
27924# and different operating systems.
27925#
27926
27927#
27928# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27929#
27930if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27931    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27932    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27933    CFLAGS="$CFLAGS -mstackrealign"
27934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27935$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27936    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27937/* end confdefs.h.  */
27938int main() { return 0; }
27939_ACEOF
27940if ac_fn_cxx_try_link "$LINENO"; then :
27941
27942		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27943$as_echo "yes" >&6; }
27944
27945else
27946
27947		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27948$as_echo "no" >&6; }
27949	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27950
27951fi
27952rm -f core conftest.err conftest.$ac_objext \
27953    conftest$ac_exeext conftest.$ac_ext
27954fi
27955
27956C_FLAG_DEPS="-MMD -MF"
27957CXX_FLAG_DEPS="-MMD -MF"
27958
27959case $COMPILER_TYPE in
27960  CC )
27961    D_FLAG="-g"
27962    case $COMPILER_NAME in
27963      gcc )
27964      	case $OPENJDK_TARGET_OS in
27965	  macosx )
27966	    # On MacOSX we optimize for size, something
27967	    # we should do for all platforms?
27968	    C_O_FLAG_HI="-Os"
27969	    C_O_FLAG_NORM="-Os"
27970	    C_O_FLAG_NONE=""
27971	    ;;
27972	  *)
27973	    C_O_FLAG_HI="-O3"
27974	    C_O_FLAG_NORM="-O2"
27975	    C_O_FLAG_NONE="-O0"
27976	    CFLAGS_DEBUG_SYMBOLS="-g"
27977	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27978	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27979	       CFLAGS_DEBUG_SYMBOLS="-g1"
27980	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27981	    fi
27982	    ;;
27983	esac
27984        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27985        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27986        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27987        ;;
27988      ossc )
27989        #
27990        # Forte has different names for this with their C++ compiler...
27991        #
27992        C_FLAG_DEPS="-xMMD -xMF"
27993        CXX_FLAG_DEPS="-xMMD -xMF"
27994
27995        # Extra options used with HIGHEST
27996        #
27997        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27998        #          done with care, there are some assumptions below that need to
27999        #          be understood about the use of pointers, and IEEE behavior.
28000        #
28001        # Use non-standard floating point mode (not IEEE 754)
28002        CC_HIGHEST="$CC_HIGHEST -fns"
28003        # Do some simplification of floating point arithmetic (not IEEE 754)
28004        CC_HIGHEST="$CC_HIGHEST -fsimple"
28005        # Use single precision floating point with 'float'
28006        CC_HIGHEST="$CC_HIGHEST -fsingle"
28007        # Assume memory references via basic pointer types do not alias
28008        #   (Source with excessing pointer casting and data access with mixed
28009        #    pointer types are not recommended)
28010        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28011        # Use intrinsic or inline versions for math/std functions
28012        #   (If you expect perfect errno behavior, do not use this)
28013        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28014        # Loop data dependency optimizations (need -xO3 or higher)
28015        CC_HIGHEST="$CC_HIGHEST -xdepend"
28016        # Pointer parameters to functions do not overlap
28017        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28018        #    If you pass in multiple pointers to the same data, do not use this)
28019        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28020        # Inline some library routines
28021        #   (If you expect perfect errno behavior, do not use this)
28022        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28023        # Use optimized math routines
28024        #   (If you expect perfect errno behavior, do not use this)
28025        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28026        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28027
28028        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28029          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28030          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28031        fi
28032
28033        case $OPENJDK_TARGET_CPU_ARCH in
28034          x86)
28035            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28036            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28037            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28038            C_O_FLAG_NONE="-xregs=no%frameptr"
28039            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28040            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28041            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28042            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28043            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28044               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28045               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28046            fi
28047            ;;
28048          sparc)
28049            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28050            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28051            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28052            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28053            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28054            C_O_FLAG_NONE=""
28055            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28056            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28057            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28058            CXX_O_FLAG_NONE=""
28059            ;;
28060        esac
28061
28062    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28063    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28064    esac
28065    ;;
28066  CL )
28067    D_FLAG=
28068    C_O_FLAG_HIGHEST="-O2"
28069    C_O_FLAG_HI="-O1"
28070    C_O_FLAG_NORM="-O1"
28071    C_O_FLAG_NONE="-Od"
28072    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28073    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28074    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28075    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28076    ;;
28077esac
28078
28079if test -z "$C_O_FLAG_HIGHEST"; then
28080   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28081fi
28082
28083if test -z "$CXX_O_FLAG_HIGHEST"; then
28084   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28085fi
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28101   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28102$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28103fi
28104
28105if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28106   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28107$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28108fi
28109
28110if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28111   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28112$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28113fi
28114
28115
28116# Check whether --with-extra-cflags was given.
28117if test "${with_extra_cflags+set}" = set; then :
28118  withval=$with_extra_cflags;
28119fi
28120
28121
28122
28123# Check whether --with-extra-cxxflags was given.
28124if test "${with_extra_cxxflags+set}" = set; then :
28125  withval=$with_extra_cxxflags;
28126fi
28127
28128
28129
28130# Check whether --with-extra-ldflags was given.
28131if test "${with_extra_ldflags+set}" = set; then :
28132  withval=$with_extra_ldflags;
28133fi
28134
28135
28136CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28137CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28138LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28139
28140# Hotspot needs these set in their legacy form
28141LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28142LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28143LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28144
28145
28146
28147
28148
28149###############################################################################
28150#
28151# Now setup the CFLAGS and LDFLAGS for the JDK build.
28152# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28153#
28154case $COMPILER_NAME in
28155      gcc )
28156      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28157                          -pipe \
28158                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28159	  case $OPENJDK_TARGET_CPU_ARCH in
28160	  arm )
28161            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28162	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28163	  ;;
28164	  ppc )
28165            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28166	  ;;
28167	  * )
28168	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28169	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28170          ;;
28171	  esac
28172          ;;
28173      ossc )
28174          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28175          case $OPENJDK_TARGET_CPU_ARCH in
28176          x86 )
28177            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28178       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28179          ;;
28180          esac
28181
28182      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28183      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28184
28185          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28186          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28187          ;;
28188      cl )
28189          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28190               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28191	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28192	       -DWIN32 -DIAL"
28193          case $OPENJDK_TARGET_CPU in
28194              x86 )
28195                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28196                  ;;
28197              x86_64 )
28198                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28199                  ;;
28200          esac
28201          ;;
28202esac
28203
28204###############################################################################
28205
28206CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28207
28208# The package path is used only on macosx?
28209PACKAGE_PATH=/opt/local
28210
28211
28212if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28213    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28214    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28215    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28216    #   Note: -Dmacro         is the same as    #define macro 1
28217    #         -Dmacro=	    is the same as    #define macro
28218    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28219        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28220    else
28221        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28222    fi
28223else
28224    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28225fi
28226if test "x$OPENJDK_TARGET_OS" = xlinux; then
28227    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28228fi
28229if test "x$OPENJDK_TARGET_OS" = xwindows; then
28230    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28231fi
28232if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28233    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28234fi
28235if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28236    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28237    # Setting these parameters makes it an error to link to macosx APIs that are
28238    # newer than the given OS version and makes the linked binaries compatible even
28239    # if built on a newer version of the OS.
28240    # The expected format is X.Y.Z
28241    MACOSX_VERSION_MIN=10.7.0
28242
28243    # The macro takes the version with no dots, ex: 1070
28244    # Let the flags variables get resolved in make for easier override on make
28245    # command line.
28246    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28247    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28248fi
28249if test "x$OPENJDK_TARGET_OS" = xbsd; then
28250    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28251fi
28252if test "x$DEBUG_LEVEL" = xrelease; then
28253    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28254    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28255        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28256    fi
28257else
28258    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28259fi
28260
28261CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28262CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28263
28264CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28265        -I${JDK_OUTPUTDIR}/include \
28266        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28267        -I${JDK_TOPDIR}/src/share/javavm/export \
28268        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28269        -I${JDK_TOPDIR}/src/share/native/common \
28270        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28271
28272# The shared libraries are compiled using the picflag.
28273CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28274CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28275
28276# Executable flags
28277CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28278CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28279
28280# Now this is odd. The JDK native libraries have to link against libjvm.so
28281# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28282# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28283# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28284# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28285# libraries will link to whatever is in memory. Yuck.
28286#
28287# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28288if test "x$COMPILER_NAME" = xcl; then
28289    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28290    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28291        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28292    fi
28293    # TODO: make -debug optional "--disable-full-debug-symbols"
28294    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28295    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28296    LDFLAGS_JDKLIB_SUFFIX=""
28297    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28298        LDFLAGS_STACK_SIZE=1048576
28299    else
28300        LDFLAGS_STACK_SIZE=327680
28301    fi
28302    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28303else
28304    if test "x$COMPILER_NAME" = xgcc; then
28305        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28306        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28307        if test -n "$HAS_GNU_HASH"; then
28308            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28309        fi
28310        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28311          # And since we now know that the linker is gnu, then add -z defs, to forbid
28312          # undefined symbols in object files.
28313          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28314          if test "x$DEBUG_LEVEL" = "xrelease"; then
28315              # When building release libraries, tell the linker optimize them.
28316              # Should this be supplied to the OSS linker as well?
28317              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28318          fi
28319        fi
28320    fi
28321    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28322                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28323
28324    # On some platforms (mac) the linker warns about non existing -L dirs.
28325    # Add server first if available. Linking aginst client does not always produce the same results.
28326    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28327    # Default to server for other variants.
28328    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28329        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28330    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28331        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28332    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28333        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28334    else
28335        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28336    fi
28337
28338    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28339    if test "x$COMPILER_NAME" = xossc; then
28340        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28341    fi
28342
28343    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28344    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28345        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28346    fi
28347fi
28348
28349# Adjust flags according to debug level.
28350case $DEBUG_LEVEL in
28351      fastdebug )
28352              CFLAGS="$CFLAGS $D_FLAG"
28353              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28354              ;;
28355      slowdebug )
28356              CFLAGS="$CFLAGS $D_FLAG"
28357	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28358	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28359	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28360	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28361              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28362              ;;
28363esac
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379# Setup debug symbols (need objcopy from the toolchain for that)
28380
28381#
28382# ENABLE_DEBUG_SYMBOLS
28383# This must be done after the toolchain is setup, since we're looking at objcopy.
28384#
28385# Check whether --enable-debug-symbols was given.
28386if test "${enable_debug_symbols+set}" = set; then :
28387  enableval=$enable_debug_symbols;
28388fi
28389
28390
28391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28392$as_echo_n "checking if we should generate debug symbols... " >&6; }
28393
28394if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28395   # explicit enabling of enable-debug-symbols and can't find objcopy
28396   #   this is an error
28397   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28398fi
28399
28400if test "x$enable_debug_symbols" = "xyes"; then
28401  ENABLE_DEBUG_SYMBOLS=true
28402elif test "x$enable_debug_symbols" = "xno"; then
28403  ENABLE_DEBUG_SYMBOLS=false
28404else
28405  # default on macosx is false
28406  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28407    ENABLE_DEBUG_SYMBOLS=false
28408  # Default is on if objcopy is found, otherwise off
28409  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28410    ENABLE_DEBUG_SYMBOLS=true
28411  else
28412    ENABLE_DEBUG_SYMBOLS=false
28413  fi
28414fi
28415
28416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28417$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28418
28419#
28420# ZIP_DEBUGINFO_FILES
28421#
28422# Check whether --enable-zip-debug-info was given.
28423if test "${enable_zip_debug_info+set}" = set; then :
28424  enableval=$enable_zip_debug_info;
28425fi
28426
28427
28428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28429$as_echo_n "checking if we should zip debug-info files... " >&6; }
28430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28431$as_echo "${enable_zip_debug_info}" >&6; }
28432
28433if test "x${enable_zip_debug_info}" = "xno"; then
28434   ZIP_DEBUGINFO_FILES=false
28435else
28436   ZIP_DEBUGINFO_FILES=true
28437fi
28438
28439
28440
28441
28442
28443
28444
28445###############################################################################
28446#
28447# Check dependencies for external and internal libraries.
28448#
28449###############################################################################
28450
28451
28452
28453###############################################################################
28454#
28455# OS specific settings that we never will need to probe.
28456#
28457if test "x$OPENJDK_TARGET_OS" = xlinux; then
28458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28459$as_echo_n "checking what is not needed on Linux?... " >&6; }
28460    PULSE_NOT_NEEDED=yes
28461    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28462$as_echo "pulse" >&6; }
28463fi
28464
28465if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28467$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28468    ALSA_NOT_NEEDED=yes
28469    PULSE_NOT_NEEDED=yes
28470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28471$as_echo "alsa pulse" >&6; }
28472fi
28473
28474if test "x$OPENJDK_TARGET_OS" = xwindows; then
28475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28476$as_echo_n "checking what is not needed on Windows?... " >&6; }
28477    CUPS_NOT_NEEDED=yes
28478    ALSA_NOT_NEEDED=yes
28479    PULSE_NOT_NEEDED=yes
28480    X11_NOT_NEEDED=yes
28481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28482$as_echo "alsa cups pulse x11" >&6; }
28483fi
28484
28485if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28487$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28488    ALSA_NOT_NEEDED=yes
28489    PULSE_NOT_NEEDED=yes
28490    X11_NOT_NEEDED=yes
28491    FREETYPE2_NOT_NEEDED=yes
28492    # If the java runtime framework is disabled, then we need X11.
28493    # This will be adjusted below.
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28495$as_echo "alsa pulse x11" >&6; }
28496fi
28497
28498if test "x$OPENJDK_TARGET_OS" = xbsd; then
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28500$as_echo_n "checking what is not needed on bsd?... " >&6; }
28501    ALSA_NOT_NEEDED=yes
28502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28503$as_echo "alsa" >&6; }
28504fi
28505
28506if test "x$OPENJDK" = "xfalse"; then
28507    FREETYPE2_NOT_NEEDED=yes
28508fi
28509
28510if test "x$SUPPORT_HEADFUL" = xno; then
28511    X11_NOT_NEEDED=yes
28512fi
28513
28514###############################################################################
28515#
28516# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28517# that uses this API.
28518#
28519# Check whether --enable-macosx-runtime-support was given.
28520if test "${enable_macosx_runtime_support+set}" = set; then :
28521  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28522else
28523  MACOSX_RUNTIME_SUPPORT="no"
28524fi
28525
28526
28527USE_MACOSX_RUNTIME_SUPPORT=no
28528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28529$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28530if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28531    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28532        MACOSX_RUNTIME_SUPPORT=yes
28533        USE_MACOSX_RUNTIME_SUPPORT=yes
28534        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28535$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28536    else
28537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28538$as_echo "yes, but explicitly disabled." >&6; }
28539    fi
28540else
28541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28542$as_echo "no" >&6; }
28543fi
28544
28545if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28547$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28548    X11_NOT_NEEDED=
28549    FREETYPE2_NOT_NEEDED=
28550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28551$as_echo "alsa pulse" >&6; }
28552fi
28553
28554
28555
28556
28557###############################################################################
28558#
28559# Check for X Windows
28560#
28561
28562# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28563# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28564# --x-libraries for the sysroot, if that seems to be correct.
28565if test "x$SYS_ROOT" != "x/"; then
28566  if test "x$x_includes" = xNONE; then
28567    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28568      x_includes="$SYS_ROOT/usr/X11R6/include"
28569    fi
28570  fi
28571  if test "x$x_libraries" = xNONE; then
28572    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28573      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28574    fi
28575  fi
28576fi
28577
28578# Now let autoconf do it's magic
28579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28580$as_echo_n "checking for X... " >&6; }
28581
28582
28583# Check whether --with-x was given.
28584if test "${with_x+set}" = set; then :
28585  withval=$with_x;
28586fi
28587
28588# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28589if test "x$with_x" = xno; then
28590  # The user explicitly disabled X.
28591  have_x=disabled
28592else
28593  case $x_includes,$x_libraries in #(
28594    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28595    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28596  $as_echo_n "(cached) " >&6
28597else
28598  # One or both of the vars are not set, and there is no cached value.
28599ac_x_includes=no ac_x_libraries=no
28600rm -f -r conftest.dir
28601if mkdir conftest.dir; then
28602  cd conftest.dir
28603  cat >Imakefile <<'_ACEOF'
28604incroot:
28605	@echo incroot='${INCROOT}'
28606usrlibdir:
28607	@echo usrlibdir='${USRLIBDIR}'
28608libdir:
28609	@echo libdir='${LIBDIR}'
28610_ACEOF
28611  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28612    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28613    for ac_var in incroot usrlibdir libdir; do
28614      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28615    done
28616    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28617    for ac_extension in a so sl dylib la dll; do
28618      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28619	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28620	ac_im_usrlibdir=$ac_im_libdir; break
28621      fi
28622    done
28623    # Screen out bogus values from the imake configuration.  They are
28624    # bogus both because they are the default anyway, and because
28625    # using them would break gcc on systems where it needs fixed includes.
28626    case $ac_im_incroot in
28627	/usr/include) ac_x_includes= ;;
28628	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28629    esac
28630    case $ac_im_usrlibdir in
28631	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28632	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28633    esac
28634  fi
28635  cd ..
28636  rm -f -r conftest.dir
28637fi
28638
28639# Standard set of common directories for X headers.
28640# Check X11 before X11Rn because it is often a symlink to the current release.
28641ac_x_header_dirs='
28642/usr/X11/include
28643/usr/X11R7/include
28644/usr/X11R6/include
28645/usr/X11R5/include
28646/usr/X11R4/include
28647
28648/usr/include/X11
28649/usr/include/X11R7
28650/usr/include/X11R6
28651/usr/include/X11R5
28652/usr/include/X11R4
28653
28654/usr/local/X11/include
28655/usr/local/X11R7/include
28656/usr/local/X11R6/include
28657/usr/local/X11R5/include
28658/usr/local/X11R4/include
28659
28660/usr/local/include/X11
28661/usr/local/include/X11R7
28662/usr/local/include/X11R6
28663/usr/local/include/X11R5
28664/usr/local/include/X11R4
28665
28666/usr/X386/include
28667/usr/x386/include
28668/usr/XFree86/include/X11
28669
28670/usr/include
28671/usr/local/include
28672/usr/unsupported/include
28673/usr/athena/include
28674/usr/local/x11r5/include
28675/usr/lpp/Xamples/include
28676
28677/usr/openwin/include
28678/usr/openwin/share/include'
28679
28680if test "$ac_x_includes" = no; then
28681  # Guess where to find include files, by looking for Xlib.h.
28682  # First, try using that file with no special directory specified.
28683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28684/* end confdefs.h.  */
28685#include <X11/Xlib.h>
28686_ACEOF
28687if ac_fn_cxx_try_cpp "$LINENO"; then :
28688  # We can compile using X headers with no special include directory.
28689ac_x_includes=
28690else
28691  for ac_dir in $ac_x_header_dirs; do
28692  if test -r "$ac_dir/X11/Xlib.h"; then
28693    ac_x_includes=$ac_dir
28694    break
28695  fi
28696done
28697fi
28698rm -f conftest.err conftest.i conftest.$ac_ext
28699fi # $ac_x_includes = no
28700
28701if test "$ac_x_libraries" = no; then
28702  # Check for the libraries.
28703  # See if we find them without any special options.
28704  # Don't add to $LIBS permanently.
28705  ac_save_LIBS=$LIBS
28706  LIBS="-lX11 $LIBS"
28707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28708/* end confdefs.h.  */
28709#include <X11/Xlib.h>
28710int
28711main ()
28712{
28713XrmInitialize ()
28714  ;
28715  return 0;
28716}
28717_ACEOF
28718if ac_fn_cxx_try_link "$LINENO"; then :
28719  LIBS=$ac_save_LIBS
28720# We can link X programs with no special library path.
28721ac_x_libraries=
28722else
28723  LIBS=$ac_save_LIBS
28724for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28725do
28726  # Don't even attempt the hair of trying to link an X program!
28727  for ac_extension in a so sl dylib la dll; do
28728    if test -r "$ac_dir/libX11.$ac_extension"; then
28729      ac_x_libraries=$ac_dir
28730      break 2
28731    fi
28732  done
28733done
28734fi
28735rm -f core conftest.err conftest.$ac_objext \
28736    conftest$ac_exeext conftest.$ac_ext
28737fi # $ac_x_libraries = no
28738
28739case $ac_x_includes,$ac_x_libraries in #(
28740  no,* | *,no | *\'*)
28741    # Didn't find X, or a directory has "'" in its name.
28742    ac_cv_have_x="have_x=no";; #(
28743  *)
28744    # Record where we found X for the cache.
28745    ac_cv_have_x="have_x=yes\
28746	ac_x_includes='$ac_x_includes'\
28747	ac_x_libraries='$ac_x_libraries'"
28748esac
28749fi
28750;; #(
28751    *) have_x=yes;;
28752  esac
28753  eval "$ac_cv_have_x"
28754fi # $with_x != no
28755
28756if test "$have_x" != yes; then
28757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28758$as_echo "$have_x" >&6; }
28759  no_x=yes
28760else
28761  # If each of the values was on the command line, it overrides each guess.
28762  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28763  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28764  # Update the cache value to reflect the command line values.
28765  ac_cv_have_x="have_x=yes\
28766	ac_x_includes='$x_includes'\
28767	ac_x_libraries='$x_libraries'"
28768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28769$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28770fi
28771
28772if test "$no_x" = yes; then
28773  # Not all programs may use this symbol, but it does not hurt to define it.
28774
28775$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28776
28777  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28778else
28779  if test -n "$x_includes"; then
28780    X_CFLAGS="$X_CFLAGS -I$x_includes"
28781  fi
28782
28783  # It would also be nice to do this for all -L options, not just this one.
28784  if test -n "$x_libraries"; then
28785    X_LIBS="$X_LIBS -L$x_libraries"
28786    # For Solaris; some versions of Sun CC require a space after -R and
28787    # others require no space.  Words are not sufficient . . . .
28788    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28789$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28790    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28791    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28792    ac_cxx_werror_flag=yes
28793    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28794/* end confdefs.h.  */
28795
28796int
28797main ()
28798{
28799
28800  ;
28801  return 0;
28802}
28803_ACEOF
28804if ac_fn_cxx_try_link "$LINENO"; then :
28805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28806$as_echo "no" >&6; }
28807       X_LIBS="$X_LIBS -R$x_libraries"
28808else
28809  LIBS="$ac_xsave_LIBS -R $x_libraries"
28810       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28811/* end confdefs.h.  */
28812
28813int
28814main ()
28815{
28816
28817  ;
28818  return 0;
28819}
28820_ACEOF
28821if ac_fn_cxx_try_link "$LINENO"; then :
28822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28823$as_echo "yes" >&6; }
28824	  X_LIBS="$X_LIBS -R $x_libraries"
28825else
28826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28827$as_echo "neither works" >&6; }
28828fi
28829rm -f core conftest.err conftest.$ac_objext \
28830    conftest$ac_exeext conftest.$ac_ext
28831fi
28832rm -f core conftest.err conftest.$ac_objext \
28833    conftest$ac_exeext conftest.$ac_ext
28834    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28835    LIBS=$ac_xsave_LIBS
28836  fi
28837
28838  # Check for system-dependent libraries X programs must link with.
28839  # Do this before checking for the system-independent R6 libraries
28840  # (-lICE), since we may need -lsocket or whatever for X linking.
28841
28842  if test "$ISC" = yes; then
28843    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28844  else
28845    # Martyn Johnson says this is needed for Ultrix, if the X
28846    # libraries were built with DECnet support.  And Karl Berry says
28847    # the Alpha needs dnet_stub (dnet does not exist).
28848    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28849    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28850/* end confdefs.h.  */
28851
28852/* Override any GCC internal prototype to avoid an error.
28853   Use char because int might match the return type of a GCC
28854   builtin and then its argument prototype would still apply.  */
28855#ifdef __cplusplus
28856extern "C"
28857#endif
28858char XOpenDisplay ();
28859int
28860main ()
28861{
28862return XOpenDisplay ();
28863  ;
28864  return 0;
28865}
28866_ACEOF
28867if ac_fn_cxx_try_link "$LINENO"; then :
28868
28869else
28870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28871$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28872if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28873  $as_echo_n "(cached) " >&6
28874else
28875  ac_check_lib_save_LIBS=$LIBS
28876LIBS="-ldnet  $LIBS"
28877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28878/* end confdefs.h.  */
28879
28880/* Override any GCC internal prototype to avoid an error.
28881   Use char because int might match the return type of a GCC
28882   builtin and then its argument prototype would still apply.  */
28883#ifdef __cplusplus
28884extern "C"
28885#endif
28886char dnet_ntoa ();
28887int
28888main ()
28889{
28890return dnet_ntoa ();
28891  ;
28892  return 0;
28893}
28894_ACEOF
28895if ac_fn_cxx_try_link "$LINENO"; then :
28896  ac_cv_lib_dnet_dnet_ntoa=yes
28897else
28898  ac_cv_lib_dnet_dnet_ntoa=no
28899fi
28900rm -f core conftest.err conftest.$ac_objext \
28901    conftest$ac_exeext conftest.$ac_ext
28902LIBS=$ac_check_lib_save_LIBS
28903fi
28904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28905$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28906if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28907  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28908fi
28909
28910    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28911      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28912$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28913if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28914  $as_echo_n "(cached) " >&6
28915else
28916  ac_check_lib_save_LIBS=$LIBS
28917LIBS="-ldnet_stub  $LIBS"
28918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28919/* end confdefs.h.  */
28920
28921/* Override any GCC internal prototype to avoid an error.
28922   Use char because int might match the return type of a GCC
28923   builtin and then its argument prototype would still apply.  */
28924#ifdef __cplusplus
28925extern "C"
28926#endif
28927char dnet_ntoa ();
28928int
28929main ()
28930{
28931return dnet_ntoa ();
28932  ;
28933  return 0;
28934}
28935_ACEOF
28936if ac_fn_cxx_try_link "$LINENO"; then :
28937  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28938else
28939  ac_cv_lib_dnet_stub_dnet_ntoa=no
28940fi
28941rm -f core conftest.err conftest.$ac_objext \
28942    conftest$ac_exeext conftest.$ac_ext
28943LIBS=$ac_check_lib_save_LIBS
28944fi
28945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28946$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28947if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28948  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28949fi
28950
28951    fi
28952fi
28953rm -f core conftest.err conftest.$ac_objext \
28954    conftest$ac_exeext conftest.$ac_ext
28955    LIBS="$ac_xsave_LIBS"
28956
28957    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28958    # to get the SysV transport functions.
28959    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28960    # needs -lnsl.
28961    # The nsl library prevents programs from opening the X display
28962    # on Irix 5.2, according to T.E. Dickey.
28963    # The functions gethostbyname, getservbyname, and inet_addr are
28964    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28965    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28966if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28967
28968fi
28969
28970    if test $ac_cv_func_gethostbyname = no; then
28971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28972$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28973if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28974  $as_echo_n "(cached) " >&6
28975else
28976  ac_check_lib_save_LIBS=$LIBS
28977LIBS="-lnsl  $LIBS"
28978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28979/* end confdefs.h.  */
28980
28981/* Override any GCC internal prototype to avoid an error.
28982   Use char because int might match the return type of a GCC
28983   builtin and then its argument prototype would still apply.  */
28984#ifdef __cplusplus
28985extern "C"
28986#endif
28987char gethostbyname ();
28988int
28989main ()
28990{
28991return gethostbyname ();
28992  ;
28993  return 0;
28994}
28995_ACEOF
28996if ac_fn_cxx_try_link "$LINENO"; then :
28997  ac_cv_lib_nsl_gethostbyname=yes
28998else
28999  ac_cv_lib_nsl_gethostbyname=no
29000fi
29001rm -f core conftest.err conftest.$ac_objext \
29002    conftest$ac_exeext conftest.$ac_ext
29003LIBS=$ac_check_lib_save_LIBS
29004fi
29005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29006$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29007if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29008  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29009fi
29010
29011      if test $ac_cv_lib_nsl_gethostbyname = no; then
29012	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29013$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29014if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29015  $as_echo_n "(cached) " >&6
29016else
29017  ac_check_lib_save_LIBS=$LIBS
29018LIBS="-lbsd  $LIBS"
29019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29020/* end confdefs.h.  */
29021
29022/* Override any GCC internal prototype to avoid an error.
29023   Use char because int might match the return type of a GCC
29024   builtin and then its argument prototype would still apply.  */
29025#ifdef __cplusplus
29026extern "C"
29027#endif
29028char gethostbyname ();
29029int
29030main ()
29031{
29032return gethostbyname ();
29033  ;
29034  return 0;
29035}
29036_ACEOF
29037if ac_fn_cxx_try_link "$LINENO"; then :
29038  ac_cv_lib_bsd_gethostbyname=yes
29039else
29040  ac_cv_lib_bsd_gethostbyname=no
29041fi
29042rm -f core conftest.err conftest.$ac_objext \
29043    conftest$ac_exeext conftest.$ac_ext
29044LIBS=$ac_check_lib_save_LIBS
29045fi
29046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29047$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29048if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29049  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29050fi
29051
29052      fi
29053    fi
29054
29055    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29056    # socket/setsockopt and other routines are undefined under SCO ODT
29057    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29058    # on later versions), says Simon Leinen: it contains gethostby*
29059    # variants that don't use the name server (or something).  -lsocket
29060    # must be given before -lnsl if both are needed.  We assume that
29061    # if connect needs -lnsl, so does gethostbyname.
29062    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29063if test "x$ac_cv_func_connect" = x""yes; then :
29064
29065fi
29066
29067    if test $ac_cv_func_connect = no; then
29068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29069$as_echo_n "checking for connect in -lsocket... " >&6; }
29070if test "${ac_cv_lib_socket_connect+set}" = set; then :
29071  $as_echo_n "(cached) " >&6
29072else
29073  ac_check_lib_save_LIBS=$LIBS
29074LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29076/* end confdefs.h.  */
29077
29078/* Override any GCC internal prototype to avoid an error.
29079   Use char because int might match the return type of a GCC
29080   builtin and then its argument prototype would still apply.  */
29081#ifdef __cplusplus
29082extern "C"
29083#endif
29084char connect ();
29085int
29086main ()
29087{
29088return connect ();
29089  ;
29090  return 0;
29091}
29092_ACEOF
29093if ac_fn_cxx_try_link "$LINENO"; then :
29094  ac_cv_lib_socket_connect=yes
29095else
29096  ac_cv_lib_socket_connect=no
29097fi
29098rm -f core conftest.err conftest.$ac_objext \
29099    conftest$ac_exeext conftest.$ac_ext
29100LIBS=$ac_check_lib_save_LIBS
29101fi
29102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29103$as_echo "$ac_cv_lib_socket_connect" >&6; }
29104if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29105  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29106fi
29107
29108    fi
29109
29110    # Guillermo Gomez says -lposix is necessary on A/UX.
29111    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29112if test "x$ac_cv_func_remove" = x""yes; then :
29113
29114fi
29115
29116    if test $ac_cv_func_remove = no; then
29117      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29118$as_echo_n "checking for remove in -lposix... " >&6; }
29119if test "${ac_cv_lib_posix_remove+set}" = set; then :
29120  $as_echo_n "(cached) " >&6
29121else
29122  ac_check_lib_save_LIBS=$LIBS
29123LIBS="-lposix  $LIBS"
29124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29125/* end confdefs.h.  */
29126
29127/* Override any GCC internal prototype to avoid an error.
29128   Use char because int might match the return type of a GCC
29129   builtin and then its argument prototype would still apply.  */
29130#ifdef __cplusplus
29131extern "C"
29132#endif
29133char remove ();
29134int
29135main ()
29136{
29137return remove ();
29138  ;
29139  return 0;
29140}
29141_ACEOF
29142if ac_fn_cxx_try_link "$LINENO"; then :
29143  ac_cv_lib_posix_remove=yes
29144else
29145  ac_cv_lib_posix_remove=no
29146fi
29147rm -f core conftest.err conftest.$ac_objext \
29148    conftest$ac_exeext conftest.$ac_ext
29149LIBS=$ac_check_lib_save_LIBS
29150fi
29151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29152$as_echo "$ac_cv_lib_posix_remove" >&6; }
29153if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29154  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29155fi
29156
29157    fi
29158
29159    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29160    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29161if test "x$ac_cv_func_shmat" = x""yes; then :
29162
29163fi
29164
29165    if test $ac_cv_func_shmat = no; then
29166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29167$as_echo_n "checking for shmat in -lipc... " >&6; }
29168if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29169  $as_echo_n "(cached) " >&6
29170else
29171  ac_check_lib_save_LIBS=$LIBS
29172LIBS="-lipc  $LIBS"
29173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29174/* end confdefs.h.  */
29175
29176/* Override any GCC internal prototype to avoid an error.
29177   Use char because int might match the return type of a GCC
29178   builtin and then its argument prototype would still apply.  */
29179#ifdef __cplusplus
29180extern "C"
29181#endif
29182char shmat ();
29183int
29184main ()
29185{
29186return shmat ();
29187  ;
29188  return 0;
29189}
29190_ACEOF
29191if ac_fn_cxx_try_link "$LINENO"; then :
29192  ac_cv_lib_ipc_shmat=yes
29193else
29194  ac_cv_lib_ipc_shmat=no
29195fi
29196rm -f core conftest.err conftest.$ac_objext \
29197    conftest$ac_exeext conftest.$ac_ext
29198LIBS=$ac_check_lib_save_LIBS
29199fi
29200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29201$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29202if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29203  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29204fi
29205
29206    fi
29207  fi
29208
29209  # Check for libraries that X11R6 Xt/Xaw programs need.
29210  ac_save_LDFLAGS=$LDFLAGS
29211  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29212  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29213  # check for ICE first), but we must link in the order -lSM -lICE or
29214  # we get undefined symbols.  So assume we have SM if we have ICE.
29215  # These have to be linked with before -lX11, unlike the other
29216  # libraries we check for below, so use a different variable.
29217  # John Interrante, Karl Berry
29218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29219$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29220if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29221  $as_echo_n "(cached) " >&6
29222else
29223  ac_check_lib_save_LIBS=$LIBS
29224LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29226/* end confdefs.h.  */
29227
29228/* Override any GCC internal prototype to avoid an error.
29229   Use char because int might match the return type of a GCC
29230   builtin and then its argument prototype would still apply.  */
29231#ifdef __cplusplus
29232extern "C"
29233#endif
29234char IceConnectionNumber ();
29235int
29236main ()
29237{
29238return IceConnectionNumber ();
29239  ;
29240  return 0;
29241}
29242_ACEOF
29243if ac_fn_cxx_try_link "$LINENO"; then :
29244  ac_cv_lib_ICE_IceConnectionNumber=yes
29245else
29246  ac_cv_lib_ICE_IceConnectionNumber=no
29247fi
29248rm -f core conftest.err conftest.$ac_objext \
29249    conftest$ac_exeext conftest.$ac_ext
29250LIBS=$ac_check_lib_save_LIBS
29251fi
29252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29253$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29254if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29255  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29256fi
29257
29258  LDFLAGS=$ac_save_LDFLAGS
29259
29260fi
29261
29262
29263# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29264# this doesn't make sense so we remove it.
29265if test "x$COMPILE_TYPE" = xcross; then
29266  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29267fi
29268
29269if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29270
29271    # Print a helpful message on how to acquire the necessary build dependency.
29272    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29273    MISSING_DEPENDENCY=x11
29274    PKGHANDLER_COMMAND=
29275
29276    case $PKGHANDLER in
29277	apt-get)
29278                apt_help     $MISSING_DEPENDENCY ;;
29279    yum)
29280                yum_help     $MISSING_DEPENDENCY ;;
29281	port)
29282                port_help    $MISSING_DEPENDENCY ;;
29283	pkgutil)
29284                pkgutil_help $MISSING_DEPENDENCY ;;
29285	pkgadd)
29286                pkgadd_help  $MISSING_DEPENDENCY ;;
29287    * )
29288      break ;;
29289    esac
29290
29291    if test "x$PKGHANDLER_COMMAND" != x; then
29292        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29293    fi
29294
29295    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29296fi
29297
29298# Some of the old makefiles require a setting of OPENWIN_HOME
29299# Since the X11R6 directory has disappeared on later Linuxes,
29300# we need to probe for it.
29301if test "x$OPENJDK_TARGET_OS" = xlinux; then
29302    if test -d "$SYS_ROOT/usr/X11R6"; then
29303        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29304    fi
29305    if test -d "$SYS_ROOT/usr/include/X11"; then
29306        OPENWIN_HOME="$SYS_ROOT/usr"
29307    fi
29308fi
29309if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29310    OPENWIN_HOME="/usr/openwin"
29311fi
29312
29313
29314
29315#
29316# Weird Sol10 something check...TODO change to try compile
29317#
29318if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29319  if test "`uname -r`" = "5.10"; then
29320     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29321     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29322     fi
29323  fi
29324fi
29325
29326ac_ext=c
29327ac_cpp='$CPP $CPPFLAGS'
29328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29330ac_compiler_gnu=$ac_cv_c_compiler_gnu
29331
29332OLD_CFLAGS="$CFLAGS"
29333CFLAGS="$CFLAGS $X_CFLAGS"
29334
29335# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29336for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29337do :
29338  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29339ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29340                   # include <X11/Xutil.h>
29341
29342"
29343if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29344  cat >>confdefs.h <<_ACEOF
29345#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29346_ACEOF
29347 X11_A_OK=yes
29348else
29349  X11_A_OK=no
29350fi
29351
29352done
29353
29354
29355CFLAGS="$OLD_CFLAGS"
29356ac_ext=cpp
29357ac_cpp='$CXXCPP $CPPFLAGS'
29358ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29359ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29360ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29361
29362
29363if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29364
29365    # Print a helpful message on how to acquire the necessary build dependency.
29366    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29367    MISSING_DEPENDENCY=x11
29368    PKGHANDLER_COMMAND=
29369
29370    case $PKGHANDLER in
29371	apt-get)
29372                apt_help     $MISSING_DEPENDENCY ;;
29373    yum)
29374                yum_help     $MISSING_DEPENDENCY ;;
29375	port)
29376                port_help    $MISSING_DEPENDENCY ;;
29377	pkgutil)
29378                pkgutil_help $MISSING_DEPENDENCY ;;
29379	pkgadd)
29380                pkgadd_help  $MISSING_DEPENDENCY ;;
29381    * )
29382      break ;;
29383    esac
29384
29385    if test "x$PKGHANDLER_COMMAND" != x; then
29386        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29387    fi
29388
29389    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29390fi
29391
29392
29393
29394
29395
29396
29397###############################################################################
29398#
29399# The common unix printing system cups is used to print from java.
29400#
29401
29402# Check whether --with-cups was given.
29403if test "${with_cups+set}" = set; then :
29404  withval=$with_cups;
29405fi
29406
29407
29408# Check whether --with-cups-include was given.
29409if test "${with_cups_include+set}" = set; then :
29410  withval=$with_cups_include;
29411fi
29412
29413
29414if test "x$CUPS_NOT_NEEDED" = xyes; then
29415	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29416		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29417$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29418	fi
29419	CUPS_CFLAGS=
29420else
29421	CUPS_FOUND=no
29422
29423	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29424	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29425	fi
29426
29427	if test "x${with_cups}" != x; then
29428	    CUPS_CFLAGS="-I${with_cups}/include"
29429	    CUPS_FOUND=yes
29430	fi
29431	if test "x${with_cups_include}" != x; then
29432	    CUPS_CFLAGS="-I${with_cups_include}"
29433	    CUPS_FOUND=yes
29434	fi
29435	if test "x$CUPS_FOUND" = xno; then
29436
29437
29438    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29439        # Source the builddeps file again, to make sure it uses the latest variables!
29440        . $builddepsfile
29441        # Look for a target and build machine specific resource!
29442        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29443        if test "x$resource" = x; then
29444            # Ok, lets instead look for a target specific resource
29445            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29446        fi
29447        if test "x$resource" = x; then
29448            # Ok, lets instead look for a build specific resource
29449            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29450        fi
29451        if test "x$resource" = x; then
29452            # Ok, lets instead look for a generic resource
29453            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29454            resource=${builddep_cups}
29455        fi
29456        if test "x$resource" != x; then
29457            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29458$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29459	    # If the resource in the builddeps.conf file is an existing directory,
29460	    # for example /java/linux/cups
29461	    if test -d ${resource}; then
29462	       depdir=${resource}
29463	    else
29464
29465# cups is for example mymodule
29466# $resource is for example libs/general/libmymod_1_2_3.zip
29467# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29468# $with_builddeps_dir is for example /localhome/builddeps
29469# depdir is the name of the variable into which we store the depdir, eg MYMOD
29470# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29471# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29472    filename=`basename $resource`
29473    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29474    filebase=${filename%%.*}
29475    extension=${filename#*.}
29476    installdir=$with_builddeps_dir/$filebase
29477    if test ! -f $installdir/$filename.unpacked; then
29478        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29479$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29480        if test ! -d $installdir; then
29481            mkdir -p $installdir
29482        fi
29483        if test ! -d $installdir; then
29484            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29485        fi
29486        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29487        touch $tmpfile
29488        if test ! -f $tmpfile; then
29489            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29490        fi
29491
29492    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29493    # $tmpfile is the local file name for the downloaded file.
29494    VALID_TOOL=no
29495    if test "x$BDEPS_FTP" = xwget; then
29496       VALID_TOOL=yes
29497       wget -O $tmpfile $with_builddeps_server/$resource
29498    fi
29499    if test "x$BDEPS_FTP" = xlftp; then
29500       VALID_TOOL=yes
29501       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29502    fi
29503    if test "x$BDEPS_FTP" = xftp; then
29504        VALID_TOOL=yes
29505        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29506        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29507        FTPUSERPWD=${FTPSERVER%%@*}
29508        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29509            FTPUSER=${userpwd%%:*}
29510            FTPPWD=${userpwd#*@}
29511            FTPSERVER=${FTPSERVER#*@}
29512        else
29513            FTPUSER=ftp
29514            FTPPWD=ftp
29515        fi
29516        # the "pass" command does not work on some
29517        # ftp clients (read ftp.exe) but if it works,
29518        # passive mode is better!
29519        (\
29520            echo "user $FTPUSER $FTPPWD"        ;\
29521            echo "pass"                         ;\
29522            echo "bin"                          ;\
29523            echo "get $FTPPATH $tmpfile"              ;\
29524        ) | ftp -in $FTPSERVER
29525    fi
29526    if test "x$VALID_TOOL" != xyes; then
29527       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29528    fi
29529
29530        mv $tmpfile $installdir/$filename
29531        if test ! -s $installdir/$filename; then
29532            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29533        fi
29534        case "$extension" in
29535            zip)  echo "Unzipping $installdir/$filename..."
29536               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29537            ;;
29538            tar.gz) echo "Untaring $installdir/$filename..."
29539               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29540            ;;
29541            tgz) echo "Untaring $installdir/$filename..."
29542               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29543            ;;
29544            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29545            ;;
29546        esac
29547    fi
29548    if test -f $installdir/$filename.unpacked; then
29549        depdir=$installdir
29550    fi
29551
29552	    fi
29553            # Source the builddeps file again, because in the previous command, the depdir
29554            # was updated to point at the current build dependency install directory.
29555            . $builddepsfile
29556            # Now extract variables from the builddeps.conf files.
29557            theroot=${builddep_cups_ROOT}
29558            thecflags=${builddep_cups_CFLAGS}
29559            thelibs=${builddep_cups_LIBS}
29560            if test "x$depdir" = x; then
29561                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29562            fi
29563            CUPS=$depdir
29564            if test "x$theroot" != x; then
29565               CUPS="$theroot"
29566            fi
29567            if test "x$thecflags" != x; then
29568               CUPS_CFLAGS="$thecflags"
29569            fi
29570            if test "x$thelibs" != x; then
29571               CUPS_LIBS="$thelibs"
29572            fi
29573            CUPS_FOUND=yes
29574
29575        fi
29576
29577    fi
29578
29579	fi
29580	if test "x$CUPS_FOUND" = xno; then
29581	    # Are the cups headers installed in the default /usr/include location?
29582	    for ac_header in cups/cups.h cups/ppd.h
29583do :
29584  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29585ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29586if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29587  cat >>confdefs.h <<_ACEOF
29588#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29589_ACEOF
29590 CUPS_FOUND=yes
29591	                      CUPS_CFLAGS=
29592	                      DEFAULT_CUPS=yes
29593fi
29594
29595done
29596
29597	fi
29598	if test "x$CUPS_FOUND" = xno; then
29599	    # Getting nervous now? Lets poke around for standard Solaris third-party
29600	    # package installation locations.
29601	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29602$as_echo_n "checking for cups headers... " >&6; }
29603	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29604	       # An SFW package seems to be installed!
29605	       CUPS_FOUND=yes
29606	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29607	    elif test -s /opt/csw/include/cups/cups.h; then
29608	       # A CSW package seems to be installed!
29609	       CUPS_FOUND=yes
29610	       CUPS_CFLAGS="-I/opt/csw/include"
29611	    fi
29612	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29613$as_echo "$CUPS_FOUND" >&6; }
29614	fi
29615	if test "x$CUPS_FOUND" = xno; then
29616
29617    # Print a helpful message on how to acquire the necessary build dependency.
29618    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29619    MISSING_DEPENDENCY=cups
29620    PKGHANDLER_COMMAND=
29621
29622    case $PKGHANDLER in
29623	apt-get)
29624                apt_help     $MISSING_DEPENDENCY ;;
29625    yum)
29626                yum_help     $MISSING_DEPENDENCY ;;
29627	port)
29628                port_help    $MISSING_DEPENDENCY ;;
29629	pkgutil)
29630                pkgutil_help $MISSING_DEPENDENCY ;;
29631	pkgadd)
29632                pkgadd_help  $MISSING_DEPENDENCY ;;
29633    * )
29634      break ;;
29635    esac
29636
29637    if test "x$PKGHANDLER_COMMAND" != x; then
29638        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29639    fi
29640
29641	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29642	fi
29643fi
29644
29645
29646
29647
29648
29649
29650###############################################################################
29651#
29652# The ubiquitous freetype2 library is used to render fonts.
29653#
29654
29655# Check whether --with-freetype was given.
29656if test "${with_freetype+set}" = set; then :
29657  withval=$with_freetype;
29658fi
29659
29660
29661# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29662USING_SYSTEM_FT_LIB=false
29663
29664if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29665	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29666		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29667$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29668	fi
29669	FREETYPE2_CFLAGS=
29670	FREETYPE2_LIBS=
29671        FREETYPE2_LIB_PATH=
29672else
29673	FREETYPE2_FOUND=no
29674
29675	if test "x$with_freetype" != x; then
29676
29677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29678
29679  # Input might be given as Windows format, start by converting to
29680  # unix format.
29681  path="$with_freetype"
29682  new_path=`$CYGPATH -u "$path"`
29683
29684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29687  # "foo.exe" is OK but "foo" is an error.
29688  #
29689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29690  # It is also a way to make sure we got the proper file name for the real test later on.
29691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29692  if test "x$test_shortpath" = x; then
29693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29694$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29695    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29696  fi
29697
29698  # Call helper function which possibly converts this using DOS-style short mode.
29699  # If so, the updated path is stored in $new_path.
29700
29701  input_path="$new_path"
29702  # Check if we need to convert this using DOS-style short mode. If the path
29703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29704  # take no chances and rewrite it.
29705  # Note: m4 eats our [], so we need to use [ and ] instead.
29706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29707  if test "x$has_forbidden_chars" != x; then
29708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29712      # Going to short mode and back again did indeed matter. Since short mode is
29713      # case insensitive, let's make it lowercase to improve readability.
29714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29715      # Now convert it back to Unix-stile (cygpath)
29716      input_path=`$CYGPATH -u "$shortmode_path"`
29717      new_path="$input_path"
29718    fi
29719  fi
29720
29721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29722  if test "x$test_cygdrive_prefix" = x; then
29723    # As a simple fix, exclude /usr/bin since it's not a real path.
29724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29726      # a path prefixed by /cygdrive for fixpath to work.
29727      new_path="$CYGWIN_ROOT_PATH$input_path"
29728    fi
29729  fi
29730
29731
29732  if test "x$path" != "x$new_path"; then
29733    with_freetype="$new_path"
29734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29735$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29736  fi
29737
29738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29739
29740  path="$with_freetype"
29741  has_colon=`$ECHO $path | $GREP ^.:`
29742  new_path="$path"
29743  if test "x$has_colon" = x; then
29744    # Not in mixed or Windows style, start by that.
29745    new_path=`cmd //c echo $path`
29746  fi
29747
29748
29749  input_path="$new_path"
29750  # Check if we need to convert this using DOS-style short mode. If the path
29751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29752  # take no chances and rewrite it.
29753  # Note: m4 eats our [], so we need to use [ and ] instead.
29754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29755  if test "x$has_forbidden_chars" != x; then
29756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29758  fi
29759
29760
29761  windows_path="$new_path"
29762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29763    unix_path=`$CYGPATH -u "$windows_path"`
29764    new_path="$unix_path"
29765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29767    new_path="$unix_path"
29768  fi
29769
29770  if test "x$path" != "x$new_path"; then
29771    with_freetype="$new_path"
29772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29773$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29774  fi
29775
29776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29778
29779  else
29780    # We're on a posix platform. Hooray! :)
29781    path="$with_freetype"
29782
29783    if test ! -f "$path" && test ! -d "$path"; then
29784      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29785    fi
29786
29787    has_space=`$ECHO "$path" | $GREP " "`
29788    if test "x$has_space" != x; then
29789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29790$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29791      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29792    fi
29793  fi
29794
29795	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29796            FREETYPE2_LIB_PATH="$with_freetype/lib"
29797            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29798                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29799                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29800            fi
29801            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29802                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29803            fi
29804	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29805            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29806                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29807            fi
29808 	    FREETYPE2_FOUND=yes
29809   	    if test "x$FREETYPE2_FOUND" = xyes; then
29810	        # Verify that the directories exist
29811                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29812		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29813		fi
29814	        # List the contents of the lib.
29815		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29816                if test "x$FREETYPELIB" = x; then
29817		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29818		fi
29819	        # Check one h-file
29820                if ! test -s "$with_freetype/include/ft2build.h"; then
29821		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29822		fi
29823            fi
29824        fi
29825	if test "x$FREETYPE2_FOUND" = xno; then
29826
29827
29828    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29829        # Source the builddeps file again, to make sure it uses the latest variables!
29830        . $builddepsfile
29831        # Look for a target and build machine specific resource!
29832        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29833        if test "x$resource" = x; then
29834            # Ok, lets instead look for a target specific resource
29835            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29836        fi
29837        if test "x$resource" = x; then
29838            # Ok, lets instead look for a build specific resource
29839            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29840        fi
29841        if test "x$resource" = x; then
29842            # Ok, lets instead look for a generic resource
29843            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29844            resource=${builddep_freetype2}
29845        fi
29846        if test "x$resource" != x; then
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29848$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29849	    # If the resource in the builddeps.conf file is an existing directory,
29850	    # for example /java/linux/cups
29851	    if test -d ${resource}; then
29852	       depdir=${resource}
29853	    else
29854
29855# freetype2 is for example mymodule
29856# $resource is for example libs/general/libmymod_1_2_3.zip
29857# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29858# $with_builddeps_dir is for example /localhome/builddeps
29859# depdir is the name of the variable into which we store the depdir, eg MYMOD
29860# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29861# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29862    filename=`basename $resource`
29863    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29864    filebase=${filename%%.*}
29865    extension=${filename#*.}
29866    installdir=$with_builddeps_dir/$filebase
29867    if test ! -f $installdir/$filename.unpacked; then
29868        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29869$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29870        if test ! -d $installdir; then
29871            mkdir -p $installdir
29872        fi
29873        if test ! -d $installdir; then
29874            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29875        fi
29876        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29877        touch $tmpfile
29878        if test ! -f $tmpfile; then
29879            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29880        fi
29881
29882    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29883    # $tmpfile is the local file name for the downloaded file.
29884    VALID_TOOL=no
29885    if test "x$BDEPS_FTP" = xwget; then
29886       VALID_TOOL=yes
29887       wget -O $tmpfile $with_builddeps_server/$resource
29888    fi
29889    if test "x$BDEPS_FTP" = xlftp; then
29890       VALID_TOOL=yes
29891       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29892    fi
29893    if test "x$BDEPS_FTP" = xftp; then
29894        VALID_TOOL=yes
29895        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29896        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29897        FTPUSERPWD=${FTPSERVER%%@*}
29898        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29899            FTPUSER=${userpwd%%:*}
29900            FTPPWD=${userpwd#*@}
29901            FTPSERVER=${FTPSERVER#*@}
29902        else
29903            FTPUSER=ftp
29904            FTPPWD=ftp
29905        fi
29906        # the "pass" command does not work on some
29907        # ftp clients (read ftp.exe) but if it works,
29908        # passive mode is better!
29909        (\
29910            echo "user $FTPUSER $FTPPWD"        ;\
29911            echo "pass"                         ;\
29912            echo "bin"                          ;\
29913            echo "get $FTPPATH $tmpfile"              ;\
29914        ) | ftp -in $FTPSERVER
29915    fi
29916    if test "x$VALID_TOOL" != xyes; then
29917       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29918    fi
29919
29920        mv $tmpfile $installdir/$filename
29921        if test ! -s $installdir/$filename; then
29922            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29923        fi
29924        case "$extension" in
29925            zip)  echo "Unzipping $installdir/$filename..."
29926               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29927            ;;
29928            tar.gz) echo "Untaring $installdir/$filename..."
29929               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29930            ;;
29931            tgz) echo "Untaring $installdir/$filename..."
29932               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29933            ;;
29934            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29935            ;;
29936        esac
29937    fi
29938    if test -f $installdir/$filename.unpacked; then
29939        depdir=$installdir
29940    fi
29941
29942	    fi
29943            # Source the builddeps file again, because in the previous command, the depdir
29944            # was updated to point at the current build dependency install directory.
29945            . $builddepsfile
29946            # Now extract variables from the builddeps.conf files.
29947            theroot=${builddep_freetype2_ROOT}
29948            thecflags=${builddep_freetype2_CFLAGS}
29949            thelibs=${builddep_freetype2_LIBS}
29950            if test "x$depdir" = x; then
29951                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29952            fi
29953            FREETYPE2=$depdir
29954            if test "x$theroot" != x; then
29955               FREETYPE2="$theroot"
29956            fi
29957            if test "x$thecflags" != x; then
29958               FREETYPE2_CFLAGS="$thecflags"
29959            fi
29960            if test "x$thelibs" != x; then
29961               FREETYPE2_LIBS="$thelibs"
29962            fi
29963            FREETYPE2_FOUND=yes
29964            else FREETYPE2_FOUND=no
29965
29966        fi
29967        else FREETYPE2_FOUND=no
29968
29969    fi
29970
29971            USING_SYSTEM_FT_LIB=true
29972	fi
29973	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29974            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29975
29976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29977
29978  # Input might be given as Windows format, start by converting to
29979  # unix format.
29980  path="$FREETYPELOCATION"
29981  new_path=`$CYGPATH -u "$path"`
29982
29983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29986  # "foo.exe" is OK but "foo" is an error.
29987  #
29988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29989  # It is also a way to make sure we got the proper file name for the real test later on.
29990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29991  if test "x$test_shortpath" = x; then
29992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29993$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29994    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29995  fi
29996
29997  # Call helper function which possibly converts this using DOS-style short mode.
29998  # If so, the updated path is stored in $new_path.
29999
30000  input_path="$new_path"
30001  # Check if we need to convert this using DOS-style short mode. If the path
30002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30003  # take no chances and rewrite it.
30004  # Note: m4 eats our [], so we need to use [ and ] instead.
30005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30006  if test "x$has_forbidden_chars" != x; then
30007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30011      # Going to short mode and back again did indeed matter. Since short mode is
30012      # case insensitive, let's make it lowercase to improve readability.
30013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30014      # Now convert it back to Unix-stile (cygpath)
30015      input_path=`$CYGPATH -u "$shortmode_path"`
30016      new_path="$input_path"
30017    fi
30018  fi
30019
30020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30021  if test "x$test_cygdrive_prefix" = x; then
30022    # As a simple fix, exclude /usr/bin since it's not a real path.
30023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30025      # a path prefixed by /cygdrive for fixpath to work.
30026      new_path="$CYGWIN_ROOT_PATH$input_path"
30027    fi
30028  fi
30029
30030
30031  if test "x$path" != "x$new_path"; then
30032    FREETYPELOCATION="$new_path"
30033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30034$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30035  fi
30036
30037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30038
30039  path="$FREETYPELOCATION"
30040  has_colon=`$ECHO $path | $GREP ^.:`
30041  new_path="$path"
30042  if test "x$has_colon" = x; then
30043    # Not in mixed or Windows style, start by that.
30044    new_path=`cmd //c echo $path`
30045  fi
30046
30047
30048  input_path="$new_path"
30049  # Check if we need to convert this using DOS-style short mode. If the path
30050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30051  # take no chances and rewrite it.
30052  # Note: m4 eats our [], so we need to use [ and ] instead.
30053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30054  if test "x$has_forbidden_chars" != x; then
30055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30057  fi
30058
30059
30060  windows_path="$new_path"
30061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30062    unix_path=`$CYGPATH -u "$windows_path"`
30063    new_path="$unix_path"
30064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30066    new_path="$unix_path"
30067  fi
30068
30069  if test "x$path" != "x$new_path"; then
30070    FREETYPELOCATION="$new_path"
30071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30072$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30073  fi
30074
30075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30077
30078  else
30079    # We're on a posix platform. Hooray! :)
30080    path="$FREETYPELOCATION"
30081
30082    if test ! -f "$path" && test ! -d "$path"; then
30083      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30084    fi
30085
30086    has_space=`$ECHO "$path" | $GREP " "`
30087    if test "x$has_space" != x; then
30088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30089$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30091    fi
30092  fi
30093
30094	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30095$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30096	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30097	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30098	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30099 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30100                if ! test -s "$FREETYPE2_LIBS"; then
30101		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30102		fi
30103                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30104		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30105		fi
30106                USING_SYSTEM_FT_LIB=true
30107                FREETYPE2_FOUND=yes
30108	    fi
30109	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30110$as_echo "$FREETYPE2_FOUND" >&6; }
30111        fi
30112	if test "x$FREETYPE2_FOUND" = xno; then
30113
30114pkg_failed=no
30115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30116$as_echo_n "checking for FREETYPE2... " >&6; }
30117
30118if test -n "$FREETYPE2_CFLAGS"; then
30119    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30120 elif test -n "$PKG_CONFIG"; then
30121    if test -n "$PKG_CONFIG" && \
30122    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30123  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30124  ac_status=$?
30125  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30126  test $ac_status = 0; }; then
30127  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30128else
30129  pkg_failed=yes
30130fi
30131 else
30132    pkg_failed=untried
30133fi
30134if test -n "$FREETYPE2_LIBS"; then
30135    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30136 elif test -n "$PKG_CONFIG"; then
30137    if test -n "$PKG_CONFIG" && \
30138    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30139  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30140  ac_status=$?
30141  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30142  test $ac_status = 0; }; then
30143  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30144else
30145  pkg_failed=yes
30146fi
30147 else
30148    pkg_failed=untried
30149fi
30150
30151
30152
30153if test $pkg_failed = yes; then
30154
30155if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30156        _pkg_short_errors_supported=yes
30157else
30158        _pkg_short_errors_supported=no
30159fi
30160        if test $_pkg_short_errors_supported = yes; then
30161	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30162        else
30163	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30164        fi
30165	# Put the nasty error message in config.log where it belongs
30166	echo "$FREETYPE2_PKG_ERRORS" >&5
30167
30168	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30169$as_echo "no" >&6; }
30170                FREETYPE2_FOUND=no
30171elif test $pkg_failed = untried; then
30172	FREETYPE2_FOUND=no
30173else
30174	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30175	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30177$as_echo "yes" >&6; }
30178	FREETYPE2_FOUND=yes
30179fi
30180            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30181            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30182            USING_SYSTEM_FT_LIB=true
30183            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30184            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30185              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30186            fi
30187	fi
30188	if test "x$FREETYPE2_FOUND" = xno; then
30189	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30190$as_echo_n "checking for freetype in some standard locations... " >&6; }
30191
30192	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30193	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30194	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30195	    fi
30196	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30197	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30198	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30199	    fi
30200
30201	    PREV_CXXCFLAGS="$CXXFLAGS"
30202	    PREV_LDFLAGS="$LDFLAGS"
30203	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30204	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30205	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30206/* end confdefs.h.  */
30207#include<ft2build.h>
30208	                    #include FT_FREETYPE_H
30209	                   int main() { return 0; }
30210
30211_ACEOF
30212if ac_fn_cxx_try_link "$LINENO"; then :
30213
30214	                      # Yes, the default cflags and libs did the trick.
30215	                      FREETYPE2_FOUND=yes
30216	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30217	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30218
30219else
30220
30221	                      FREETYPE2_FOUND=no
30222
30223fi
30224rm -f core conftest.err conftest.$ac_objext \
30225    conftest$ac_exeext conftest.$ac_ext
30226            CXXCFLAGS="$PREV_CXXFLAGS"
30227	    LDFLAGS="$PREV_LDFLAGS"
30228	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30229$as_echo "$FREETYPE2_FOUND" >&6; }
30230            USING_SYSTEM_FT_LIB=true
30231	fi
30232	if test "x$FREETYPE2_FOUND" = xno; then
30233
30234    # Print a helpful message on how to acquire the necessary build dependency.
30235    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30236    MISSING_DEPENDENCY=freetype2
30237    PKGHANDLER_COMMAND=
30238
30239    case $PKGHANDLER in
30240	apt-get)
30241                apt_help     $MISSING_DEPENDENCY ;;
30242    yum)
30243                yum_help     $MISSING_DEPENDENCY ;;
30244	port)
30245                port_help    $MISSING_DEPENDENCY ;;
30246	pkgutil)
30247                pkgutil_help $MISSING_DEPENDENCY ;;
30248	pkgadd)
30249                pkgadd_help  $MISSING_DEPENDENCY ;;
30250    * )
30251      break ;;
30252    esac
30253
30254    if test "x$PKGHANDLER_COMMAND" != x; then
30255        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30256    fi
30257
30258		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30259	fi
30260
30261        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30262            # AC_CHECK_LIB does not support use of cl.exe
30263            PREV_LDFLAGS="$LDFLAGS"
30264            LDFLAGS="$FREETYPE2_LIBS"
30265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30266$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30267if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30268  $as_echo_n "(cached) " >&6
30269else
30270  ac_check_lib_save_LIBS=$LIBS
30271LIBS="-lfreetype  $LIBS"
30272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30273/* end confdefs.h.  */
30274
30275/* Override any GCC internal prototype to avoid an error.
30276   Use char because int might match the return type of a GCC
30277   builtin and then its argument prototype would still apply.  */
30278#ifdef __cplusplus
30279extern "C"
30280#endif
30281char FT_Init_FreeType ();
30282int
30283main ()
30284{
30285return FT_Init_FreeType ();
30286  ;
30287  return 0;
30288}
30289_ACEOF
30290if ac_fn_cxx_try_link "$LINENO"; then :
30291  ac_cv_lib_freetype_FT_Init_FreeType=yes
30292else
30293  ac_cv_lib_freetype_FT_Init_FreeType=no
30294fi
30295rm -f core conftest.err conftest.$ac_objext \
30296    conftest$ac_exeext conftest.$ac_ext
30297LIBS=$ac_check_lib_save_LIBS
30298fi
30299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30300$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30301if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30302  FREETYPE2_FOUND=true
30303else
30304  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30305fi
30306
30307            LDFLAGS="$PREV_LDFLAGS"
30308        fi
30309fi
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319###############################################################################
30320#
30321# Check for alsa headers and libraries. Used on Linux/GNU systems.
30322#
30323
30324# Check whether --with-alsa was given.
30325if test "${with_alsa+set}" = set; then :
30326  withval=$with_alsa;
30327fi
30328
30329
30330# Check whether --with-alsa-include was given.
30331if test "${with_alsa_include+set}" = set; then :
30332  withval=$with_alsa_include;
30333fi
30334
30335
30336# Check whether --with-alsa-lib was given.
30337if test "${with_alsa_lib+set}" = set; then :
30338  withval=$with_alsa_lib;
30339fi
30340
30341
30342if test "x$ALSA_NOT_NEEDED" = xyes; then
30343	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30344		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30345$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30346	fi
30347	ALSA_CFLAGS=
30348	ALSA_LIBS=
30349else
30350	ALSA_FOUND=no
30351
30352	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30353	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30354	fi
30355
30356	if test "x${with_alsa}" != x; then
30357	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30358	    ALSA_CFLAGS="-I${with_alsa}/include"
30359	    ALSA_FOUND=yes
30360	fi
30361	if test "x${with_alsa_include}" != x; then
30362	    ALSA_CFLAGS="-I${with_alsa_include}"
30363	    ALSA_FOUND=yes
30364	fi
30365	if test "x${with_alsa_lib}" != x; then
30366	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30367	    ALSA_FOUND=yes
30368	fi
30369	if test "x$ALSA_FOUND" = xno; then
30370
30371
30372    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30373        # Source the builddeps file again, to make sure it uses the latest variables!
30374        . $builddepsfile
30375        # Look for a target and build machine specific resource!
30376        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30377        if test "x$resource" = x; then
30378            # Ok, lets instead look for a target specific resource
30379            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30380        fi
30381        if test "x$resource" = x; then
30382            # Ok, lets instead look for a build specific resource
30383            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30384        fi
30385        if test "x$resource" = x; then
30386            # Ok, lets instead look for a generic resource
30387            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30388            resource=${builddep_alsa}
30389        fi
30390        if test "x$resource" != x; then
30391            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30392$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30393	    # If the resource in the builddeps.conf file is an existing directory,
30394	    # for example /java/linux/cups
30395	    if test -d ${resource}; then
30396	       depdir=${resource}
30397	    else
30398
30399# alsa is for example mymodule
30400# $resource is for example libs/general/libmymod_1_2_3.zip
30401# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30402# $with_builddeps_dir is for example /localhome/builddeps
30403# depdir is the name of the variable into which we store the depdir, eg MYMOD
30404# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30405# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30406    filename=`basename $resource`
30407    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30408    filebase=${filename%%.*}
30409    extension=${filename#*.}
30410    installdir=$with_builddeps_dir/$filebase
30411    if test ! -f $installdir/$filename.unpacked; then
30412        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30413$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30414        if test ! -d $installdir; then
30415            mkdir -p $installdir
30416        fi
30417        if test ! -d $installdir; then
30418            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30419        fi
30420        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30421        touch $tmpfile
30422        if test ! -f $tmpfile; then
30423            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30424        fi
30425
30426    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30427    # $tmpfile is the local file name for the downloaded file.
30428    VALID_TOOL=no
30429    if test "x$BDEPS_FTP" = xwget; then
30430       VALID_TOOL=yes
30431       wget -O $tmpfile $with_builddeps_server/$resource
30432    fi
30433    if test "x$BDEPS_FTP" = xlftp; then
30434       VALID_TOOL=yes
30435       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30436    fi
30437    if test "x$BDEPS_FTP" = xftp; then
30438        VALID_TOOL=yes
30439        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30440        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30441        FTPUSERPWD=${FTPSERVER%%@*}
30442        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30443            FTPUSER=${userpwd%%:*}
30444            FTPPWD=${userpwd#*@}
30445            FTPSERVER=${FTPSERVER#*@}
30446        else
30447            FTPUSER=ftp
30448            FTPPWD=ftp
30449        fi
30450        # the "pass" command does not work on some
30451        # ftp clients (read ftp.exe) but if it works,
30452        # passive mode is better!
30453        (\
30454            echo "user $FTPUSER $FTPPWD"        ;\
30455            echo "pass"                         ;\
30456            echo "bin"                          ;\
30457            echo "get $FTPPATH $tmpfile"              ;\
30458        ) | ftp -in $FTPSERVER
30459    fi
30460    if test "x$VALID_TOOL" != xyes; then
30461       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30462    fi
30463
30464        mv $tmpfile $installdir/$filename
30465        if test ! -s $installdir/$filename; then
30466            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30467        fi
30468        case "$extension" in
30469            zip)  echo "Unzipping $installdir/$filename..."
30470               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30471            ;;
30472            tar.gz) echo "Untaring $installdir/$filename..."
30473               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30474            ;;
30475            tgz) echo "Untaring $installdir/$filename..."
30476               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30477            ;;
30478            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30479            ;;
30480        esac
30481    fi
30482    if test -f $installdir/$filename.unpacked; then
30483        depdir=$installdir
30484    fi
30485
30486	    fi
30487            # Source the builddeps file again, because in the previous command, the depdir
30488            # was updated to point at the current build dependency install directory.
30489            . $builddepsfile
30490            # Now extract variables from the builddeps.conf files.
30491            theroot=${builddep_alsa_ROOT}
30492            thecflags=${builddep_alsa_CFLAGS}
30493            thelibs=${builddep_alsa_LIBS}
30494            if test "x$depdir" = x; then
30495                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30496            fi
30497            ALSA=$depdir
30498            if test "x$theroot" != x; then
30499               ALSA="$theroot"
30500            fi
30501            if test "x$thecflags" != x; then
30502               ALSA_CFLAGS="$thecflags"
30503            fi
30504            if test "x$thelibs" != x; then
30505               ALSA_LIBS="$thelibs"
30506            fi
30507            ALSA_FOUND=yes
30508            else ALSA_FOUND=no
30509
30510        fi
30511        else ALSA_FOUND=no
30512
30513    fi
30514
30515	fi
30516	if test "x$ALSA_FOUND" = xno; then
30517
30518pkg_failed=no
30519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30520$as_echo_n "checking for ALSA... " >&6; }
30521
30522if test -n "$ALSA_CFLAGS"; then
30523    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30524 elif test -n "$PKG_CONFIG"; then
30525    if test -n "$PKG_CONFIG" && \
30526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30527  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30528  ac_status=$?
30529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30530  test $ac_status = 0; }; then
30531  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30532else
30533  pkg_failed=yes
30534fi
30535 else
30536    pkg_failed=untried
30537fi
30538if test -n "$ALSA_LIBS"; then
30539    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30540 elif test -n "$PKG_CONFIG"; then
30541    if test -n "$PKG_CONFIG" && \
30542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30543  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30544  ac_status=$?
30545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30546  test $ac_status = 0; }; then
30547  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30548else
30549  pkg_failed=yes
30550fi
30551 else
30552    pkg_failed=untried
30553fi
30554
30555
30556
30557if test $pkg_failed = yes; then
30558
30559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30560        _pkg_short_errors_supported=yes
30561else
30562        _pkg_short_errors_supported=no
30563fi
30564        if test $_pkg_short_errors_supported = yes; then
30565	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30566        else
30567	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30568        fi
30569	# Put the nasty error message in config.log where it belongs
30570	echo "$ALSA_PKG_ERRORS" >&5
30571
30572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30573$as_echo "no" >&6; }
30574                ALSA_FOUND=no
30575elif test $pkg_failed = untried; then
30576	ALSA_FOUND=no
30577else
30578	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30579	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30581$as_echo "yes" >&6; }
30582	ALSA_FOUND=yes
30583fi
30584	fi
30585	if test "x$ALSA_FOUND" = xno; then
30586	    for ac_header in alsa/asoundlib.h
30587do :
30588  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30589if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30590  cat >>confdefs.h <<_ACEOF
30591#define HAVE_ALSA_ASOUNDLIB_H 1
30592_ACEOF
30593 ALSA_FOUND=yes
30594	                      ALSA_CFLAGS=-Iignoreme
30595	                      ALSA_LIBS=-lasound
30596	                      DEFAULT_ALSA=yes
30597else
30598  ALSA_FOUND=no
30599fi
30600
30601done
30602
30603	fi
30604	if test "x$ALSA_FOUND" = xno; then
30605
30606    # Print a helpful message on how to acquire the necessary build dependency.
30607    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30608    MISSING_DEPENDENCY=alsa
30609    PKGHANDLER_COMMAND=
30610
30611    case $PKGHANDLER in
30612	apt-get)
30613                apt_help     $MISSING_DEPENDENCY ;;
30614    yum)
30615                yum_help     $MISSING_DEPENDENCY ;;
30616	port)
30617                port_help    $MISSING_DEPENDENCY ;;
30618	pkgutil)
30619                pkgutil_help $MISSING_DEPENDENCY ;;
30620	pkgadd)
30621                pkgadd_help  $MISSING_DEPENDENCY ;;
30622    * )
30623      break ;;
30624    esac
30625
30626    if test "x$PKGHANDLER_COMMAND" != x; then
30627        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30628    fi
30629
30630	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30631	fi
30632fi
30633
30634
30635
30636
30637
30638
30639
30640###############################################################################
30641#
30642# Check for the jpeg library
30643#
30644
30645USE_EXTERNAL_LIBJPEG=true
30646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30647$as_echo_n "checking for main in -ljpeg... " >&6; }
30648if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30649  $as_echo_n "(cached) " >&6
30650else
30651  ac_check_lib_save_LIBS=$LIBS
30652LIBS="-ljpeg  $LIBS"
30653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30654/* end confdefs.h.  */
30655
30656
30657int
30658main ()
30659{
30660return main ();
30661  ;
30662  return 0;
30663}
30664_ACEOF
30665if ac_fn_cxx_try_link "$LINENO"; then :
30666  ac_cv_lib_jpeg_main=yes
30667else
30668  ac_cv_lib_jpeg_main=no
30669fi
30670rm -f core conftest.err conftest.$ac_objext \
30671    conftest$ac_exeext conftest.$ac_ext
30672LIBS=$ac_check_lib_save_LIBS
30673fi
30674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30675$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30676if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30677  cat >>confdefs.h <<_ACEOF
30678#define HAVE_LIBJPEG 1
30679_ACEOF
30680
30681  LIBS="-ljpeg $LIBS"
30682
30683else
30684   USE_EXTERNAL_LIBJPEG=false
30685               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30686$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30687
30688fi
30689
30690
30691
30692###############################################################################
30693#
30694# Check for the gif library
30695#
30696
30697USE_EXTERNAL_LIBJPEG=true
30698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30699$as_echo_n "checking for main in -lgif... " >&6; }
30700if test "${ac_cv_lib_gif_main+set}" = set; then :
30701  $as_echo_n "(cached) " >&6
30702else
30703  ac_check_lib_save_LIBS=$LIBS
30704LIBS="-lgif  $LIBS"
30705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30706/* end confdefs.h.  */
30707
30708
30709int
30710main ()
30711{
30712return main ();
30713  ;
30714  return 0;
30715}
30716_ACEOF
30717if ac_fn_cxx_try_link "$LINENO"; then :
30718  ac_cv_lib_gif_main=yes
30719else
30720  ac_cv_lib_gif_main=no
30721fi
30722rm -f core conftest.err conftest.$ac_objext \
30723    conftest$ac_exeext conftest.$ac_ext
30724LIBS=$ac_check_lib_save_LIBS
30725fi
30726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30727$as_echo "$ac_cv_lib_gif_main" >&6; }
30728if test "x$ac_cv_lib_gif_main" = x""yes; then :
30729  cat >>confdefs.h <<_ACEOF
30730#define HAVE_LIBGIF 1
30731_ACEOF
30732
30733  LIBS="-lgif $LIBS"
30734
30735else
30736   USE_EXTERNAL_LIBGIF=false
30737               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30738$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30739
30740fi
30741
30742
30743
30744###############################################################################
30745#
30746# Check for the zlib library
30747#
30748
30749
30750# Check whether --with-zlib was given.
30751if test "${with_zlib+set}" = set; then :
30752  withval=$with_zlib;
30753fi
30754
30755
30756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30757$as_echo_n "checking for compress in -lz... " >&6; }
30758if test "${ac_cv_lib_z_compress+set}" = set; then :
30759  $as_echo_n "(cached) " >&6
30760else
30761  ac_check_lib_save_LIBS=$LIBS
30762LIBS="-lz  $LIBS"
30763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30764/* end confdefs.h.  */
30765
30766/* Override any GCC internal prototype to avoid an error.
30767   Use char because int might match the return type of a GCC
30768   builtin and then its argument prototype would still apply.  */
30769#ifdef __cplusplus
30770extern "C"
30771#endif
30772char compress ();
30773int
30774main ()
30775{
30776return compress ();
30777  ;
30778  return 0;
30779}
30780_ACEOF
30781if ac_fn_cxx_try_link "$LINENO"; then :
30782  ac_cv_lib_z_compress=yes
30783else
30784  ac_cv_lib_z_compress=no
30785fi
30786rm -f core conftest.err conftest.$ac_objext \
30787    conftest$ac_exeext conftest.$ac_ext
30788LIBS=$ac_check_lib_save_LIBS
30789fi
30790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30791$as_echo "$ac_cv_lib_z_compress" >&6; }
30792if test "x$ac_cv_lib_z_compress" = x""yes; then :
30793   ZLIB_FOUND=yes
30794else
30795   ZLIB_FOUND=no
30796fi
30797
30798
30799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30800$as_echo_n "checking for which zlib to use... " >&6; }
30801
30802DEFAULT_ZLIB=bundled
30803if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30804#
30805# On macosx default is system...on others default is
30806#
30807    DEFAULT_ZLIB=system
30808fi
30809
30810if test "x${ZLIB_FOUND}" != "xyes"; then
30811#
30812# If we don't find any system...set default to bundled
30813#
30814    DEFAULT_ZLIB=bundled
30815fi
30816
30817#
30818# If user didn't specify, use DEFAULT_ZLIB
30819#
30820if test "x${with_zlib}" = "x"; then
30821    with_zlib=${DEFAULT_ZLIB}
30822fi
30823
30824if test "x${with_zlib}" = "xbundled"; then
30825    USE_EXTERNAL_LIBZ=false
30826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30827$as_echo "bundled" >&6; }
30828elif test "x${with_zlib}" = "xsystem"; then
30829    if test "x${ZLIB_FOUND}" = "xyes"; then
30830        USE_EXTERNAL_LIBZ=true
30831        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30832$as_echo "system" >&6; }
30833    else
30834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30835$as_echo "system not found" >&6; }
30836        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30837    fi
30838else
30839    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30840fi
30841
30842
30843
30844###############################################################################
30845LIBZIP_CAN_USE_MMAP=true
30846
30847
30848
30849###############################################################################
30850#
30851# Check if altzone exists in time.h
30852#
30853
30854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30855/* end confdefs.h.  */
30856#include <time.h>
30857int
30858main ()
30859{
30860return (int)altzone;
30861  ;
30862  return 0;
30863}
30864_ACEOF
30865if ac_fn_cxx_try_link "$LINENO"; then :
30866  has_altzone=yes
30867else
30868  has_altzone=no
30869fi
30870rm -f core conftest.err conftest.$ac_objext \
30871    conftest$ac_exeext conftest.$ac_ext
30872if test "x$has_altzone" = xyes; then
30873
30874$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30875
30876fi
30877
30878###############################################################################
30879#
30880# Check the maths library
30881#
30882
30883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30884$as_echo_n "checking for cos in -lm... " >&6; }
30885if test "${ac_cv_lib_m_cos+set}" = set; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888  ac_check_lib_save_LIBS=$LIBS
30889LIBS="-lm  $LIBS"
30890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891/* end confdefs.h.  */
30892
30893/* Override any GCC internal prototype to avoid an error.
30894   Use char because int might match the return type of a GCC
30895   builtin and then its argument prototype would still apply.  */
30896#ifdef __cplusplus
30897extern "C"
30898#endif
30899char cos ();
30900int
30901main ()
30902{
30903return cos ();
30904  ;
30905  return 0;
30906}
30907_ACEOF
30908if ac_fn_cxx_try_link "$LINENO"; then :
30909  ac_cv_lib_m_cos=yes
30910else
30911  ac_cv_lib_m_cos=no
30912fi
30913rm -f core conftest.err conftest.$ac_objext \
30914    conftest$ac_exeext conftest.$ac_ext
30915LIBS=$ac_check_lib_save_LIBS
30916fi
30917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30918$as_echo "$ac_cv_lib_m_cos" >&6; }
30919if test "x$ac_cv_lib_m_cos" = x""yes; then :
30920  cat >>confdefs.h <<_ACEOF
30921#define HAVE_LIBM 1
30922_ACEOF
30923
30924  LIBS="-lm $LIBS"
30925
30926else
30927
30928                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30929$as_echo "$as_me: Maths library was not found" >&6;}
30930
30931fi
30932
30933
30934
30935###############################################################################
30936#
30937# Check for libdl.so
30938
30939save_LIBS="$LIBS"
30940LIBS=""
30941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30942$as_echo_n "checking for dlopen in -ldl... " >&6; }
30943if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30944  $as_echo_n "(cached) " >&6
30945else
30946  ac_check_lib_save_LIBS=$LIBS
30947LIBS="-ldl  $LIBS"
30948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30949/* end confdefs.h.  */
30950
30951/* Override any GCC internal prototype to avoid an error.
30952   Use char because int might match the return type of a GCC
30953   builtin and then its argument prototype would still apply.  */
30954#ifdef __cplusplus
30955extern "C"
30956#endif
30957char dlopen ();
30958int
30959main ()
30960{
30961return dlopen ();
30962  ;
30963  return 0;
30964}
30965_ACEOF
30966if ac_fn_cxx_try_link "$LINENO"; then :
30967  ac_cv_lib_dl_dlopen=yes
30968else
30969  ac_cv_lib_dl_dlopen=no
30970fi
30971rm -f core conftest.err conftest.$ac_objext \
30972    conftest$ac_exeext conftest.$ac_ext
30973LIBS=$ac_check_lib_save_LIBS
30974fi
30975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30976$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30977if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30978  cat >>confdefs.h <<_ACEOF
30979#define HAVE_LIBDL 1
30980_ACEOF
30981
30982  LIBS="-ldl $LIBS"
30983
30984fi
30985
30986LIBDL="$LIBS"
30987
30988LIBS="$save_LIBS"
30989
30990
30991
30992###############################################################################
30993#
30994# statically link libstdc++ before C++ ABI is stablized on Linux unless
30995# dynamic build is configured on command line.
30996#
30997
30998# Check whether --with-stdc++lib was given.
30999if test "${with_stdc__lib+set}" = set; then :
31000  withval=$with_stdc__lib;
31001    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31002        && test "x$with_stdc__lib" != xdefault; then
31003      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31004    fi
31005
31006else
31007  with_stdc__lib=default
31008
31009fi
31010
31011
31012if test "x$OPENJDK_TARGET_OS" = xlinux; then
31013    # Test if -lstdc++ works.
31014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31015$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31016    ac_ext=cpp
31017ac_cpp='$CXXCPP $CPPFLAGS'
31018ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31019ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31020ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31021
31022    OLD_CXXFLAGS="$CXXFLAGS"
31023    CXXFLAGS="$CXXFLAGS -lstdc++"
31024    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31025/* end confdefs.h.  */
31026
31027int
31028main ()
31029{
31030return 0;
31031  ;
31032  return 0;
31033}
31034_ACEOF
31035if ac_fn_cxx_try_link "$LINENO"; then :
31036  has_dynamic_libstdcxx=yes
31037else
31038  has_dynamic_libstdcxx=no
31039fi
31040rm -f core conftest.err conftest.$ac_objext \
31041    conftest$ac_exeext conftest.$ac_ext
31042    CXXFLAGS="$OLD_CXXFLAGS"
31043    ac_ext=cpp
31044ac_cpp='$CXXCPP $CPPFLAGS'
31045ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31046ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31047ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31048
31049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31050$as_echo "$has_dynamic_libstdcxx" >&6; }
31051
31052    # Test if stdc++ can be linked statically.
31053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31054$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31055    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31056    ac_ext=cpp
31057ac_cpp='$CXXCPP $CPPFLAGS'
31058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31061
31062    OLD_LIBS="$LIBS"
31063    OLD_CXX="$CXX"
31064    LIBS="$STATIC_STDCXX_FLAGS"
31065    CXX="$CC"
31066    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31067/* end confdefs.h.  */
31068
31069int
31070main ()
31071{
31072return 0;
31073  ;
31074  return 0;
31075}
31076_ACEOF
31077if ac_fn_cxx_try_link "$LINENO"; then :
31078  has_static_libstdcxx=yes
31079else
31080  has_static_libstdcxx=no
31081fi
31082rm -f core conftest.err conftest.$ac_objext \
31083    conftest$ac_exeext conftest.$ac_ext
31084    LIBS="$OLD_LIBS"
31085    CXX="$OLD_CXX"
31086    ac_ext=cpp
31087ac_cpp='$CXXCPP $CPPFLAGS'
31088ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31089ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31090ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31091
31092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31093$as_echo "$has_static_libstdcxx" >&6; }
31094
31095    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31096        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31097    fi
31098
31099    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31100        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31101    fi
31102
31103    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31104        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31105    fi
31106
31107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31108$as_echo_n "checking how to link with libstdc++... " >&6; }
31109    # If dynamic was requested, it's available since it would fail above otherwise.
31110    # If dynamic wasn't requested, go with static unless it isn't available.
31111    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31112        LIBCXX="$LIBCXX -lstdc++"
31113        LDCXX="$CXX"
31114        STATIC_CXX_SETTING="STATIC_CXX=false"
31115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31116$as_echo "dynamic" >&6; }
31117    else
31118        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31119        LDCXX="$CC"
31120        STATIC_CXX_SETTING="STATIC_CXX=true"
31121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31122$as_echo "static" >&6; }
31123    fi
31124fi
31125
31126
31127# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31128if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31129    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31130fi
31131
31132# TODO better (platform agnostic) test
31133if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31134    LIBCXX="-lstdc++"
31135fi
31136
31137
31138
31139
31140
31141# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31142
31143# When using cygwin or msys, we need a wrapper binary that renames
31144# /cygdrive/c/ arguments into c:/ arguments and peeks into
31145# @files and rewrites these too! This wrapper binary is
31146# called fixpath.
31147FIXPATH=
31148if test "x$OPENJDK_BUILD_OS" = xwindows; then
31149    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31150$as_echo_n "checking if fixpath can be created... " >&6; }
31151    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31152    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31153    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31154      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31155      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31156      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31157      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31158    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31159      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31160      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31161
31162      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31163      # @ was chosen as separator to minimize risk of other tools messing around with it
31164      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31165      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31166
31167      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31168    fi
31169    rm -f $OUTPUT_ROOT/fixpath*
31170    cd $OUTPUT_ROOT
31171    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31172    cd $CURDIR
31173
31174    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31176$as_echo "no" >&6; }
31177        cat $OUTPUT_ROOT/fixpath1.log
31178        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31179    fi
31180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31181$as_echo "yes" >&6; }
31182    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31183$as_echo_n "checking if fixpath.exe works... " >&6; }
31184    cd $OUTPUT_ROOT
31185    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31186    cd $CURDIR
31187    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31189$as_echo "no" >&6; }
31190        cat $OUTPUT_ROOT/fixpath2.log
31191        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31192    fi
31193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31194$as_echo "yes" >&6; }
31195    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31196fi
31197
31198
31199
31200
31201###############################################################################
31202#
31203# We need to do some final tweaking, when everything else is done.
31204#
31205###############################################################################
31206
31207
31208HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31209
31210
31211# The name of the Service Agent jar.
31212SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31213if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31214  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31215fi
31216
31217
31218
31219
31220###############################################################################
31221#
31222# Configure parts of the build that only affect the build performance,
31223# not the result.
31224#
31225###############################################################################
31226
31227
31228# How many cores do we have on this build system?
31229
31230# Check whether --with-num-cores was given.
31231if test "${with_num_cores+set}" = set; then :
31232  withval=$with_num_cores;
31233fi
31234
31235if test "x$with_num_cores" = x; then
31236    # The number of cores were not specified, try to probe them.
31237
31238    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31239$as_echo_n "checking for number of cores... " >&6; }
31240    NUM_CORES=1
31241    FOUND_CORES=no
31242
31243    if test -f /proc/cpuinfo; then
31244        # Looks like a Linux (or cygwin) system
31245        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31246        FOUND_CORES=yes
31247    elif test -x /usr/sbin/psrinfo; then
31248        # Looks like a Solaris system
31249        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31250        FOUND_CORES=yes
31251    elif test -x /usr/sbin/system_profiler; then
31252        # Looks like a MacOSX system
31253        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31254        FOUND_CORES=yes
31255    elif test -n "$NUMBER_OF_PROCESSORS"; then
31256        # On windows, look in the env
31257        NUM_CORES=$NUMBER_OF_PROCESSORS
31258        FOUND_CORES=yes
31259    fi
31260
31261    # For c/c++ code we run twice as many concurrent build
31262    # jobs than we have cores, otherwise we will stall on io.
31263    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31264
31265    if test "x$FOUND_CORES" = xyes; then
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31267$as_echo "$NUM_CORES" >&6; }
31268    else
31269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31270$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31272$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31273    fi
31274
31275
31276else
31277    NUM_CORES=$with_num_cores
31278    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31279fi
31280
31281
31282
31283
31284# How much memory do we have on this build system?
31285
31286# Check whether --with-memory-size was given.
31287if test "${with_memory_size+set}" = set; then :
31288  withval=$with_memory_size;
31289fi
31290
31291if test "x$with_memory_size" = x; then
31292    # The memory size was not specified, try to probe it.
31293
31294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31295$as_echo_n "checking for memory size... " >&6; }
31296    # Default to 1024 MB
31297    MEMORY_SIZE=1024
31298    FOUND_MEM=no
31299
31300    if test -f /proc/meminfo; then
31301        # Looks like a Linux (or cygwin) system
31302        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31303        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31304        FOUND_MEM=yes
31305    elif test -x /usr/sbin/prtconf; then
31306        # Looks like a Solaris system
31307        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31308        FOUND_MEM=yes
31309    elif test -x /usr/sbin/system_profiler; then
31310        # Looks like a MacOSX system
31311        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31312        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31313        FOUND_MEM=yes
31314    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31315        # Windows, but without cygwin
31316        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31317        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31318        FOUND_MEM=yes
31319    fi
31320
31321    if test "x$FOUND_MEM" = xyes; then
31322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31323$as_echo "$MEMORY_SIZE MB" >&6; }
31324    else
31325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31326$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31328$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31329    fi
31330
31331else
31332    MEMORY_SIZE=$with_memory_size
31333fi
31334
31335
31336
31337# Setup smart javac (after cores and memory have been setup)
31338
31339
31340# Check whether --with-sjavac-server-java was given.
31341if test "${with_sjavac_server_java+set}" = set; then :
31342  withval=$with_sjavac_server_java;
31343fi
31344
31345
31346if test "x$with_sjavac_server_java" != x; then
31347    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31348    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31349    if test "x$FOUND_VERSION" = x; then
31350        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31351    fi
31352else
31353    SJAVAC_SERVER_JAVA=""
31354    # Hotspot specific options.
31355
31356    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31357    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31358    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31359    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31360    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31361        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31362    fi
31363
31364    # JRockit specific options.
31365
31366    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31367    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31368    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31369    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31370    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31371        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31372    fi
31373
31374    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31375fi
31376
31377
31378
31379# Check whether --with-sjavac-server-cores was given.
31380if test "${with_sjavac_server_cores+set}" = set; then :
31381  withval=$with_sjavac_server_cores;
31382fi
31383
31384if test "x$with_sjavac_server_cores" != x; then
31385    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31386else
31387    if test "$NUM_CORES" -gt 16; then
31388        # We set this arbitrary limit because we want to limit the heap
31389        # size of the javac server.
31390        # In the future we will make the javac compilers in the server
31391        # share more and more state, thus enabling us to use more and
31392        # more concurrent threads in the server.
31393        SJAVAC_SERVER_CORES="16"
31394    else
31395        SJAVAC_SERVER_CORES="$NUM_CORES"
31396    fi
31397
31398    if test "$MEMORY_SIZE" -gt "17000"; then
31399        MAX_HEAP_MEM=10000
31400
31401    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31402    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31403    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31404    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31405    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31406        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31407    fi
31408
31409
31410    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31411    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31412    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31413    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31414    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31415        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31416    fi
31417
31418    elif test "$MEMORY_SIZE" -gt "10000"; then
31419        MAX_HEAP_MEM=6000
31420
31421    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31422    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31423    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31424    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31425    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31426        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31427    fi
31428
31429
31430    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31431    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31432    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31433    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31434    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31435        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31436    fi
31437
31438    elif test "$MEMORY_SIZE" -gt "5000"; then
31439        MAX_HEAP_MEM=3000
31440
31441    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31442    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31443    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31444    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31445    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31446        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31447    fi
31448
31449
31450    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31451    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31452    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31453    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31454    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31455        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31456    fi
31457
31458    elif test "$MEMORY_SIZE" -gt "3800"; then
31459        MAX_HEAP_MEM=2500
31460
31461    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31462    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31463    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31464    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31465    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31466        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31467    fi
31468
31469    elif test "$MEMORY_SIZE" -gt "1900"; then
31470        MAX_HEAP_MEM=1200
31471
31472    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31473    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31474    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31475    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31476    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31477        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31478    fi
31479
31480    elif test "$MEMORY_SIZE" -gt "1000"; then
31481        MAX_HEAP_MEM=900
31482
31483    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31484    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31485    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31486    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31487    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31488        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31489    fi
31490
31491    else
31492        MAX_HEAP_MEM=512
31493
31494    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31495    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31496    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31497    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31498    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31499        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31500    fi
31501
31502    fi
31503
31504
31505    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31506    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31507    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31508    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31509    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31510        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31511    fi
31512
31513
31514    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31515    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31516    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31517    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31518    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31519        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31520    fi
31521
31522
31523    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31524    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31525    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31526    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31527    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31528        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31529    fi
31530
31531
31532    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31533    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31534        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31535$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31536        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31538$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31539    fi
31540fi
31541
31542
31543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31544$as_echo_n "checking whether to use sjavac... " >&6; }
31545# Check whether --enable-sjavac was given.
31546if test "${enable_sjavac+set}" = set; then :
31547  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31548else
31549  ENABLE_SJAVAC='no'
31550fi
31551
31552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31553$as_echo "$ENABLE_SJAVAC" >&6; }
31554
31555
31556if test "x$ENABLE_SJAVAC" = xyes; then
31557    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31558else
31559    SJAVAC_SERVER_DIR=
31560fi
31561
31562
31563
31564
31565# Can the C/C++ compiler use precompiled headers?
31566
31567
31568###############################################################################
31569#
31570# Can the C/C++ compiler use precompiled headers?
31571#
31572# Check whether --enable-precompiled-headers was given.
31573if test "${enable_precompiled_headers+set}" = set; then :
31574  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31575else
31576  ENABLE_PRECOMPH=yes
31577fi
31578
31579
31580USE_PRECOMPILED_HEADER=1
31581if test "x$ENABLE_PRECOMPH" = xno; then
31582    USE_PRECOMPILED_HEADER=0
31583fi
31584
31585if test "x$ENABLE_PRECOMPH" = xyes; then
31586    # Check that the compiler actually supports precomp headers.
31587    if test "x$GCC" = xyes; then
31588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31589$as_echo_n "checking that precompiled headers work... " >&6; }
31590         echo "int alfa();" > conftest.h
31591         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31592         if test ! -f conftest.hpp.gch; then
31593             USE_PRECOMPILED_HEADER=0
31594             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31595$as_echo "no" >&6; }
31596         else
31597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31598$as_echo "yes" >&6; }
31599         fi
31600         rm -f conftest.h conftest.hpp.gch
31601    fi
31602fi
31603
31604
31605
31606
31607# Setup use of ccache, if available
31608
31609    # Check whether --enable-ccache was given.
31610if test "${enable_ccache+set}" = set; then :
31611  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31612else
31613  ENABLE_CCACHE=yes
31614fi
31615
31616    if test "x$ENABLE_CCACHE" = xyes; then
31617        # Extract the first word of "ccache", so it can be a program name with args.
31618set dummy ccache; ac_word=$2
31619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31620$as_echo_n "checking for $ac_word... " >&6; }
31621if test "${ac_cv_path_CCACHE+set}" = set; then :
31622  $as_echo_n "(cached) " >&6
31623else
31624  case $CCACHE in
31625  [\\/]* | ?:[\\/]*)
31626  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31627  ;;
31628  *)
31629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31630for as_dir in $PATH
31631do
31632  IFS=$as_save_IFS
31633  test -z "$as_dir" && as_dir=.
31634    for ac_exec_ext in '' $ac_executable_extensions; do
31635  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31636    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31638    break 2
31639  fi
31640done
31641  done
31642IFS=$as_save_IFS
31643
31644  ;;
31645esac
31646fi
31647CCACHE=$ac_cv_path_CCACHE
31648if test -n "$CCACHE"; then
31649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31650$as_echo "$CCACHE" >&6; }
31651else
31652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31653$as_echo "no" >&6; }
31654fi
31655
31656
31657    else
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31659$as_echo_n "checking for ccache... " >&6; }
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31661$as_echo "explicitly disabled" >&6; }
31662        CCACHE=
31663    fi
31664
31665
31666
31667# Check whether --with-ccache-dir was given.
31668if test "${with_ccache_dir+set}" = set; then :
31669  withval=$with_ccache_dir;
31670fi
31671
31672
31673    if test "x$with_ccache_dir" != x; then
31674        # When using a non home ccache directory, assume the use is to share ccache files
31675        # with other users. Thus change the umask.
31676        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31677    fi
31678    CCACHE_FOUND=""
31679    if test "x$CCACHE" != x; then
31680
31681    if test "x$CCACHE" != x; then
31682        CCACHE_FOUND="true"
31683        # Only use ccache if it is 3.1.4 or later, which supports
31684        # precompiled headers.
31685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31686$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31687        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31688        if test "x$HAS_GOOD_CCACHE" = x; then
31689            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31690$as_echo "no, disabling ccache" >&6; }
31691            CCACHE=
31692        else
31693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31694$as_echo "yes" >&6; }
31695            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31696$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31697            PUSHED_FLAGS="$CXXFLAGS"
31698            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31699            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31700/* end confdefs.h.  */
31701
31702int
31703main ()
31704{
31705
31706  ;
31707  return 0;
31708}
31709_ACEOF
31710if ac_fn_cxx_try_compile "$LINENO"; then :
31711  CC_KNOWS_CCACHE_TRICK=yes
31712else
31713  CC_KNOWS_CCACHE_TRICK=no
31714fi
31715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31716            CXXFLAGS="$PUSHED_FLAGS"
31717            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31718                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31719$as_echo "yes" >&6; }
31720            else
31721                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31722$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31723                CCACHE=
31724            fi
31725        fi
31726    fi
31727
31728    if test "x$CCACHE" != x; then
31729        CCACHE_SLOPPINESS=time_macros
31730        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31731        CCACHE_FLAGS=-fpch-preprocess
31732
31733        if test "x$SET_CCACHE_DIR" != x; then
31734            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31735	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31736        fi
31737    fi
31738
31739    fi
31740
31741
31742###############################################################################
31743#
31744# And now the finish...
31745#
31746###############################################################################
31747
31748# Check for some common pitfalls
31749
31750  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31751    file_to_test="$SRC_ROOT/LICENSE"
31752    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31753      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
31754    fi
31755  fi
31756
31757
31758
31759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31760$as_echo_n "checking if build directory is on local disk... " >&6; }
31761
31762	# df -l lists only local disks; if the given directory is not found then
31763	# a non-zero exit code is given
31764  if test "x$DF" = x; then
31765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31766      # msys does not have df; use Windows "net use" instead.
31767      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31768      if test "x$IS_NETWORK_DISK" = x; then
31769        OUTPUT_DIR_IS_LOCAL="yes"
31770      else
31771        OUTPUT_DIR_IS_LOCAL="no"
31772      fi
31773    else
31774      # No df here, say it's local
31775      OUTPUT_DIR_IS_LOCAL="yes"
31776    fi
31777  else
31778    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31779      OUTPUT_DIR_IS_LOCAL="yes"
31780    else
31781      OUTPUT_DIR_IS_LOCAL="no"
31782    fi
31783  fi
31784
31785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31786$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31787
31788
31789
31790# Check if the user has any old-style ALT_ variables set.
31791FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31792
31793# Before generating output files, test if they exist. If they do, this is a reconfigure.
31794# Since we can't properly handle the dependencies for this, warn the user about the situation
31795if test -e $OUTPUT_ROOT/spec.gmk; then
31796  IS_RECONFIGURE=yes
31797else
31798  IS_RECONFIGURE=no
31799fi
31800
31801if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31802  HIDE_PERFORMANCE_HINTS=yes
31803else
31804  HIDE_PERFORMANCE_HINTS=no
31805  # Hide it the next time around...
31806  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31807fi
31808
31809
31810
31811# At the end, call the custom hook. (Dummy macro if no custom sources available)
31812
31813
31814# We're messing a bit with internal autoconf variables to put the config.status
31815# in the output directory instead of the current directory.
31816CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31817# Create the actual output files. Now the main work of configure is done.
31818cat >confcache <<\_ACEOF
31819# This file is a shell script that caches the results of configure
31820# tests run on this system so they can be shared between configure
31821# scripts and configure runs, see configure's option --config-cache.
31822# It is not useful on other systems.  If it contains results you don't
31823# want to keep, you may remove or edit it.
31824#
31825# config.status only pays attention to the cache file if you give it
31826# the --recheck option to rerun configure.
31827#
31828# `ac_cv_env_foo' variables (set or unset) will be overridden when
31829# loading this file, other *unset* `ac_cv_foo' will be assigned the
31830# following values.
31831
31832_ACEOF
31833
31834# The following way of writing the cache mishandles newlines in values,
31835# but we know of no workaround that is simple, portable, and efficient.
31836# So, we kill variables containing newlines.
31837# Ultrix sh set writes to stderr and can't be redirected directly,
31838# and sets the high bit in the cache file unless we assign to the vars.
31839(
31840  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31841    eval ac_val=\$$ac_var
31842    case $ac_val in #(
31843    *${as_nl}*)
31844      case $ac_var in #(
31845      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31846$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31847      esac
31848      case $ac_var in #(
31849      _ | IFS | as_nl) ;; #(
31850      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31851      *) { eval $ac_var=; unset $ac_var;} ;;
31852      esac ;;
31853    esac
31854  done
31855
31856  (set) 2>&1 |
31857    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31858    *${as_nl}ac_space=\ *)
31859      # `set' does not quote correctly, so add quotes: double-quote
31860      # substitution turns \\\\ into \\, and sed turns \\ into \.
31861      sed -n \
31862	"s/'/'\\\\''/g;
31863	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31864      ;; #(
31865    *)
31866      # `set' quotes correctly as required by POSIX, so do not add quotes.
31867      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31868      ;;
31869    esac |
31870    sort
31871) |
31872  sed '
31873     /^ac_cv_env_/b end
31874     t clear
31875     :clear
31876     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31877     t end
31878     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31879     :end' >>confcache
31880if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31881  if test -w "$cache_file"; then
31882    test "x$cache_file" != "x/dev/null" &&
31883      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31884$as_echo "$as_me: updating cache $cache_file" >&6;}
31885    cat confcache >$cache_file
31886  else
31887    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31888$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31889  fi
31890fi
31891rm -f confcache
31892
31893test "x$prefix" = xNONE && prefix=$ac_default_prefix
31894# Let make expand exec_prefix.
31895test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31896
31897DEFS=-DHAVE_CONFIG_H
31898
31899ac_libobjs=
31900ac_ltlibobjs=
31901U=
31902for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31903  # 1. Remove the extension, and $U if already installed.
31904  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31905  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31906  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31907  #    will be set to the directory where LIBOBJS objects are built.
31908  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31909  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31910done
31911LIBOBJS=$ac_libobjs
31912
31913LTLIBOBJS=$ac_ltlibobjs
31914
31915
31916
31917: ${CONFIG_STATUS=./config.status}
31918ac_write_fail=0
31919ac_clean_files_save=$ac_clean_files
31920ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31921{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31922$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31923as_write_fail=0
31924cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31925#! $SHELL
31926# Generated by $as_me.
31927# Run this file to recreate the current configuration.
31928# Compiler output produced by configure, useful for debugging
31929# configure, is in config.log if it exists.
31930
31931debug=false
31932ac_cs_recheck=false
31933ac_cs_silent=false
31934
31935SHELL=\${CONFIG_SHELL-$SHELL}
31936export SHELL
31937_ASEOF
31938cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31939## -------------------- ##
31940## M4sh Initialization. ##
31941## -------------------- ##
31942
31943# Be more Bourne compatible
31944DUALCASE=1; export DUALCASE # for MKS sh
31945if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31946  emulate sh
31947  NULLCMD=:
31948  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31949  # is contrary to our usage.  Disable this feature.
31950  alias -g '${1+"$@"}'='"$@"'
31951  setopt NO_GLOB_SUBST
31952else
31953  case `(set -o) 2>/dev/null` in #(
31954  *posix*) :
31955    set -o posix ;; #(
31956  *) :
31957     ;;
31958esac
31959fi
31960
31961
31962as_nl='
31963'
31964export as_nl
31965# Printing a long string crashes Solaris 7 /usr/bin/printf.
31966as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31967as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31968as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31969# Prefer a ksh shell builtin over an external printf program on Solaris,
31970# but without wasting forks for bash or zsh.
31971if test -z "$BASH_VERSION$ZSH_VERSION" \
31972    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31973  as_echo='print -r --'
31974  as_echo_n='print -rn --'
31975elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31976  as_echo='printf %s\n'
31977  as_echo_n='printf %s'
31978else
31979  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31980    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31981    as_echo_n='/usr/ucb/echo -n'
31982  else
31983    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31984    as_echo_n_body='eval
31985      arg=$1;
31986      case $arg in #(
31987      *"$as_nl"*)
31988	expr "X$arg" : "X\\(.*\\)$as_nl";
31989	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31990      esac;
31991      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31992    '
31993    export as_echo_n_body
31994    as_echo_n='sh -c $as_echo_n_body as_echo'
31995  fi
31996  export as_echo_body
31997  as_echo='sh -c $as_echo_body as_echo'
31998fi
31999
32000# The user is always right.
32001if test "${PATH_SEPARATOR+set}" != set; then
32002  PATH_SEPARATOR=:
32003  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32004    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32005      PATH_SEPARATOR=';'
32006  }
32007fi
32008
32009
32010# IFS
32011# We need space, tab and new line, in precisely that order.  Quoting is
32012# there to prevent editors from complaining about space-tab.
32013# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32014# splitting by setting IFS to empty value.)
32015IFS=" ""	$as_nl"
32016
32017# Find who we are.  Look in the path if we contain no directory separator.
32018case $0 in #((
32019  *[\\/]* ) as_myself=$0 ;;
32020  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32021for as_dir in $PATH
32022do
32023  IFS=$as_save_IFS
32024  test -z "$as_dir" && as_dir=.
32025    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32026  done
32027IFS=$as_save_IFS
32028
32029     ;;
32030esac
32031# We did not find ourselves, most probably we were run as `sh COMMAND'
32032# in which case we are not to be found in the path.
32033if test "x$as_myself" = x; then
32034  as_myself=$0
32035fi
32036if test ! -f "$as_myself"; then
32037  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32038  exit 1
32039fi
32040
32041# Unset variables that we do not need and which cause bugs (e.g. in
32042# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32043# suppresses any "Segmentation fault" message there.  '((' could
32044# trigger a bug in pdksh 5.2.14.
32045for as_var in BASH_ENV ENV MAIL MAILPATH
32046do eval test x\${$as_var+set} = xset \
32047  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32048done
32049PS1='$ '
32050PS2='> '
32051PS4='+ '
32052
32053# NLS nuisances.
32054LC_ALL=C
32055export LC_ALL
32056LANGUAGE=C
32057export LANGUAGE
32058
32059# CDPATH.
32060(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32061
32062
32063# as_fn_error STATUS ERROR [LINENO LOG_FD]
32064# ----------------------------------------
32065# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32066# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32067# script with STATUS, using 1 if that was 0.
32068as_fn_error ()
32069{
32070  as_status=$1; test $as_status -eq 0 && as_status=1
32071  if test "$4"; then
32072    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32073    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32074  fi
32075  $as_echo "$as_me: error: $2" >&2
32076  as_fn_exit $as_status
32077} # as_fn_error
32078
32079
32080# as_fn_set_status STATUS
32081# -----------------------
32082# Set $? to STATUS, without forking.
32083as_fn_set_status ()
32084{
32085  return $1
32086} # as_fn_set_status
32087
32088# as_fn_exit STATUS
32089# -----------------
32090# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32091as_fn_exit ()
32092{
32093  set +e
32094  as_fn_set_status $1
32095  exit $1
32096} # as_fn_exit
32097
32098# as_fn_unset VAR
32099# ---------------
32100# Portably unset VAR.
32101as_fn_unset ()
32102{
32103  { eval $1=; unset $1;}
32104}
32105as_unset=as_fn_unset
32106# as_fn_append VAR VALUE
32107# ----------------------
32108# Append the text in VALUE to the end of the definition contained in VAR. Take
32109# advantage of any shell optimizations that allow amortized linear growth over
32110# repeated appends, instead of the typical quadratic growth present in naive
32111# implementations.
32112if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32113  eval 'as_fn_append ()
32114  {
32115    eval $1+=\$2
32116  }'
32117else
32118  as_fn_append ()
32119  {
32120    eval $1=\$$1\$2
32121  }
32122fi # as_fn_append
32123
32124# as_fn_arith ARG...
32125# ------------------
32126# Perform arithmetic evaluation on the ARGs, and store the result in the
32127# global $as_val. Take advantage of shells that can avoid forks. The arguments
32128# must be portable across $(()) and expr.
32129if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32130  eval 'as_fn_arith ()
32131  {
32132    as_val=$(( $* ))
32133  }'
32134else
32135  as_fn_arith ()
32136  {
32137    as_val=`expr "$@" || test $? -eq 1`
32138  }
32139fi # as_fn_arith
32140
32141
32142if expr a : '\(a\)' >/dev/null 2>&1 &&
32143   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32144  as_expr=expr
32145else
32146  as_expr=false
32147fi
32148
32149if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32150  as_basename=basename
32151else
32152  as_basename=false
32153fi
32154
32155if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32156  as_dirname=dirname
32157else
32158  as_dirname=false
32159fi
32160
32161as_me=`$as_basename -- "$0" ||
32162$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32163	 X"$0" : 'X\(//\)$' \| \
32164	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32165$as_echo X/"$0" |
32166    sed '/^.*\/\([^/][^/]*\)\/*$/{
32167	    s//\1/
32168	    q
32169	  }
32170	  /^X\/\(\/\/\)$/{
32171	    s//\1/
32172	    q
32173	  }
32174	  /^X\/\(\/\).*/{
32175	    s//\1/
32176	    q
32177	  }
32178	  s/.*/./; q'`
32179
32180# Avoid depending upon Character Ranges.
32181as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32182as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32183as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32184as_cr_digits='0123456789'
32185as_cr_alnum=$as_cr_Letters$as_cr_digits
32186
32187ECHO_C= ECHO_N= ECHO_T=
32188case `echo -n x` in #(((((
32189-n*)
32190  case `echo 'xy\c'` in
32191  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32192  xy)  ECHO_C='\c';;
32193  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32194       ECHO_T='	';;
32195  esac;;
32196*)
32197  ECHO_N='-n';;
32198esac
32199
32200rm -f conf$$ conf$$.exe conf$$.file
32201if test -d conf$$.dir; then
32202  rm -f conf$$.dir/conf$$.file
32203else
32204  rm -f conf$$.dir
32205  mkdir conf$$.dir 2>/dev/null
32206fi
32207if (echo >conf$$.file) 2>/dev/null; then
32208  if ln -s conf$$.file conf$$ 2>/dev/null; then
32209    as_ln_s='ln -s'
32210    # ... but there are two gotchas:
32211    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32212    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32213    # In both cases, we have to default to `cp -p'.
32214    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32215      as_ln_s='cp -p'
32216  elif ln conf$$.file conf$$ 2>/dev/null; then
32217    as_ln_s=ln
32218  else
32219    as_ln_s='cp -p'
32220  fi
32221else
32222  as_ln_s='cp -p'
32223fi
32224rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32225rmdir conf$$.dir 2>/dev/null
32226
32227
32228# as_fn_mkdir_p
32229# -------------
32230# Create "$as_dir" as a directory, including parents if necessary.
32231as_fn_mkdir_p ()
32232{
32233
32234  case $as_dir in #(
32235  -*) as_dir=./$as_dir;;
32236  esac
32237  test -d "$as_dir" || eval $as_mkdir_p || {
32238    as_dirs=
32239    while :; do
32240      case $as_dir in #(
32241      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32242      *) as_qdir=$as_dir;;
32243      esac
32244      as_dirs="'$as_qdir' $as_dirs"
32245      as_dir=`$as_dirname -- "$as_dir" ||
32246$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32247	 X"$as_dir" : 'X\(//\)[^/]' \| \
32248	 X"$as_dir" : 'X\(//\)$' \| \
32249	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32250$as_echo X"$as_dir" |
32251    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32252	    s//\1/
32253	    q
32254	  }
32255	  /^X\(\/\/\)[^/].*/{
32256	    s//\1/
32257	    q
32258	  }
32259	  /^X\(\/\/\)$/{
32260	    s//\1/
32261	    q
32262	  }
32263	  /^X\(\/\).*/{
32264	    s//\1/
32265	    q
32266	  }
32267	  s/.*/./; q'`
32268      test -d "$as_dir" && break
32269    done
32270    test -z "$as_dirs" || eval "mkdir $as_dirs"
32271  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32272
32273
32274} # as_fn_mkdir_p
32275if mkdir -p . 2>/dev/null; then
32276  as_mkdir_p='mkdir -p "$as_dir"'
32277else
32278  test -d ./-p && rmdir ./-p
32279  as_mkdir_p=false
32280fi
32281
32282if test -x / >/dev/null 2>&1; then
32283  as_test_x='test -x'
32284else
32285  if ls -dL / >/dev/null 2>&1; then
32286    as_ls_L_option=L
32287  else
32288    as_ls_L_option=
32289  fi
32290  as_test_x='
32291    eval sh -c '\''
32292      if test -d "$1"; then
32293	test -d "$1/.";
32294      else
32295	case $1 in #(
32296	-*)set "./$1";;
32297	esac;
32298	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32299	???[sx]*):;;*)false;;esac;fi
32300    '\'' sh
32301  '
32302fi
32303as_executable_p=$as_test_x
32304
32305# Sed expression to map a string onto a valid CPP name.
32306as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32307
32308# Sed expression to map a string onto a valid variable name.
32309as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32310
32311
32312exec 6>&1
32313## ----------------------------------- ##
32314## Main body of $CONFIG_STATUS script. ##
32315## ----------------------------------- ##
32316_ASEOF
32317test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32318
32319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32320# Save the log message, to keep $0 and so on meaningful, and to
32321# report actual input values of CONFIG_FILES etc. instead of their
32322# values after options handling.
32323ac_log="
32324This file was extended by OpenJDK $as_me jdk8, which was
32325generated by GNU Autoconf 2.67.  Invocation command line was
32326
32327  CONFIG_FILES    = $CONFIG_FILES
32328  CONFIG_HEADERS  = $CONFIG_HEADERS
32329  CONFIG_LINKS    = $CONFIG_LINKS
32330  CONFIG_COMMANDS = $CONFIG_COMMANDS
32331  $ $0 $@
32332
32333on `(hostname || uname -n) 2>/dev/null | sed 1q`
32334"
32335
32336_ACEOF
32337
32338case $ac_config_files in *"
32339"*) set x $ac_config_files; shift; ac_config_files=$*;;
32340esac
32341
32342case $ac_config_headers in *"
32343"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32344esac
32345
32346
32347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32348# Files that config.status was made for.
32349config_files="$ac_config_files"
32350config_headers="$ac_config_headers"
32351
32352_ACEOF
32353
32354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32355ac_cs_usage="\
32356\`$as_me' instantiates files and other configuration actions
32357from templates according to the current configuration.  Unless the files
32358and actions are specified as TAGs, all are instantiated by default.
32359
32360Usage: $0 [OPTION]... [TAG]...
32361
32362  -h, --help       print this help, then exit
32363  -V, --version    print version number and configuration settings, then exit
32364      --config     print configuration, then exit
32365  -q, --quiet, --silent
32366                   do not print progress messages
32367  -d, --debug      don't remove temporary files
32368      --recheck    update $as_me by reconfiguring in the same conditions
32369      --file=FILE[:TEMPLATE]
32370                   instantiate the configuration file FILE
32371      --header=FILE[:TEMPLATE]
32372                   instantiate the configuration header FILE
32373
32374Configuration files:
32375$config_files
32376
32377Configuration headers:
32378$config_headers
32379
32380Report bugs to <build-dev@openjdk.java.net>.
32381OpenJDK home page: <http://openjdk.java.net>."
32382
32383_ACEOF
32384cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32385ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32386ac_cs_version="\\
32387OpenJDK config.status jdk8
32388configured by $0, generated by GNU Autoconf 2.67,
32389  with options \\"\$ac_cs_config\\"
32390
32391Copyright (C) 2010 Free Software Foundation, Inc.
32392This config.status script is free software; the Free Software Foundation
32393gives unlimited permission to copy, distribute and modify it."
32394
32395ac_pwd='$ac_pwd'
32396srcdir='$srcdir'
32397AWK='$AWK'
32398test -n "\$AWK" || AWK=awk
32399_ACEOF
32400
32401cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32402# The default lists apply if the user does not specify any file.
32403ac_need_defaults=:
32404while test $# != 0
32405do
32406  case $1 in
32407  --*=?*)
32408    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32409    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32410    ac_shift=:
32411    ;;
32412  --*=)
32413    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32414    ac_optarg=
32415    ac_shift=:
32416    ;;
32417  *)
32418    ac_option=$1
32419    ac_optarg=$2
32420    ac_shift=shift
32421    ;;
32422  esac
32423
32424  case $ac_option in
32425  # Handling of the options.
32426  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32427    ac_cs_recheck=: ;;
32428  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32429    $as_echo "$ac_cs_version"; exit ;;
32430  --config | --confi | --conf | --con | --co | --c )
32431    $as_echo "$ac_cs_config"; exit ;;
32432  --debug | --debu | --deb | --de | --d | -d )
32433    debug=: ;;
32434  --file | --fil | --fi | --f )
32435    $ac_shift
32436    case $ac_optarg in
32437    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32438    '') as_fn_error $? "missing file argument" ;;
32439    esac
32440    as_fn_append CONFIG_FILES " '$ac_optarg'"
32441    ac_need_defaults=false;;
32442  --header | --heade | --head | --hea )
32443    $ac_shift
32444    case $ac_optarg in
32445    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32446    esac
32447    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32448    ac_need_defaults=false;;
32449  --he | --h)
32450    # Conflict between --help and --header
32451    as_fn_error $? "ambiguous option: \`$1'
32452Try \`$0 --help' for more information.";;
32453  --help | --hel | -h )
32454    $as_echo "$ac_cs_usage"; exit ;;
32455  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32456  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32457    ac_cs_silent=: ;;
32458
32459  # This is an error.
32460  -*) as_fn_error $? "unrecognized option: \`$1'
32461Try \`$0 --help' for more information." ;;
32462
32463  *) as_fn_append ac_config_targets " $1"
32464     ac_need_defaults=false ;;
32465
32466  esac
32467  shift
32468done
32469
32470ac_configure_extra_args=
32471
32472if $ac_cs_silent; then
32473  exec 6>/dev/null
32474  ac_configure_extra_args="$ac_configure_extra_args --silent"
32475fi
32476
32477_ACEOF
32478cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32479if \$ac_cs_recheck; then
32480  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32481  shift
32482  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32483  CONFIG_SHELL='$SHELL'
32484  export CONFIG_SHELL
32485  exec "\$@"
32486fi
32487
32488_ACEOF
32489cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32490exec 5>>config.log
32491{
32492  echo
32493  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32494## Running $as_me. ##
32495_ASBOX
32496  $as_echo "$ac_log"
32497} >&5
32498
32499_ACEOF
32500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32501_ACEOF
32502
32503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32504
32505# Handling of arguments.
32506for ac_config_target in $ac_config_targets
32507do
32508  case $ac_config_target in
32509    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32510    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32511    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32512    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32513    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32514    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32515    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32516
32517  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32518  esac
32519done
32520
32521
32522# If the user did not use the arguments to specify the items to instantiate,
32523# then the envvar interface is used.  Set only those that are not.
32524# We use the long form for the default assignment because of an extremely
32525# bizarre bug on SunOS 4.1.3.
32526if $ac_need_defaults; then
32527  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32528  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32529fi
32530
32531# Have a temporary directory for convenience.  Make it in the build tree
32532# simply because there is no reason against having it here, and in addition,
32533# creating and moving files from /tmp can sometimes cause problems.
32534# Hook for its removal unless debugging.
32535# Note that there is a small window in which the directory will not be cleaned:
32536# after its creation but before its name has been assigned to `$tmp'.
32537$debug ||
32538{
32539  tmp=
32540  trap 'exit_status=$?
32541  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32542' 0
32543  trap 'as_fn_exit 1' 1 2 13 15
32544}
32545# Create a (secure) tmp directory for tmp files.
32546
32547{
32548  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32549  test -n "$tmp" && test -d "$tmp"
32550}  ||
32551{
32552  tmp=./conf$$-$RANDOM
32553  (umask 077 && mkdir "$tmp")
32554} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32555
32556# Set up the scripts for CONFIG_FILES section.
32557# No need to generate them if there are no CONFIG_FILES.
32558# This happens for instance with `./config.status config.h'.
32559if test -n "$CONFIG_FILES"; then
32560
32561
32562ac_cr=`echo X | tr X '\015'`
32563# On cygwin, bash can eat \r inside `` if the user requested igncr.
32564# But we know of no other shell where ac_cr would be empty at this
32565# point, so we can use a bashism as a fallback.
32566if test "x$ac_cr" = x; then
32567  eval ac_cr=\$\'\\r\'
32568fi
32569ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32570if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32571  ac_cs_awk_cr='\\r'
32572else
32573  ac_cs_awk_cr=$ac_cr
32574fi
32575
32576echo 'BEGIN {' >"$tmp/subs1.awk" &&
32577_ACEOF
32578
32579
32580{
32581  echo "cat >conf$$subs.awk <<_ACEOF" &&
32582  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32583  echo "_ACEOF"
32584} >conf$$subs.sh ||
32585  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32586ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32587ac_delim='%!_!# '
32588for ac_last_try in false false false false false :; do
32589  . ./conf$$subs.sh ||
32590    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32591
32592  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32593  if test $ac_delim_n = $ac_delim_num; then
32594    break
32595  elif $ac_last_try; then
32596    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32597  else
32598    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32599  fi
32600done
32601rm -f conf$$subs.sh
32602
32603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32604cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32605_ACEOF
32606sed -n '
32607h
32608s/^/S["/; s/!.*/"]=/
32609p
32610g
32611s/^[^!]*!//
32612:repl
32613t repl
32614s/'"$ac_delim"'$//
32615t delim
32616:nl
32617h
32618s/\(.\{148\}\)..*/\1/
32619t more1
32620s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32621p
32622n
32623b repl
32624:more1
32625s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32626p
32627g
32628s/.\{148\}//
32629t nl
32630:delim
32631h
32632s/\(.\{148\}\)..*/\1/
32633t more2
32634s/["\\]/\\&/g; s/^/"/; s/$/"/
32635p
32636b
32637:more2
32638s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32639p
32640g
32641s/.\{148\}//
32642t delim
32643' <conf$$subs.awk | sed '
32644/^[^""]/{
32645  N
32646  s/\n//
32647}
32648' >>$CONFIG_STATUS || ac_write_fail=1
32649rm -f conf$$subs.awk
32650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32651_ACAWK
32652cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32653  for (key in S) S_is_set[key] = 1
32654  FS = ""
32655
32656}
32657{
32658  line = $ 0
32659  nfields = split(line, field, "@")
32660  substed = 0
32661  len = length(field[1])
32662  for (i = 2; i < nfields; i++) {
32663    key = field[i]
32664    keylen = length(key)
32665    if (S_is_set[key]) {
32666      value = S[key]
32667      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32668      len += length(value) + length(field[++i])
32669      substed = 1
32670    } else
32671      len += 1 + keylen
32672  }
32673
32674  print line
32675}
32676
32677_ACAWK
32678_ACEOF
32679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32680if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32681  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32682else
32683  cat
32684fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32685  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32686_ACEOF
32687
32688# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32689# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32690# trailing colons and then remove the whole line if VPATH becomes empty
32691# (actually we leave an empty line to preserve line numbers).
32692if test "x$srcdir" = x.; then
32693  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32694h
32695s///
32696s/^/:/
32697s/[	 ]*$/:/
32698s/:\$(srcdir):/:/g
32699s/:\${srcdir}:/:/g
32700s/:@srcdir@:/:/g
32701s/^:*//
32702s/:*$//
32703x
32704s/\(=[	 ]*\).*/\1/
32705G
32706s/\n//
32707s/^[^=]*=[	 ]*$//
32708}'
32709fi
32710
32711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32712fi # test -n "$CONFIG_FILES"
32713
32714# Set up the scripts for CONFIG_HEADERS section.
32715# No need to generate them if there are no CONFIG_HEADERS.
32716# This happens for instance with `./config.status Makefile'.
32717if test -n "$CONFIG_HEADERS"; then
32718cat >"$tmp/defines.awk" <<\_ACAWK ||
32719BEGIN {
32720_ACEOF
32721
32722# Transform confdefs.h into an awk script `defines.awk', embedded as
32723# here-document in config.status, that substitutes the proper values into
32724# config.h.in to produce config.h.
32725
32726# Create a delimiter string that does not exist in confdefs.h, to ease
32727# handling of long lines.
32728ac_delim='%!_!# '
32729for ac_last_try in false false :; do
32730  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32731  if test -z "$ac_t"; then
32732    break
32733  elif $ac_last_try; then
32734    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32735  else
32736    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32737  fi
32738done
32739
32740# For the awk script, D is an array of macro values keyed by name,
32741# likewise P contains macro parameters if any.  Preserve backslash
32742# newline sequences.
32743
32744ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32745sed -n '
32746s/.\{148\}/&'"$ac_delim"'/g
32747t rset
32748:rset
32749s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32750t def
32751d
32752:def
32753s/\\$//
32754t bsnl
32755s/["\\]/\\&/g
32756s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32757D["\1"]=" \3"/p
32758s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32759d
32760:bsnl
32761s/["\\]/\\&/g
32762s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32763D["\1"]=" \3\\\\\\n"\\/p
32764t cont
32765s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32766t cont
32767d
32768:cont
32769n
32770s/.\{148\}/&'"$ac_delim"'/g
32771t clear
32772:clear
32773s/\\$//
32774t bsnlc
32775s/["\\]/\\&/g; s/^/"/; s/$/"/p
32776d
32777:bsnlc
32778s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32779b cont
32780' <confdefs.h | sed '
32781s/'"$ac_delim"'/"\\\
32782"/g' >>$CONFIG_STATUS || ac_write_fail=1
32783
32784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32785  for (key in D) D_is_set[key] = 1
32786  FS = ""
32787}
32788/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32789  line = \$ 0
32790  split(line, arg, " ")
32791  if (arg[1] == "#") {
32792    defundef = arg[2]
32793    mac1 = arg[3]
32794  } else {
32795    defundef = substr(arg[1], 2)
32796    mac1 = arg[2]
32797  }
32798  split(mac1, mac2, "(") #)
32799  macro = mac2[1]
32800  prefix = substr(line, 1, index(line, defundef) - 1)
32801  if (D_is_set[macro]) {
32802    # Preserve the white space surrounding the "#".
32803    print prefix "define", macro P[macro] D[macro]
32804    next
32805  } else {
32806    # Replace #undef with comments.  This is necessary, for example,
32807    # in the case of _POSIX_SOURCE, which is predefined and required
32808    # on some systems where configure will not decide to define it.
32809    if (defundef == "undef") {
32810      print "/*", prefix defundef, macro, "*/"
32811      next
32812    }
32813  }
32814}
32815{ print }
32816_ACAWK
32817_ACEOF
32818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32819  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32820fi # test -n "$CONFIG_HEADERS"
32821
32822
32823eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32824shift
32825for ac_tag
32826do
32827  case $ac_tag in
32828  :[FHLC]) ac_mode=$ac_tag; continue;;
32829  esac
32830  case $ac_mode$ac_tag in
32831  :[FHL]*:*);;
32832  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32833  :[FH]-) ac_tag=-:-;;
32834  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32835  esac
32836  ac_save_IFS=$IFS
32837  IFS=:
32838  set x $ac_tag
32839  IFS=$ac_save_IFS
32840  shift
32841  ac_file=$1
32842  shift
32843
32844  case $ac_mode in
32845  :L) ac_source=$1;;
32846  :[FH])
32847    ac_file_inputs=
32848    for ac_f
32849    do
32850      case $ac_f in
32851      -) ac_f="$tmp/stdin";;
32852      *) # Look for the file first in the build tree, then in the source tree
32853	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32854	 # because $ac_f cannot contain `:'.
32855	 test -f "$ac_f" ||
32856	   case $ac_f in
32857	   [\\/$]*) false;;
32858	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32859	   esac ||
32860	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32861      esac
32862      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32863      as_fn_append ac_file_inputs " '$ac_f'"
32864    done
32865
32866    # Let's still pretend it is `configure' which instantiates (i.e., don't
32867    # use $as_me), people would be surprised to read:
32868    #    /* config.h.  Generated by config.status.  */
32869    configure_input='Generated from '`
32870	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32871	`' by configure.'
32872    if test x"$ac_file" != x-; then
32873      configure_input="$ac_file.  $configure_input"
32874      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32875$as_echo "$as_me: creating $ac_file" >&6;}
32876    fi
32877    # Neutralize special characters interpreted by sed in replacement strings.
32878    case $configure_input in #(
32879    *\&* | *\|* | *\\* )
32880       ac_sed_conf_input=`$as_echo "$configure_input" |
32881       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32882    *) ac_sed_conf_input=$configure_input;;
32883    esac
32884
32885    case $ac_tag in
32886    *:-:* | *:-) cat >"$tmp/stdin" \
32887      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32888    esac
32889    ;;
32890  esac
32891
32892  ac_dir=`$as_dirname -- "$ac_file" ||
32893$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32894	 X"$ac_file" : 'X\(//\)[^/]' \| \
32895	 X"$ac_file" : 'X\(//\)$' \| \
32896	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32897$as_echo X"$ac_file" |
32898    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32899	    s//\1/
32900	    q
32901	  }
32902	  /^X\(\/\/\)[^/].*/{
32903	    s//\1/
32904	    q
32905	  }
32906	  /^X\(\/\/\)$/{
32907	    s//\1/
32908	    q
32909	  }
32910	  /^X\(\/\).*/{
32911	    s//\1/
32912	    q
32913	  }
32914	  s/.*/./; q'`
32915  as_dir="$ac_dir"; as_fn_mkdir_p
32916  ac_builddir=.
32917
32918case "$ac_dir" in
32919.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32920*)
32921  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32922  # A ".." for each directory in $ac_dir_suffix.
32923  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32924  case $ac_top_builddir_sub in
32925  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32926  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32927  esac ;;
32928esac
32929ac_abs_top_builddir=$ac_pwd
32930ac_abs_builddir=$ac_pwd$ac_dir_suffix
32931# for backward compatibility:
32932ac_top_builddir=$ac_top_build_prefix
32933
32934case $srcdir in
32935  .)  # We are building in place.
32936    ac_srcdir=.
32937    ac_top_srcdir=$ac_top_builddir_sub
32938    ac_abs_top_srcdir=$ac_pwd ;;
32939  [\\/]* | ?:[\\/]* )  # Absolute name.
32940    ac_srcdir=$srcdir$ac_dir_suffix;
32941    ac_top_srcdir=$srcdir
32942    ac_abs_top_srcdir=$srcdir ;;
32943  *) # Relative name.
32944    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32945    ac_top_srcdir=$ac_top_build_prefix$srcdir
32946    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32947esac
32948ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32949
32950
32951  case $ac_mode in
32952  :F)
32953  #
32954  # CONFIG_FILE
32955  #
32956
32957_ACEOF
32958
32959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32960# If the template does not know about datarootdir, expand it.
32961# FIXME: This hack should be removed a few years after 2.60.
32962ac_datarootdir_hack=; ac_datarootdir_seen=
32963ac_sed_dataroot='
32964/datarootdir/ {
32965  p
32966  q
32967}
32968/@datadir@/p
32969/@docdir@/p
32970/@infodir@/p
32971/@localedir@/p
32972/@mandir@/p'
32973case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32974*datarootdir*) ac_datarootdir_seen=yes;;
32975*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32976  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32977$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32978_ACEOF
32979cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32980  ac_datarootdir_hack='
32981  s&@datadir@&$datadir&g
32982  s&@docdir@&$docdir&g
32983  s&@infodir@&$infodir&g
32984  s&@localedir@&$localedir&g
32985  s&@mandir@&$mandir&g
32986  s&\\\${datarootdir}&$datarootdir&g' ;;
32987esac
32988_ACEOF
32989
32990# Neutralize VPATH when `$srcdir' = `.'.
32991# Shell code in configure.ac might set extrasub.
32992# FIXME: do we really want to maintain this feature?
32993cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32994ac_sed_extra="$ac_vpsub
32995$extrasub
32996_ACEOF
32997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32998:t
32999/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33000s|@configure_input@|$ac_sed_conf_input|;t t
33001s&@top_builddir@&$ac_top_builddir_sub&;t t
33002s&@top_build_prefix@&$ac_top_build_prefix&;t t
33003s&@srcdir@&$ac_srcdir&;t t
33004s&@abs_srcdir@&$ac_abs_srcdir&;t t
33005s&@top_srcdir@&$ac_top_srcdir&;t t
33006s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33007s&@builddir@&$ac_builddir&;t t
33008s&@abs_builddir@&$ac_abs_builddir&;t t
33009s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33010$ac_datarootdir_hack
33011"
33012eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33013  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33014
33015test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33016  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33017  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33018  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33019which seems to be undefined.  Please make sure it is defined" >&5
33020$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33021which seems to be undefined.  Please make sure it is defined" >&2;}
33022
33023  rm -f "$tmp/stdin"
33024  case $ac_file in
33025  -) cat "$tmp/out" && rm -f "$tmp/out";;
33026  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33027  esac \
33028  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33029 ;;
33030  :H)
33031  #
33032  # CONFIG_HEADER
33033  #
33034  if test x"$ac_file" != x-; then
33035    {
33036      $as_echo "/* $configure_input  */" \
33037      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33038    } >"$tmp/config.h" \
33039      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33040    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33041      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33042$as_echo "$as_me: $ac_file is unchanged" >&6;}
33043    else
33044      rm -f "$ac_file"
33045      mv "$tmp/config.h" "$ac_file" \
33046	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33047    fi
33048  else
33049    $as_echo "/* $configure_input  */" \
33050      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33051      || as_fn_error $? "could not create -" "$LINENO" 5
33052  fi
33053 ;;
33054
33055
33056  esac
33057
33058done # for ac_tag
33059
33060
33061as_fn_exit 0
33062_ACEOF
33063ac_clean_files=$ac_clean_files_save
33064
33065test $ac_write_fail = 0 ||
33066  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33067
33068
33069# configure is writing to config.log, and then calls config.status.
33070# config.status does its own redirection, appending to config.log.
33071# Unfortunately, on DOS this fails, as config.log is still kept open
33072# by configure, so config.status won't be able to write to it; its
33073# output is simply discarded.  So we exec the FD to /dev/null,
33074# effectively closing config.log, so it can be properly (re)opened and
33075# appended to by config.status.  When coming back to configure, we
33076# need to make the FD available again.
33077if test "$no_create" != yes; then
33078  ac_cs_success=:
33079  ac_config_status_args=
33080  test "$silent" = yes &&
33081    ac_config_status_args="$ac_config_status_args --quiet"
33082  exec 5>/dev/null
33083  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33084  exec 5>>config.log
33085  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33086  # would make configure fail if this is the last instruction.
33087  $ac_cs_success || as_fn_exit 1
33088fi
33089if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33090  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33091$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33092fi
33093
33094
33095# Make the compare script executable
33096$CHMOD +x $OUTPUT_ROOT/compare.sh
33097
33098# Finally output some useful information to the user
33099
33100# Finally output some useful information to the user
33101
33102if test "x$CCACHE_FOUND" != x; then
33103	if  test "x$HAS_GOOD_CCACHE" = x; then
33104		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33105		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33106	else
33107		CCACHE_STATUS="installed and in use"
33108	fi
33109else
33110	if test "x$GCC" = xyes; then
33111		CCACHE_STATUS="not installed (consider installing)"
33112		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33113	else
33114		CCACHE_STATUS="not available for your system"
33115	fi
33116fi
33117
33118printf "\n"
33119printf "====================================================\n"
33120printf "A new configuration has been successfully created in\n"
33121printf "$OUTPUT_ROOT\n"
33122if test "x$CONFIGURE_COMMAND_LINE" != x; then
33123	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33124else
33125	printf "using default settings.\n"
33126fi
33127
33128printf "\n"
33129printf "Configuration summary:\n"
33130printf "* Debug level:    $DEBUG_LEVEL\n"
33131printf "* JDK variant:    $JDK_VARIANT\n"
33132printf "* JVM variants:   $with_jvm_variants\n"
33133printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33134
33135printf "\n"
33136printf "Tools summary:\n"
33137if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33138  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33139fi
33140printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33141printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33142printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33143
33144printf "\n"
33145printf "Build performance summary:\n"
33146printf "* Cores to use:   $NUM_CORES\n"
33147printf "* Memory limit:   $MEMORY_SIZE MB\n"
33148printf "* ccache status:  $CCACHE_STATUS\n"
33149printf "\n"
33150
33151if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33152	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33153	printf "$CCACHE_HELP_MSG\n"
33154
33155    # Print a helpful message on how to acquire the necessary build dependency.
33156    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33157    MISSING_DEPENDENCY=ccache
33158    PKGHANDLER_COMMAND=
33159
33160    case $PKGHANDLER in
33161	apt-get)
33162                apt_help     $MISSING_DEPENDENCY ;;
33163    yum)
33164                yum_help     $MISSING_DEPENDENCY ;;
33165	port)
33166                port_help    $MISSING_DEPENDENCY ;;
33167	pkgutil)
33168                pkgutil_help $MISSING_DEPENDENCY ;;
33169	pkgadd)
33170                pkgadd_help  $MISSING_DEPENDENCY ;;
33171    * )
33172      break ;;
33173    esac
33174
33175    if test "x$PKGHANDLER_COMMAND" != x; then
33176        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33177    fi
33178
33179	printf "$HELP_MSG\n"
33180	printf "\n"
33181fi
33182
33183if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33184	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33185	printf "will result in longer build times.\n"
33186	printf "\n"
33187fi
33188
33189if test "x$FOUND_ALT_VARIABLES" != "x"; then
33190	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33191	printf "These are not respected, and will be ignored. It is recommended\n"
33192	printf "that you clean your environment. The following variables are set:\n"
33193	printf "$FOUND_ALT_VARIABLES\n"
33194	printf "\n"
33195fi
33196
33197if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33198	printf "WARNING: Your build output directory is not on a local disk.\n"
33199	printf "This will severely degrade build performance!\n"
33200	printf "It is recommended that you create an output directory on a local disk,\n"
33201	printf "and run the configure script again from that directory.\n"
33202	printf "\n"
33203fi
33204
33205if test "x$IS_RECONFIGURE" = "xyes"; then
33206	printf "WARNING: The result of this configuration has overridden an older\n"
33207	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33208	printf "proper build. Failure to do so might result in strange build problems.\n"
33209	printf "\n"
33210fi
33211
33212