generated-configure.sh revision 520:98a7af257bee
1118611Snjl#! /bin/sh
2118611Snjl# Guess values for system-dependent variables and create Makefiles.
3118611Snjl# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4118611Snjl#
5118611Snjl# Report bugs to <build-dev@openjdk.java.net>.
6118611Snjl#
7118611Snjl#
8217365Sjkim# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9217365Sjkim# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10118611Snjl# Foundation, Inc.
11118611Snjl#
12217365Sjkim#
13217365Sjkim# This configure script is free software; the Free Software Foundation
14217365Sjkim# gives unlimited permission to copy, distribute and modify it.
15217365Sjkim## -------------------- ##
16217365Sjkim## M4sh Initialization. ##
17217365Sjkim## -------------------- ##
18217365Sjkim
19217365Sjkim# Be more Bourne compatible
20217365SjkimDUALCASE=1; export DUALCASE # for MKS sh
21217365Sjkimif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22217365Sjkim  emulate sh
23217365Sjkim  NULLCMD=:
24217365Sjkim  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25217365Sjkim  # is contrary to our usage.  Disable this feature.
26118611Snjl  alias -g '${1+"$@"}'='"$@"'
27217365Sjkim  setopt NO_GLOB_SUBST
28217365Sjkimelse
29217365Sjkim  case `(set -o) 2>/dev/null` in #(
30118611Snjl  *posix*) :
31217365Sjkim    set -o posix ;; #(
32217365Sjkim  *) :
33217365Sjkim     ;;
34217365Sjkimesac
35217365Sjkimfi
36217365Sjkim
37217365Sjkim
38217365Sjkimas_nl='
39217365Sjkim'
40217365Sjkimexport as_nl
41217365Sjkim# Printing a long string crashes Solaris 7 /usr/bin/printf.
42217365Sjkimas_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43217365Sjkimas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44118611Snjlas_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45118611Snjl# Prefer a ksh shell builtin over an external printf program on Solaris,
46151937Sjkim# but without wasting forks for bash or zsh.
47118611Snjlif test -z "$BASH_VERSION$ZSH_VERSION" \
48193529Sjkim    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49118611Snjl  as_echo='print -r --'
50193529Sjkim  as_echo_n='print -rn --'
51193529Sjkimelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52118611Snjl  as_echo='printf %s\n'
53118611Snjl  as_echo_n='printf %s'
54118611Snjlelse
55118611Snjl  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56151937Sjkim    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57118611Snjl    as_echo_n='/usr/ucb/echo -n'
58151937Sjkim  else
59151937Sjkim    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60151937Sjkim    as_echo_n_body='eval
61151937Sjkim      arg=$1;
62151937Sjkim      case $arg in #(
63151937Sjkim      *"$as_nl"*)
64151937Sjkim	expr "X$arg" : "X\\(.*\\)$as_nl";
65151937Sjkim	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66151937Sjkim      esac;
67151937Sjkim      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68151937Sjkim    '
69151937Sjkim    export as_echo_n_body
70151937Sjkim    as_echo_n='sh -c $as_echo_n_body as_echo'
71151937Sjkim  fi
72151937Sjkim  export as_echo_body
73151937Sjkim  as_echo='sh -c $as_echo_body as_echo'
74151937Sjkimfi
75151937Sjkim
76151937Sjkim# The user is always right.
77118611Snjlif test "${PATH_SEPARATOR+set}" != set; then
78118611Snjl  PATH_SEPARATOR=:
79118611Snjl  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80118611Snjl    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81118611Snjl      PATH_SEPARATOR=';'
82118611Snjl  }
83118611Snjlfi
84118611Snjl
85118611Snjl
86118611Snjl# IFS
87118611Snjl# We need space, tab and new line, in precisely that order.  Quoting is
88118611Snjl# there to prevent editors from complaining about space-tab.
89151937Sjkim# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90118611Snjl# splitting by setting IFS to empty value.)
91118611SnjlIFS=" ""	$as_nl"
92118611Snjl
93118611Snjl# Find who we are.  Look in the path if we contain no directory separator.
94118611Snjlcase $0 in #((
95118611Snjl  *[\\/]* ) as_myself=$0 ;;
96118611Snjl  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97118611Snjlfor as_dir in $PATH
98118611Snjldo
99118611Snjl  IFS=$as_save_IFS
100118611Snjl  test -z "$as_dir" && as_dir=.
101118611Snjl    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102118611Snjl  done
103118611SnjlIFS=$as_save_IFS
104118611Snjl
105118611Snjl     ;;
106118611Snjlesac
107118611Snjl# We did not find ourselves, most probably we were run as `sh COMMAND'
108118611Snjl# in which case we are not to be found in the path.
109118611Snjlif test "x$as_myself" = x; then
110118611Snjl  as_myself=$0
111118611Snjlfi
112118611Snjlif test ! -f "$as_myself"; then
113118611Snjl  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114118611Snjl  exit 1
115118611Snjlfi
116118611Snjl
117118611Snjl# Unset variables that we do not need and which cause bugs (e.g. in
118118611Snjl# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119118611Snjl# suppresses any "Segmentation fault" message there.  '((' could
120118611Snjl# trigger a bug in pdksh 5.2.14.
121118611Snjlfor as_var in BASH_ENV ENV MAIL MAILPATH
122118611Snjldo eval test x\${$as_var+set} = xset \
123118611Snjl  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124118611Snjldone
125118611SnjlPS1='$ '
126118611SnjlPS2='> '
127118611SnjlPS4='+ '
128118611Snjl
129118611Snjl# NLS nuisances.
130118611SnjlLC_ALL=C
131118611Snjlexport LC_ALL
132118611SnjlLANGUAGE=C
133118611Snjlexport LANGUAGE
134118611Snjl
135118611Snjl# CDPATH.
136151937Sjkim(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137118611Snjl
138118611Snjlif test "x$CONFIG_SHELL" = x; then
139118611Snjl  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140118611Snjl  emulate sh
141118611Snjl  NULLCMD=:
142118611Snjl  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143118611Snjl  # is contrary to our usage.  Disable this feature.
144118611Snjl  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145118611Snjl  setopt NO_GLOB_SUBST
146118611Snjlelse
147118611Snjl  case \`(set -o) 2>/dev/null\` in #(
148118611Snjl  *posix*) :
149118611Snjl    set -o posix ;; #(
150118611Snjl  *) :
151118611Snjl     ;;
152118611Snjlesac
153118611Snjlfi
154118611Snjl"
155118611Snjl  as_required="as_fn_return () { (exit \$1); }
156118611Snjlas_fn_success () { as_fn_return 0; }
157118611Snjlas_fn_failure () { as_fn_return 1; }
158118611Snjlas_fn_ret_success () { return 0; }
159118611Snjlas_fn_ret_failure () { return 1; }
160118611Snjl
161118611Snjlexitcode=0
162118611Snjlas_fn_success || { exitcode=1; echo as_fn_success failed.; }
163118611Snjlas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164118611Snjlas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165118611Snjlas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166118611Snjlif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167118611Snjl
168118611Snjlelse
169118611Snjl  exitcode=1; echo positional parameters were not saved.
170118611Snjlfi
171118611Snjltest x\$exitcode = x0 || exit 1"
172118611Snjl  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173118611Snjl  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174118611Snjl  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175118611Snjl  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176118611Snjltest \$(( 1 + 1 )) = 2 || exit 1"
177118611Snjl  if (eval "$as_required") 2>/dev/null; then :
178118611Snjl  as_have_required=yes
179118611Snjlelse
180118611Snjl  as_have_required=no
181118611Snjlfi
182151937Sjkim  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183118611Snjl
184118611Snjlelse
185118611Snjl  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186118611Snjlas_found=false
187118611Snjlfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188118611Snjldo
189118611Snjl  IFS=$as_save_IFS
190118611Snjl  test -z "$as_dir" && as_dir=.
191118611Snjl  as_found=:
192118611Snjl  case $as_dir in #(
193118611Snjl	 /*)
194118611Snjl	   for as_base in sh bash ksh sh5; do
195118611Snjl	     # Try only shells that exist, to save several forks.
196118611Snjl	     as_shell=$as_dir/$as_base
197118611Snjl	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198118611Snjl		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199118611Snjl  CONFIG_SHELL=$as_shell as_have_required=yes
200118611Snjl		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201118611Snjl  break 2
202118611Snjlfi
203118611Snjlfi
204151937Sjkim	   done;;
205151937Sjkim       esac
206118611Snjl  as_found=false
207118611Snjldone
208118611Snjl$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209151937Sjkim	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210151937Sjkim  CONFIG_SHELL=$SHELL as_have_required=yes
211118611Snjlfi; }
212118611SnjlIFS=$as_save_IFS
213118611Snjl
214118611Snjl
215118611Snjl      if test "x$CONFIG_SHELL" != x; then :
216118611Snjl  # We cannot yet assume a decent shell, so we have to provide a
217118611Snjl	# neutralization value for shells without unset; and this also
218118611Snjl	# works around shells that cannot unset nonexistent variables.
219118611Snjl	BASH_ENV=/dev/null
220118611Snjl	ENV=/dev/null
221118611Snjl	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222118611Snjl	export CONFIG_SHELL
223118611Snjl	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224118611Snjlfi
225118611Snjl
226118611Snjl    if test x$as_have_required = xno; then :
227118611Snjl  $as_echo "$0: This script requires a shell more modern than all"
228151937Sjkim  $as_echo "$0: the shells that I found on your system."
229151937Sjkim  if test x${ZSH_VERSION+set} = xset ; then
230118611Snjl    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231118611Snjl    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232118611Snjl  else
233151937Sjkim    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234151937Sjkim$0: build-dev@openjdk.java.net about your system, including
235118611Snjl$0: any error possibly output before this message. Then
236118611Snjl$0: install a modern shell, or manually run the script
237118611Snjl$0: under such a shell if you do have one."
238118611Snjl  fi
239118611Snjl  exit 1
240118611Snjlfi
241118611Snjlfi
242118611Snjlfi
243118611SnjlSHELL=${CONFIG_SHELL-/bin/sh}
244118611Snjlexport SHELL
245118611Snjl# Unset more variables known to interfere with behavior of common tools.
246118611SnjlCLICOLOR_FORCE= GREP_OPTIONS=
247118611Snjlunset CLICOLOR_FORCE GREP_OPTIONS
248118611Snjl
249118611Snjl## --------------------- ##
250118611Snjl## M4sh Shell Functions. ##
251118611Snjl## --------------------- ##
252118611Snjl# as_fn_unset VAR
253118611Snjl# ---------------
254118611Snjl# Portably unset VAR.
255118611Snjlas_fn_unset ()
256118611Snjl{
257118611Snjl  { eval $1=; unset $1;}
258118611Snjl}
259118611Snjlas_unset=as_fn_unset
260118611Snjl
261118611Snjl# as_fn_set_status STATUS
262118611Snjl# -----------------------
263118611Snjl# Set $? to STATUS, without forking.
264118611Snjlas_fn_set_status ()
265118611Snjl{
266118611Snjl  return $1
267118611Snjl} # as_fn_set_status
268118611Snjl
269118611Snjl# as_fn_exit STATUS
270118611Snjl# -----------------
271118611Snjl# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272118611Snjlas_fn_exit ()
273118611Snjl{
274118611Snjl  set +e
275118611Snjl  as_fn_set_status $1
276118611Snjl  exit $1
277118611Snjl} # as_fn_exit
278118611Snjl
279118611Snjl# as_fn_mkdir_p
280118611Snjl# -------------
281118611Snjl# Create "$as_dir" as a directory, including parents if necessary.
282118611Snjlas_fn_mkdir_p ()
283118611Snjl{
284118611Snjl
285118611Snjl  case $as_dir in #(
286118611Snjl  -*) as_dir=./$as_dir;;
287118611Snjl  esac
288118611Snjl  test -d "$as_dir" || eval $as_mkdir_p || {
289118611Snjl    as_dirs=
290118611Snjl    while :; do
291118611Snjl      case $as_dir in #(
292118611Snjl      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293118611Snjl      *) as_qdir=$as_dir;;
294151937Sjkim      esac
295151937Sjkim      as_dirs="'$as_qdir' $as_dirs"
296118611Snjl      as_dir=`$as_dirname -- "$as_dir" ||
297118611Snjl$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298118611Snjl	 X"$as_dir" : 'X\(//\)[^/]' \| \
299118611Snjl	 X"$as_dir" : 'X\(//\)$' \| \
300118611Snjl	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301118611Snjl$as_echo X"$as_dir" |
302118611Snjl    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303118611Snjl	    s//\1/
304118611Snjl	    q
305118611Snjl	  }
306118611Snjl	  /^X\(\/\/\)[^/].*/{
307118611Snjl	    s//\1/
308118611Snjl	    q
309118611Snjl	  }
310118611Snjl	  /^X\(\/\/\)$/{
311118611Snjl	    s//\1/
312118611Snjl	    q
313118611Snjl	  }
314118611Snjl	  /^X\(\/\).*/{
315118611Snjl	    s//\1/
316118611Snjl	    q
317118611Snjl	  }
318118611Snjl	  s/.*/./; q'`
319118611Snjl      test -d "$as_dir" && break
320118611Snjl    done
321118611Snjl    test -z "$as_dirs" || eval "mkdir $as_dirs"
322118611Snjl  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323118611Snjl
324118611Snjl
325118611Snjl} # as_fn_mkdir_p
326118611Snjl# as_fn_append VAR VALUE
327151937Sjkim# ----------------------
328151937Sjkim# Append the text in VALUE to the end of the definition contained in VAR. Take
329151937Sjkim# advantage of any shell optimizations that allow amortized linear growth over
330151937Sjkim# repeated appends, instead of the typical quadratic growth present in naive
331118611Snjl# implementations.
332118611Snjlif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333118611Snjl  eval 'as_fn_append ()
334118611Snjl  {
335118611Snjl    eval $1+=\$2
336118611Snjl  }'
337118611Snjlelse
338118611Snjl  as_fn_append ()
339118611Snjl  {
340118611Snjl    eval $1=\$$1\$2
341118611Snjl  }
342118611Snjlfi # as_fn_append
343118611Snjl
344118611Snjl# as_fn_arith ARG...
345118611Snjl# ------------------
346118611Snjl# Perform arithmetic evaluation on the ARGs, and store the result in the
347118611Snjl# global $as_val. Take advantage of shells that can avoid forks. The arguments
348118611Snjl# must be portable across $(()) and expr.
349118611Snjlif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350118611Snjl  eval 'as_fn_arith ()
351118611Snjl  {
352118611Snjl    as_val=$(( $* ))
353118611Snjl  }'
354118611Snjlelse
355118611Snjl  as_fn_arith ()
356118611Snjl  {
357118611Snjl    as_val=`expr "$@" || test $? -eq 1`
358118611Snjl  }
359118611Snjlfi # as_fn_arith
360118611Snjl
361118611Snjl
362118611Snjl# as_fn_error STATUS ERROR [LINENO LOG_FD]
363118611Snjl# ----------------------------------------
364118611Snjl# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365118611Snjl# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366118611Snjl# script with STATUS, using 1 if that was 0.
367118611Snjlas_fn_error ()
368118611Snjl{
369151937Sjkim  as_status=$1; test $as_status -eq 0 && as_status=1
370151937Sjkim  if test "$4"; then
371151937Sjkim    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372151937Sjkim    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373118611Snjl  fi
374118611Snjl  $as_echo "$as_me: error: $2" >&2
375118611Snjl  as_fn_exit $as_status
376118611Snjl} # as_fn_error
377118611Snjl
378118611Snjlif expr a : '\(a\)' >/dev/null 2>&1 &&
379118611Snjl   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380118611Snjl  as_expr=expr
381118611Snjlelse
382118611Snjl  as_expr=false
383118611Snjlfi
384118611Snjl
385118611Snjlif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386118611Snjl  as_basename=basename
387118611Snjlelse
388118611Snjl  as_basename=false
389118611Snjlfi
390118611Snjl
391151937Sjkimif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392151937Sjkim  as_dirname=dirname
393151937Sjkimelse
394151937Sjkim  as_dirname=false
395118611Snjlfi
396118611Snjl
397118611Snjlas_me=`$as_basename -- "$0" ||
398118611Snjl$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399118611Snjl	 X"$0" : 'X\(//\)$' \| \
400118611Snjl	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401118611Snjl$as_echo X/"$0" |
402118611Snjl    sed '/^.*\/\([^/][^/]*\)\/*$/{
403118611Snjl	    s//\1/
404151937Sjkim	    q
405151937Sjkim	  }
406118611Snjl	  /^X\/\(\/\/\)$/{
407118611Snjl	    s//\1/
408118611Snjl	    q
409118611Snjl	  }
410118611Snjl	  /^X\/\(\/\).*/{
411193529Sjkim	    s//\1/
412118611Snjl	    q
413118611Snjl	  }
414118611Snjl	  s/.*/./; q'`
415118611Snjl
416118611Snjl# Avoid depending upon Character Ranges.
417118611Snjlas_cr_letters='abcdefghijklmnopqrstuvwxyz'
418118611Snjlas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419151937Sjkimas_cr_Letters=$as_cr_letters$as_cr_LETTERS
420151937Sjkimas_cr_digits='0123456789'
421123315Snjlas_cr_alnum=$as_cr_Letters$as_cr_digits
422118611Snjl
423118611Snjl
424118611Snjl  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425118611Snjl  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426118611Snjl  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427118611Snjl  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428118611Snjl  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429118611Snjl  sed -n '
430118611Snjl    p
431118611Snjl    /[$]LINENO/=
432151937Sjkim  ' <$as_myself |
433151937Sjkim    sed '
434118611Snjl      s/[$]LINENO.*/&-/
435118611Snjl      t lineno
436118611Snjl      b
437118611Snjl      :lineno
438118611Snjl      N
439118611Snjl      :loop
440118611Snjl      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441118611Snjl      t loop
442118611Snjl      s/-\n.*//
443151937Sjkim    ' >$as_me.lineno &&
444118611Snjl  chmod +x "$as_me.lineno" ||
445118611Snjl    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446118611Snjl
447118611Snjl  # Don't try to exec as it changes $[0], causing all sort of problems
448118611Snjl  # (the dirname of $[0] is not the place where we might find the
449118611Snjl  # original and so on.  Autoconf is especially sensitive to this).
450118611Snjl  . "./$as_me.lineno"
451118611Snjl  # Exit status is that of the last command.
452118611Snjl  exit
453118611Snjl}
454118611Snjl
455118611SnjlECHO_C= ECHO_N= ECHO_T=
456118611Snjlcase `echo -n x` in #(((((
457118611Snjl-n*)
458118611Snjl  case `echo 'xy\c'` in
459118611Snjl  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460118611Snjl  xy)  ECHO_C='\c';;
461118611Snjl  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462118611Snjl       ECHO_T='	';;
463118611Snjl  esac;;
464118611Snjl*)
465118611Snjl  ECHO_N='-n';;
466118611Snjlesac
467118611Snjl
468118611Snjlrm -f conf$$ conf$$.exe conf$$.file
469118611Snjlif test -d conf$$.dir; then
470118611Snjl  rm -f conf$$.dir/conf$$.file
471151937Sjkimelse
472151937Sjkim  rm -f conf$$.dir
473118611Snjl  mkdir conf$$.dir 2>/dev/null
474118611Snjlfi
475118611Snjlif (echo >conf$$.file) 2>/dev/null; then
476118611Snjl  if ln -s conf$$.file conf$$ 2>/dev/null; then
477118611Snjl    as_ln_s='ln -s'
478118611Snjl    # ... but there are two gotchas:
479118611Snjl    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480118611Snjl    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481118611Snjl    # In both cases, we have to default to `cp -p'.
482118611Snjl    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483118611Snjl      as_ln_s='cp -p'
484118611Snjl  elif ln conf$$.file conf$$ 2>/dev/null; then
485118611Snjl    as_ln_s=ln
486118611Snjl  else
487118611Snjl    as_ln_s='cp -p'
488118611Snjl  fi
489118611Snjlelse
490118611Snjl  as_ln_s='cp -p'
491118611Snjlfi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_HOTSPOT
734HOTSPOT_DIST
735BUILD_OUTPUT
736OVERRIDE_SRC_ROOT
737ADD_SRC_ROOT
738JDK_TOPDIR
739HOTSPOT_TOPDIR
740JAXWS_TOPDIR
741JAXP_TOPDIR
742CORBA_TOPDIR
743LANGTOOLS_TOPDIR
744BOOT_JDK_JVMARGS
745JAVAC_FLAGS
746BOOT_JDK_SOURCETARGET
747BOOT_JDK
748BOOT_TOOLSJAR
749BOOT_RTJAR
750JAVA_CHECK
751JAVAC_CHECK
752COOKED_BUILD_NUMBER
753FULL_VERSION
754RELEASE
755JDK_VERSION
756RUNTIME_NAME
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
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778SET_OPENJDK
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785COMM
786TIME
787STAT
788HG
789READELF
790OTOOL
791LDD
792ZIP
793UNZIP
794FIND_DELETE
795MAKE
796CHECK_TOOLSDIR_MAKE
797CHECK_TOOLSDIR_GMAKE
798CHECK_MAKE
799CHECK_GMAKE
800PKGHANDLER
801OUTPUT_ROOT
802CONF_NAME
803SPEC
804BUILD_VARIANT_RELEASE
805DEBUG_CLASSFILES
806FASTDEBUG
807VARIANT
808DEBUG_LEVEL
809MACOSX_UNIVERSAL
810JVM_VARIANT_ZEROSHARK
811JVM_VARIANT_ZERO
812JVM_VARIANT_KERNEL
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CP
901CMP
902CHMOD
903CAT
904BASH
905BASENAME
906DATE_WHEN_CONFIGURED
907CONFIGURE_COMMAND_LINE
908CUSTOM_MAKE_DIR
909target_alias
910host_alias
911build_alias
912LIBS
913ECHO_T
914ECHO_N
915ECHO_C
916DEFS
917mandir
918localedir
919libdir
920psdir
921pdfdir
922dvidir
923htmldir
924infodir
925docdir
926oldincludedir
927includedir
928localstatedir
929sharedstatedir
930sysconfdir
931datadir
932datarootdir
933libexecdir
934sbindir
935bindir
936program_transform_name
937prefix
938exec_prefix
939PACKAGE_URL
940PACKAGE_BUGREPORT
941PACKAGE_STRING
942PACKAGE_VERSION
943PACKAGE_TARNAME
944PACKAGE_NAME
945PATH_SEPARATOR
946SHELL'
947ac_subst_files=''
948ac_user_opts='
949enable_option_checking
950with_custom_make_dir
951with_target_bits
952with_sys_root
953with_tools_dir
954with_devkit
955with_jdk_variant
956with_jvm_variants
957enable_debug
958with_debug_level
959with_conf_name
960with_builddeps_conf
961with_builddeps_server
962with_builddeps_dir
963with_builddeps_group
964enable_openjdk_only
965enable_headful
966enable_hotspot_test_in_build
967with_cacerts_file
968enable_unlimited_crypto
969with_boot_jdk
970with_boot_jdk_jvmargs
971with_add_source_root
972with_override_source_root
973with_adds_and_overrides
974with_override_langtools
975with_override_corba
976with_override_jaxp
977with_override_jaxws
978with_override_hotspot
979with_override_jdk
980with_import_hotspot
981with_msvcr_dll
982with_extra_cflags
983with_extra_cxxflags
984with_extra_ldflags
985enable_debug_symbols
986enable_zip_debug_info
987enable_macosx_runtime_support
988with_x
989with_cups
990with_cups_include
991with_freetype
992with_alsa
993with_alsa_include
994with_alsa_lib
995with_zlib
996with_stdc__lib
997with_num_cores
998with_memory_size
999with_sjavac_server_java
1000with_sjavac_server_cores
1001enable_sjavac
1002enable_precompiled_headers
1003enable_ccache
1004with_ccache_dir
1005'
1006      ac_precious_vars='build_alias
1007host_alias
1008target_alias
1009PKG_CONFIG
1010CC
1011CFLAGS
1012LDFLAGS
1013LIBS
1014CPPFLAGS
1015CXX
1016CXXFLAGS
1017CCC
1018OBJC
1019OBJCFLAGS
1020CPP
1021CXXCPP
1022XMKMF
1023FREETYPE2_CFLAGS
1024FREETYPE2_LIBS
1025ALSA_CFLAGS
1026ALSA_LIBS'
1027
1028
1029# Initialize some variables set by options.
1030ac_init_help=
1031ac_init_version=false
1032ac_unrecognized_opts=
1033ac_unrecognized_sep=
1034# The variables have the same names as the options, with
1035# dashes changed to underlines.
1036cache_file=/dev/null
1037exec_prefix=NONE
1038no_create=
1039no_recursion=
1040prefix=NONE
1041program_prefix=NONE
1042program_suffix=NONE
1043program_transform_name=s,x,x,
1044silent=
1045site=
1046srcdir=
1047verbose=
1048x_includes=NONE
1049x_libraries=NONE
1050
1051# Installation directory options.
1052# These are left unexpanded so users can "make install exec_prefix=/foo"
1053# and all the variables that are supposed to be based on exec_prefix
1054# by default will actually change.
1055# Use braces instead of parens because sh, perl, etc. also accept them.
1056# (The list follows the same order as the GNU Coding Standards.)
1057bindir='${exec_prefix}/bin'
1058sbindir='${exec_prefix}/sbin'
1059libexecdir='${exec_prefix}/libexec'
1060datarootdir='${prefix}/share'
1061datadir='${datarootdir}'
1062sysconfdir='${prefix}/etc'
1063sharedstatedir='${prefix}/com'
1064localstatedir='${prefix}/var'
1065includedir='${prefix}/include'
1066oldincludedir='/usr/include'
1067docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1068infodir='${datarootdir}/info'
1069htmldir='${docdir}'
1070dvidir='${docdir}'
1071pdfdir='${docdir}'
1072psdir='${docdir}'
1073libdir='${exec_prefix}/lib'
1074localedir='${datarootdir}/locale'
1075mandir='${datarootdir}/man'
1076
1077ac_prev=
1078ac_dashdash=
1079for ac_option
1080do
1081  # If the previous option needs an argument, assign it.
1082  if test -n "$ac_prev"; then
1083    eval $ac_prev=\$ac_option
1084    ac_prev=
1085    continue
1086  fi
1087
1088  case $ac_option in
1089  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1090  *=)   ac_optarg= ;;
1091  *)    ac_optarg=yes ;;
1092  esac
1093
1094  # Accept the important Cygnus configure options, so we can diagnose typos.
1095
1096  case $ac_dashdash$ac_option in
1097  --)
1098    ac_dashdash=yes ;;
1099
1100  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1101    ac_prev=bindir ;;
1102  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1103    bindir=$ac_optarg ;;
1104
1105  -build | --build | --buil | --bui | --bu)
1106    ac_prev=build_alias ;;
1107  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1108    build_alias=$ac_optarg ;;
1109
1110  -cache-file | --cache-file | --cache-fil | --cache-fi \
1111  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1112    ac_prev=cache_file ;;
1113  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1114  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1115    cache_file=$ac_optarg ;;
1116
1117  --config-cache | -C)
1118    cache_file=config.cache ;;
1119
1120  -datadir | --datadir | --datadi | --datad)
1121    ac_prev=datadir ;;
1122  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1123    datadir=$ac_optarg ;;
1124
1125  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1126  | --dataroo | --dataro | --datar)
1127    ac_prev=datarootdir ;;
1128  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1129  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1130    datarootdir=$ac_optarg ;;
1131
1132  -disable-* | --disable-*)
1133    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1134    # Reject names that are not valid shell variable names.
1135    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136      as_fn_error $? "invalid feature name: $ac_useropt"
1137    ac_useropt_orig=$ac_useropt
1138    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139    case $ac_user_opts in
1140      *"
1141"enable_$ac_useropt"
1142"*) ;;
1143      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1144	 ac_unrecognized_sep=', ';;
1145    esac
1146    eval enable_$ac_useropt=no ;;
1147
1148  -docdir | --docdir | --docdi | --doc | --do)
1149    ac_prev=docdir ;;
1150  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1151    docdir=$ac_optarg ;;
1152
1153  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1154    ac_prev=dvidir ;;
1155  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1156    dvidir=$ac_optarg ;;
1157
1158  -enable-* | --enable-*)
1159    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1160    # Reject names that are not valid shell variable names.
1161    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1162      as_fn_error $? "invalid feature name: $ac_useropt"
1163    ac_useropt_orig=$ac_useropt
1164    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165    case $ac_user_opts in
1166      *"
1167"enable_$ac_useropt"
1168"*) ;;
1169      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1170	 ac_unrecognized_sep=', ';;
1171    esac
1172    eval enable_$ac_useropt=\$ac_optarg ;;
1173
1174  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1175  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1176  | --exec | --exe | --ex)
1177    ac_prev=exec_prefix ;;
1178  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1179  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1180  | --exec=* | --exe=* | --ex=*)
1181    exec_prefix=$ac_optarg ;;
1182
1183  -gas | --gas | --ga | --g)
1184    # Obsolete; use --with-gas.
1185    with_gas=yes ;;
1186
1187  -help | --help | --hel | --he | -h)
1188    ac_init_help=long ;;
1189  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1190    ac_init_help=recursive ;;
1191  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1192    ac_init_help=short ;;
1193
1194  -host | --host | --hos | --ho)
1195    ac_prev=host_alias ;;
1196  -host=* | --host=* | --hos=* | --ho=*)
1197    host_alias=$ac_optarg ;;
1198
1199  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1200    ac_prev=htmldir ;;
1201  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1202  | --ht=*)
1203    htmldir=$ac_optarg ;;
1204
1205  -includedir | --includedir | --includedi | --included | --include \
1206  | --includ | --inclu | --incl | --inc)
1207    ac_prev=includedir ;;
1208  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1209  | --includ=* | --inclu=* | --incl=* | --inc=*)
1210    includedir=$ac_optarg ;;
1211
1212  -infodir | --infodir | --infodi | --infod | --info | --inf)
1213    ac_prev=infodir ;;
1214  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1215    infodir=$ac_optarg ;;
1216
1217  -libdir | --libdir | --libdi | --libd)
1218    ac_prev=libdir ;;
1219  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1220    libdir=$ac_optarg ;;
1221
1222  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1223  | --libexe | --libex | --libe)
1224    ac_prev=libexecdir ;;
1225  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1226  | --libexe=* | --libex=* | --libe=*)
1227    libexecdir=$ac_optarg ;;
1228
1229  -localedir | --localedir | --localedi | --localed | --locale)
1230    ac_prev=localedir ;;
1231  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1232    localedir=$ac_optarg ;;
1233
1234  -localstatedir | --localstatedir | --localstatedi | --localstated \
1235  | --localstate | --localstat | --localsta | --localst | --locals)
1236    ac_prev=localstatedir ;;
1237  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1238  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1239    localstatedir=$ac_optarg ;;
1240
1241  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1242    ac_prev=mandir ;;
1243  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1244    mandir=$ac_optarg ;;
1245
1246  -nfp | --nfp | --nf)
1247    # Obsolete; use --without-fp.
1248    with_fp=no ;;
1249
1250  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1251  | --no-cr | --no-c | -n)
1252    no_create=yes ;;
1253
1254  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1255  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1256    no_recursion=yes ;;
1257
1258  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1259  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1260  | --oldin | --oldi | --old | --ol | --o)
1261    ac_prev=oldincludedir ;;
1262  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1263  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1264  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1265    oldincludedir=$ac_optarg ;;
1266
1267  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1268    ac_prev=prefix ;;
1269  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1270    prefix=$ac_optarg ;;
1271
1272  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1273  | --program-pre | --program-pr | --program-p)
1274    ac_prev=program_prefix ;;
1275  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1276  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1277    program_prefix=$ac_optarg ;;
1278
1279  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1280  | --program-suf | --program-su | --program-s)
1281    ac_prev=program_suffix ;;
1282  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1283  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1284    program_suffix=$ac_optarg ;;
1285
1286  -program-transform-name | --program-transform-name \
1287  | --program-transform-nam | --program-transform-na \
1288  | --program-transform-n | --program-transform- \
1289  | --program-transform | --program-transfor \
1290  | --program-transfo | --program-transf \
1291  | --program-trans | --program-tran \
1292  | --progr-tra | --program-tr | --program-t)
1293    ac_prev=program_transform_name ;;
1294  -program-transform-name=* | --program-transform-name=* \
1295  | --program-transform-nam=* | --program-transform-na=* \
1296  | --program-transform-n=* | --program-transform-=* \
1297  | --program-transform=* | --program-transfor=* \
1298  | --program-transfo=* | --program-transf=* \
1299  | --program-trans=* | --program-tran=* \
1300  | --progr-tra=* | --program-tr=* | --program-t=*)
1301    program_transform_name=$ac_optarg ;;
1302
1303  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1304    ac_prev=pdfdir ;;
1305  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1306    pdfdir=$ac_optarg ;;
1307
1308  -psdir | --psdir | --psdi | --psd | --ps)
1309    ac_prev=psdir ;;
1310  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1311    psdir=$ac_optarg ;;
1312
1313  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1314  | -silent | --silent | --silen | --sile | --sil)
1315    silent=yes ;;
1316
1317  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1318    ac_prev=sbindir ;;
1319  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1320  | --sbi=* | --sb=*)
1321    sbindir=$ac_optarg ;;
1322
1323  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1324  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1325  | --sharedst | --shareds | --shared | --share | --shar \
1326  | --sha | --sh)
1327    ac_prev=sharedstatedir ;;
1328  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1329  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1330  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1331  | --sha=* | --sh=*)
1332    sharedstatedir=$ac_optarg ;;
1333
1334  -site | --site | --sit)
1335    ac_prev=site ;;
1336  -site=* | --site=* | --sit=*)
1337    site=$ac_optarg ;;
1338
1339  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1340    ac_prev=srcdir ;;
1341  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1342    srcdir=$ac_optarg ;;
1343
1344  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1345  | --syscon | --sysco | --sysc | --sys | --sy)
1346    ac_prev=sysconfdir ;;
1347  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1348  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1349    sysconfdir=$ac_optarg ;;
1350
1351  -target | --target | --targe | --targ | --tar | --ta | --t)
1352    ac_prev=target_alias ;;
1353  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1354    target_alias=$ac_optarg ;;
1355
1356  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1357    verbose=yes ;;
1358
1359  -version | --version | --versio | --versi | --vers | -V)
1360    ac_init_version=: ;;
1361
1362  -with-* | --with-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid package name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"with_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval with_$ac_useropt=\$ac_optarg ;;
1377
1378  -without-* | --without-*)
1379    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1380    # Reject names that are not valid shell variable names.
1381    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1382      as_fn_error $? "invalid package name: $ac_useropt"
1383    ac_useropt_orig=$ac_useropt
1384    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1385    case $ac_user_opts in
1386      *"
1387"with_$ac_useropt"
1388"*) ;;
1389      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1390	 ac_unrecognized_sep=', ';;
1391    esac
1392    eval with_$ac_useropt=no ;;
1393
1394  --x)
1395    # Obsolete; use --with-x.
1396    with_x=yes ;;
1397
1398  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1399  | --x-incl | --x-inc | --x-in | --x-i)
1400    ac_prev=x_includes ;;
1401  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1402  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1403    x_includes=$ac_optarg ;;
1404
1405  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1406  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1407    ac_prev=x_libraries ;;
1408  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1409  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1410    x_libraries=$ac_optarg ;;
1411
1412  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1413Try \`$0 --help' for more information"
1414    ;;
1415
1416  *=*)
1417    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1418    # Reject names that are not valid shell variable names.
1419    case $ac_envvar in #(
1420      '' | [0-9]* | *[!_$as_cr_alnum]* )
1421      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1422    esac
1423    eval $ac_envvar=\$ac_optarg
1424    export $ac_envvar ;;
1425
1426  *)
1427    # FIXME: should be removed in autoconf 3.0.
1428    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1429    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1430      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1431    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1432    ;;
1433
1434  esac
1435done
1436
1437if test -n "$ac_prev"; then
1438  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1439  as_fn_error $? "missing argument to $ac_option"
1440fi
1441
1442if test -n "$ac_unrecognized_opts"; then
1443  case $enable_option_checking in
1444    no) ;;
1445    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1446    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1447  esac
1448fi
1449
1450# Check all directory arguments for consistency.
1451for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1452		datadir sysconfdir sharedstatedir localstatedir includedir \
1453		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1454		libdir localedir mandir
1455do
1456  eval ac_val=\$$ac_var
1457  # Remove trailing slashes.
1458  case $ac_val in
1459    */ )
1460      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1461      eval $ac_var=\$ac_val;;
1462  esac
1463  # Be sure to have absolute directory names.
1464  case $ac_val in
1465    [\\/$]* | ?:[\\/]* )  continue;;
1466    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1467  esac
1468  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1469done
1470
1471# There might be people who depend on the old broken behavior: `$host'
1472# used to hold the argument of --host etc.
1473# FIXME: To remove some day.
1474build=$build_alias
1475host=$host_alias
1476target=$target_alias
1477
1478# FIXME: To remove some day.
1479if test "x$host_alias" != x; then
1480  if test "x$build_alias" = x; then
1481    cross_compiling=maybe
1482    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1483    If a cross compiler is detected then cross compile mode will be used" >&2
1484  elif test "x$build_alias" != "x$host_alias"; then
1485    cross_compiling=yes
1486  fi
1487fi
1488
1489ac_tool_prefix=
1490test -n "$host_alias" && ac_tool_prefix=$host_alias-
1491
1492test "$silent" = yes && exec 6>/dev/null
1493
1494
1495ac_pwd=`pwd` && test -n "$ac_pwd" &&
1496ac_ls_di=`ls -di .` &&
1497ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1498  as_fn_error $? "working directory cannot be determined"
1499test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1500  as_fn_error $? "pwd does not report name of working directory"
1501
1502
1503# Find the source files, if location was not specified.
1504if test -z "$srcdir"; then
1505  ac_srcdir_defaulted=yes
1506  # Try the directory containing this script, then the parent directory.
1507  ac_confdir=`$as_dirname -- "$as_myself" ||
1508$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1509	 X"$as_myself" : 'X\(//\)[^/]' \| \
1510	 X"$as_myself" : 'X\(//\)$' \| \
1511	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1512$as_echo X"$as_myself" |
1513    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1514	    s//\1/
1515	    q
1516	  }
1517	  /^X\(\/\/\)[^/].*/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)$/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\).*/{
1526	    s//\1/
1527	    q
1528	  }
1529	  s/.*/./; q'`
1530  srcdir=$ac_confdir
1531  if test ! -r "$srcdir/$ac_unique_file"; then
1532    srcdir=..
1533  fi
1534else
1535  ac_srcdir_defaulted=no
1536fi
1537if test ! -r "$srcdir/$ac_unique_file"; then
1538  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1539  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1540fi
1541ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1542ac_abs_confdir=`(
1543	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1544	pwd)`
1545# When building in place, set srcdir=.
1546if test "$ac_abs_confdir" = "$ac_pwd"; then
1547  srcdir=.
1548fi
1549# Remove unnecessary trailing slashes from srcdir.
1550# Double slashes in file names in object file debugging info
1551# mess up M-x gdb in Emacs.
1552case $srcdir in
1553*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1554esac
1555for ac_var in $ac_precious_vars; do
1556  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1557  eval ac_env_${ac_var}_value=\$${ac_var}
1558  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1560done
1561
1562#
1563# Report the --help message.
1564#
1565if test "$ac_init_help" = "long"; then
1566  # Omit some internal or obsolete options to make the list less imposing.
1567  # This message is too long to be a string in the A/UX 3.1 sh.
1568  cat <<_ACEOF
1569\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1570
1571Usage: $0 [OPTION]... [VAR=VALUE]...
1572
1573To assign environment variables (e.g., CC, CFLAGS...), specify them as
1574VAR=VALUE.  See below for descriptions of some of the useful variables.
1575
1576Defaults for the options are specified in brackets.
1577
1578Configuration:
1579  -h, --help              display this help and exit
1580      --help=short        display options specific to this package
1581      --help=recursive    display the short help of all the included packages
1582  -V, --version           display version information and exit
1583  -q, --quiet, --silent   do not print \`checking ...' messages
1584      --cache-file=FILE   cache test results in FILE [disabled]
1585  -C, --config-cache      alias for \`--cache-file=config.cache'
1586  -n, --no-create         do not create output files
1587      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1588
1589Installation directories:
1590  --prefix=PREFIX         install architecture-independent files in PREFIX
1591                          [$ac_default_prefix]
1592  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1593                          [PREFIX]
1594
1595By default, \`make install' will install all the files in
1596\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1597an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1598for instance \`--prefix=\$HOME'.
1599
1600For better control, use the options below.
1601
1602Fine tuning of the installation directories:
1603  --bindir=DIR            user executables [EPREFIX/bin]
1604  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1605  --libexecdir=DIR        program executables [EPREFIX/libexec]
1606  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1607  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1608  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1609  --libdir=DIR            object code libraries [EPREFIX/lib]
1610  --includedir=DIR        C header files [PREFIX/include]
1611  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1612  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1613  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1614  --infodir=DIR           info documentation [DATAROOTDIR/info]
1615  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1616  --mandir=DIR            man documentation [DATAROOTDIR/man]
1617  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1618  --htmldir=DIR           html documentation [DOCDIR]
1619  --dvidir=DIR            dvi documentation [DOCDIR]
1620  --pdfdir=DIR            pdf documentation [DOCDIR]
1621  --psdir=DIR             ps documentation [DOCDIR]
1622_ACEOF
1623
1624  cat <<\_ACEOF
1625
1626X features:
1627  --x-includes=DIR    X include files are in DIR
1628  --x-libraries=DIR   X library files are in DIR
1629
1630System types:
1631  --build=BUILD     configure for building on BUILD [guessed]
1632  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1633  --target=TARGET   configure for building compilers for TARGET [HOST]
1634_ACEOF
1635fi
1636
1637if test -n "$ac_init_help"; then
1638  case $ac_init_help in
1639     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1640   esac
1641  cat <<\_ACEOF
1642
1643Optional Features:
1644  --disable-option-checking  ignore unrecognized --enable/--with options
1645  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1646  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1647  --enable-debug          set the debug level to fastdebug (shorthand for
1648                          --with-debug-level=fastdebug) [disabled]
1649  --enable-openjdk-only   supress building closed source even if present
1650                          [disabled]
1651  --disable-headful       disable building headful support (graphical UI
1652                          support) [enabled]
1653  --enable-hotspot-test-in-build
1654                          run the Queens test after Hotspot build [disabled]
1655  --enable-unlimited-crypto
1656                          Enable unlimited crypto policy [disabled]
1657  --disable-debug-symbols disable generation of debug symbols [enabled]
1658  --disable-zip-debug-info
1659                          disable zipping of debug-info files [enabled]
1660  --disable-macosx-runtime-support
1661                          disable the use of MacOSX Java runtime support
1662                          framework [enabled]
1663  --enable-sjavac         use sjavac to do fast incremental compiles
1664                          [disabled]
1665  --disable-precompiled-headers
1666                          disable using precompiled headers when compiling C++
1667                          [enabled]
1668  --disable-ccache        disable using ccache to speed up recompilations
1669                          [enabled]
1670
1671Optional Packages:
1672  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1673  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1674  --with-custom-make-dir  use this directory for custom build/make files
1675  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1676                          support it), e.g. --with-target-bits=32 [guessed]
1677  --with-sys-root         pass this sys-root to the compilers and tools (for
1678                          cross-compiling)
1679  --with-tools-dir        search this directory for compilers and tools (for
1680                          cross-compiling)
1681  --with-devkit           use this directory as base for tools-dir and
1682                          sys-root (for cross-compiling)
1683  --with-jdk-variant      JDK variant to build (normal) [normal]
1684  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1685                          client, kernel, zero, zeroshark) [server]
1686  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1687                          [release]
1688  --with-conf-name        use this as the name of the configuration [generated
1689                          from important configuration options]
1690  --with-builddeps-conf   use this configuration file for the builddeps
1691  --with-builddeps-server download and use build dependencies from this server
1692                          url
1693  --with-builddeps-dir    store downloaded build dependencies here
1694                          [/localhome/builddeps]
1695  --with-builddeps-group  chgrp the downloaded build dependencies to this
1696                          group
1697  --with-cacerts-file     specify alternative cacerts file
1698  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1699  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1700                          invocations of the Boot JDK, overriding the default
1701                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1702                          -enableassertions"
1703  --with-add-source-root  for each and every source directory, look in this
1704                          additional source root for the same directory; if it
1705                          exists and have files in it, include it in the build
1706  --with-override-source-root
1707                          for each and every source directory, look in this
1708                          override source root for the same directory; if it
1709                          exists, use that directory instead and ignore the
1710                          directory in the original source root
1711  --with-adds-and-overrides
1712                          use the subdirs 'adds' and 'overrides' in the
1713                          specified directory as add-source-root and
1714                          override-source-root
1715  --with-override-langtools
1716                          use this langtools dir for the build
1717  --with-override-corba   use this corba dir for the build
1718  --with-override-jaxp    use this jaxp dir for the build
1719  --with-override-jaxws   use this jaxws dir for the build
1720  --with-override-hotspot use this hotspot dir for the build
1721  --with-override-jdk     use this jdk dir for the build
1722  --with-import-hotspot   import hotspot binaries from this jdk image or
1723                          hotspot build dist dir instead of building from
1724                          source
1725  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1726                          only) [probed]
1727  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1728  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1729  --with-extra-ldflags    extra flags to be used when linking jdk
1730  --with-x                use the X Window System
1731  --with-cups             specify prefix directory for the cups package
1732                          (expecting the headers under PATH/include)
1733  --with-cups-include     specify directory for the cups include files
1734  --with-freetype         specify prefix directory for the freetype2 package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa             specify prefix directory for the alsa package
1738                          (expecting the libraries under PATH/lib and the
1739                          headers under PATH/include)
1740  --with-alsa-include     specify directory for the alsa include files
1741  --with-alsa-lib         specify directory for the alsa library
1742  --with-zlib             use zlib from build system or OpenJDK source
1743                          (system, bundled) [bundled]
1744  --with-stdc++lib=<static>,<dynamic>,<default>
1745                          force linking of the C++ runtime on Linux to either
1746                          static or dynamic, default is static with dynamic as
1747                          fallback
1748  --with-num-cores        number of cores in the build system, e.g.
1749                          --with-num-cores=8 [probed]
1750  --with-memory-size      memory (in MB) available in the build system, e.g.
1751                          --with-memory-size=1024 [probed]
1752  --with-sjavac-server-java
1753                          use this java binary for running the sjavac
1754                          background server [Boot JDK java]
1755  --with-sjavac-server-cores
1756                          use at most this number of concurrent threads on the
1757                          sjavac server [probed]
1758  --with-ccache-dir       where to store ccache files [~/.ccache]
1759
1760Some influential environment variables:
1761  PKG_CONFIG  path to pkg-config utility
1762  CC          C compiler command
1763  CFLAGS      C compiler flags
1764  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1765              nonstandard directory <lib dir>
1766  LIBS        libraries to pass to the linker, e.g. -l<library>
1767  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1768              you have headers in a nonstandard directory <include dir>
1769  CXX         C++ compiler command
1770  CXXFLAGS    C++ compiler flags
1771  OBJC        Objective C compiler command
1772  OBJCFLAGS   Objective C compiler flags
1773  CPP         C preprocessor
1774  CXXCPP      C++ preprocessor
1775  XMKMF       Path to xmkmf, Makefile generator for X Window System
1776  FREETYPE2_CFLAGS
1777              C compiler flags for FREETYPE2, overriding pkg-config
1778  FREETYPE2_LIBS
1779              linker flags for FREETYPE2, overriding pkg-config
1780  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1781  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1782
1783Use these variables to override the choices made by `configure' or to help
1784it to find libraries and programs with nonstandard names/locations.
1785
1786Report bugs to <build-dev@openjdk.java.net>.
1787OpenJDK home page: <http://openjdk.java.net>.
1788_ACEOF
1789ac_status=$?
1790fi
1791
1792if test "$ac_init_help" = "recursive"; then
1793  # If there are subdirs, report their specific --help.
1794  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1795    test -d "$ac_dir" ||
1796      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1797      continue
1798    ac_builddir=.
1799
1800case "$ac_dir" in
1801.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1802*)
1803  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1804  # A ".." for each directory in $ac_dir_suffix.
1805  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1806  case $ac_top_builddir_sub in
1807  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1809  esac ;;
1810esac
1811ac_abs_top_builddir=$ac_pwd
1812ac_abs_builddir=$ac_pwd$ac_dir_suffix
1813# for backward compatibility:
1814ac_top_builddir=$ac_top_build_prefix
1815
1816case $srcdir in
1817  .)  # We are building in place.
1818    ac_srcdir=.
1819    ac_top_srcdir=$ac_top_builddir_sub
1820    ac_abs_top_srcdir=$ac_pwd ;;
1821  [\\/]* | ?:[\\/]* )  # Absolute name.
1822    ac_srcdir=$srcdir$ac_dir_suffix;
1823    ac_top_srcdir=$srcdir
1824    ac_abs_top_srcdir=$srcdir ;;
1825  *) # Relative name.
1826    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1827    ac_top_srcdir=$ac_top_build_prefix$srcdir
1828    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1829esac
1830ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1831
1832    cd "$ac_dir" || { ac_status=$?; continue; }
1833    # Check for guested configure.
1834    if test -f "$ac_srcdir/configure.gnu"; then
1835      echo &&
1836      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1837    elif test -f "$ac_srcdir/configure"; then
1838      echo &&
1839      $SHELL "$ac_srcdir/configure" --help=recursive
1840    else
1841      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1842    fi || ac_status=$?
1843    cd "$ac_pwd" || { ac_status=$?; break; }
1844  done
1845fi
1846
1847test -n "$ac_init_help" && exit $ac_status
1848if $ac_init_version; then
1849  cat <<\_ACEOF
1850OpenJDK configure jdk8
1851generated by GNU Autoconf 2.67
1852
1853Copyright (C) 2010 Free Software Foundation, Inc.
1854This configure script is free software; the Free Software Foundation
1855gives unlimited permission to copy, distribute and modify it.
1856_ACEOF
1857  exit
1858fi
1859
1860## ------------------------ ##
1861## Autoconf initialization. ##
1862## ------------------------ ##
1863
1864# ac_fn_c_try_compile LINENO
1865# --------------------------
1866# Try to compile conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_compile ()
1868{
1869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870  rm -f conftest.$ac_objext
1871  if { { ac_try="$ac_compile"
1872case "(($ac_try" in
1873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874  *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878  (eval "$ac_compile") 2>conftest.err
1879  ac_status=$?
1880  if test -s conftest.err; then
1881    grep -v '^ *+' conftest.err >conftest.er1
1882    cat conftest.er1 >&5
1883    mv -f conftest.er1 conftest.err
1884  fi
1885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886  test $ac_status = 0; } && {
1887	 test -z "$ac_c_werror_flag" ||
1888	 test ! -s conftest.err
1889       } && test -s conftest.$ac_objext; then :
1890  ac_retval=0
1891else
1892  $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895	ac_retval=1
1896fi
1897  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1898  as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_compile
1901
1902# ac_fn_cxx_try_compile LINENO
1903# ----------------------------
1904# Try to compile conftest.$ac_ext, and return whether this succeeded.
1905ac_fn_cxx_try_compile ()
1906{
1907  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908  rm -f conftest.$ac_objext
1909  if { { ac_try="$ac_compile"
1910case "(($ac_try" in
1911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912  *) ac_try_echo=$ac_try;;
1913esac
1914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915$as_echo "$ac_try_echo"; } >&5
1916  (eval "$ac_compile") 2>conftest.err
1917  ac_status=$?
1918  if test -s conftest.err; then
1919    grep -v '^ *+' conftest.err >conftest.er1
1920    cat conftest.er1 >&5
1921    mv -f conftest.er1 conftest.err
1922  fi
1923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924  test $ac_status = 0; } && {
1925	 test -z "$ac_cxx_werror_flag" ||
1926	 test ! -s conftest.err
1927       } && test -s conftest.$ac_objext; then :
1928  ac_retval=0
1929else
1930  $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933	ac_retval=1
1934fi
1935  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1936  as_fn_set_status $ac_retval
1937
1938} # ac_fn_cxx_try_compile
1939
1940# ac_fn_objc_try_compile LINENO
1941# -----------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_objc_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_objc_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_objc_try_compile
1977
1978# ac_fn_c_try_cpp LINENO
1979# ----------------------
1980# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_c_try_cpp ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  if { { ac_try="$ac_cpp conftest.$ac_ext"
1985case "(($ac_try" in
1986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987  *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1992  ac_status=$?
1993  if test -s conftest.err; then
1994    grep -v '^ *+' conftest.err >conftest.er1
1995    cat conftest.er1 >&5
1996    mv -f conftest.er1 conftest.err
1997  fi
1998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999  test $ac_status = 0; } > conftest.i && {
2000	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2001	 test ! -s conftest.err
2002       }; then :
2003  ac_retval=0
2004else
2005  $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
2008    ac_retval=1
2009fi
2010  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011  as_fn_set_status $ac_retval
2012
2013} # ac_fn_c_try_cpp
2014
2015# ac_fn_cxx_try_cpp LINENO
2016# ------------------------
2017# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_cxx_try_cpp ()
2019{
2020  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021  if { { ac_try="$ac_cpp conftest.$ac_ext"
2022case "(($ac_try" in
2023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024  *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2029  ac_status=$?
2030  if test -s conftest.err; then
2031    grep -v '^ *+' conftest.err >conftest.er1
2032    cat conftest.er1 >&5
2033    mv -f conftest.er1 conftest.err
2034  fi
2035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036  test $ac_status = 0; } > conftest.i && {
2037	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2038	 test ! -s conftest.err
2039       }; then :
2040  ac_retval=0
2041else
2042  $as_echo "$as_me: failed program was:" >&5
2043sed 's/^/| /' conftest.$ac_ext >&5
2044
2045    ac_retval=1
2046fi
2047  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2048  as_fn_set_status $ac_retval
2049
2050} # ac_fn_cxx_try_cpp
2051
2052# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2053# ---------------------------------------------------------
2054# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2055# the include files in INCLUDES and setting the cache variable VAR
2056# accordingly.
2057ac_fn_cxx_check_header_mongrel ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if eval "test \"\${$3+set}\"" = set; then :
2061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2062$as_echo_n "checking for $2... " >&6; }
2063if eval "test \"\${$3+set}\"" = set; then :
2064  $as_echo_n "(cached) " >&6
2065fi
2066eval ac_res=\$$3
2067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2068$as_echo "$ac_res" >&6; }
2069else
2070  # Is the header compilable?
2071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2072$as_echo_n "checking $2 usability... " >&6; }
2073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h.  */
2075$4
2076#include <$2>
2077_ACEOF
2078if ac_fn_cxx_try_compile "$LINENO"; then :
2079  ac_header_compiler=yes
2080else
2081  ac_header_compiler=no
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2085$as_echo "$ac_header_compiler" >&6; }
2086
2087# Is the header present?
2088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2089$as_echo_n "checking $2 presence... " >&6; }
2090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h.  */
2092#include <$2>
2093_ACEOF
2094if ac_fn_cxx_try_cpp "$LINENO"; then :
2095  ac_header_preproc=yes
2096else
2097  ac_header_preproc=no
2098fi
2099rm -f conftest.err conftest.i conftest.$ac_ext
2100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2101$as_echo "$ac_header_preproc" >&6; }
2102
2103# So?  What about this header?
2104case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2105  yes:no: )
2106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2107$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2109$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2110    ;;
2111  no:yes:* )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2113$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2115$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2117$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2119$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2121$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2122( $as_echo "## ----------------------------------------- ##
2123## Report this to build-dev@openjdk.java.net ##
2124## ----------------------------------------- ##"
2125     ) | sed "s/^/$as_me: WARNING:     /" >&2
2126    ;;
2127esac
2128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129$as_echo_n "checking for $2... " >&6; }
2130if eval "test \"\${$3+set}\"" = set; then :
2131  $as_echo_n "(cached) " >&6
2132else
2133  eval "$3=\$ac_header_compiler"
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138fi
2139  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2140
2141} # ac_fn_cxx_check_header_mongrel
2142
2143# ac_fn_cxx_try_run LINENO
2144# ------------------------
2145# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2146# that executables *can* be run.
2147ac_fn_cxx_try_run ()
2148{
2149  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150  if { { ac_try="$ac_link"
2151case "(($ac_try" in
2152  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153  *) ac_try_echo=$ac_try;;
2154esac
2155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156$as_echo "$ac_try_echo"; } >&5
2157  (eval "$ac_link") 2>&5
2158  ac_status=$?
2159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2160  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2161  { { case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_try") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; }; }; then :
2171  ac_retval=0
2172else
2173  $as_echo "$as_me: program exited with status $ac_status" >&5
2174       $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177       ac_retval=$ac_status
2178fi
2179  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2180  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181  as_fn_set_status $ac_retval
2182
2183} # ac_fn_cxx_try_run
2184
2185# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2186# ---------------------------------------------------------
2187# Tests whether HEADER exists and can be compiled using the include files in
2188# INCLUDES, setting the cache variable VAR accordingly.
2189ac_fn_cxx_check_header_compile ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
2194if eval "test \"\${$3+set}\"" = set; then :
2195  $as_echo_n "(cached) " >&6
2196else
2197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199$4
2200#include <$2>
2201_ACEOF
2202if ac_fn_cxx_try_compile "$LINENO"; then :
2203  eval "$3=yes"
2204else
2205  eval "$3=no"
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209eval ac_res=\$$3
2210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211$as_echo "$ac_res" >&6; }
2212  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2213
2214} # ac_fn_cxx_check_header_compile
2215
2216# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2217# ----------------------------------------------
2218# Tries to find the compile-time value of EXPR in a program that includes
2219# INCLUDES, setting VAR accordingly. Returns whether the value could be
2220# computed
2221ac_fn_cxx_compute_int ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  if test "$cross_compiling" = yes; then
2225    # Depending upon the size, compute the lo and hi bounds.
2226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= 0)];
2233test_array [0] = 0
2234
2235  ;
2236  return 0;
2237}
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  ac_lo=0 ac_mid=0
2241  while :; do
2242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h.  */
2244$4
2245int
2246main ()
2247{
2248static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2249test_array [0] = 0
2250
2251  ;
2252  return 0;
2253}
2254_ACEOF
2255if ac_fn_cxx_try_compile "$LINENO"; then :
2256  ac_hi=$ac_mid; break
2257else
2258  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2259			if test $ac_lo -le $ac_mid; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266  done
2267else
2268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) < 0)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_hi=-1 ac_mid=-1
2283  while :; do
2284    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h.  */
2286$4
2287int
2288main ()
2289{
2290static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2291test_array [0] = 0
2292
2293  ;
2294  return 0;
2295}
2296_ACEOF
2297if ac_fn_cxx_try_compile "$LINENO"; then :
2298  ac_lo=$ac_mid; break
2299else
2300  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301			if test $ac_mid -le $ac_hi; then
2302			  ac_lo= ac_hi=
2303			  break
2304			fi
2305			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308  done
2309else
2310  ac_lo= ac_hi=
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315# Binary search between lo and hi bounds.
2316while test "x$ac_lo" != "x$ac_hi"; do
2317  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2325test_array [0] = 0
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_cxx_try_compile "$LINENO"; then :
2332  ac_hi=$ac_mid
2333else
2334  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337done
2338case $ac_lo in #((
2339?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340'') ac_retval=1 ;;
2341esac
2342  else
2343    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346static long int longval () { return $2; }
2347static unsigned long int ulongval () { return $2; }
2348#include <stdio.h>
2349#include <stdlib.h>
2350int
2351main ()
2352{
2353
2354  FILE *f = fopen ("conftest.val", "w");
2355  if (! f)
2356    return 1;
2357  if (($2) < 0)
2358    {
2359      long int i = longval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%ld", i);
2363    }
2364  else
2365    {
2366      unsigned long int i = ulongval ();
2367      if (i != ($2))
2368	return 1;
2369      fprintf (f, "%lu", i);
2370    }
2371  /* Do not output a trailing newline, as this causes \r\n confusion
2372     on some platforms.  */
2373  return ferror (f) || fclose (f) != 0;
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_run "$LINENO"; then :
2380  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381else
2382  ac_retval=1
2383fi
2384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385  conftest.$ac_objext conftest.beam conftest.$ac_ext
2386rm -f conftest.val
2387
2388  fi
2389  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2390  as_fn_set_status $ac_retval
2391
2392} # ac_fn_cxx_compute_int
2393
2394# ac_fn_cxx_try_link LINENO
2395# -------------------------
2396# Try to link conftest.$ac_ext, and return whether this succeeded.
2397ac_fn_cxx_try_link ()
2398{
2399  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400  rm -f conftest.$ac_objext conftest$ac_exeext
2401  if { { ac_try="$ac_link"
2402case "(($ac_try" in
2403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404  *) ac_try_echo=$ac_try;;
2405esac
2406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407$as_echo "$ac_try_echo"; } >&5
2408  (eval "$ac_link") 2>conftest.err
2409  ac_status=$?
2410  if test -s conftest.err; then
2411    grep -v '^ *+' conftest.err >conftest.er1
2412    cat conftest.er1 >&5
2413    mv -f conftest.er1 conftest.err
2414  fi
2415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416  test $ac_status = 0; } && {
2417	 test -z "$ac_cxx_werror_flag" ||
2418	 test ! -s conftest.err
2419       } && test -s conftest$ac_exeext && {
2420	 test "$cross_compiling" = yes ||
2421	 $as_test_x conftest$ac_exeext
2422       }; then :
2423  ac_retval=0
2424else
2425  $as_echo "$as_me: failed program was:" >&5
2426sed 's/^/| /' conftest.$ac_ext >&5
2427
2428	ac_retval=1
2429fi
2430  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2431  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2432  # interfere with the next link command; also delete a directory that is
2433  # left behind by Apple's compiler.  We do this before executing the actions.
2434  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_try_link
2439
2440# ac_fn_cxx_check_func LINENO FUNC VAR
2441# ------------------------------------
2442# Tests whether FUNC exists, setting the cache variable VAR accordingly
2443ac_fn_cxx_check_func ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2447$as_echo_n "checking for $2... " >&6; }
2448if eval "test \"\${$3+set}\"" = set; then :
2449  $as_echo_n "(cached) " >&6
2450else
2451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h.  */
2453/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2454   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2455#define $2 innocuous_$2
2456
2457/* System header to define __stub macros and hopefully few prototypes,
2458    which can conflict with char $2 (); below.
2459    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2460    <limits.h> exists even on freestanding compilers.  */
2461
2462#ifdef __STDC__
2463# include <limits.h>
2464#else
2465# include <assert.h>
2466#endif
2467
2468#undef $2
2469
2470/* Override any GCC internal prototype to avoid an error.
2471   Use char because int might match the return type of a GCC
2472   builtin and then its argument prototype would still apply.  */
2473#ifdef __cplusplus
2474extern "C"
2475#endif
2476char $2 ();
2477/* The GNU C library defines this for functions which it implements
2478    to always fail with ENOSYS.  Some functions are actually named
2479    something starting with __ and the normal name is an alias.  */
2480#if defined __stub_$2 || defined __stub___$2
2481choke me
2482#endif
2483
2484int
2485main ()
2486{
2487return $2 ();
2488  ;
2489  return 0;
2490}
2491_ACEOF
2492if ac_fn_cxx_try_link "$LINENO"; then :
2493  eval "$3=yes"
2494else
2495  eval "$3=no"
2496fi
2497rm -f core conftest.err conftest.$ac_objext \
2498    conftest$ac_exeext conftest.$ac_ext
2499fi
2500eval ac_res=\$$3
2501	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2502$as_echo "$ac_res" >&6; }
2503  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2504
2505} # ac_fn_cxx_check_func
2506
2507# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2508# -------------------------------------------------------
2509# Tests whether HEADER exists and can be compiled using the include files in
2510# INCLUDES, setting the cache variable VAR accordingly.
2511ac_fn_c_check_header_compile ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515$as_echo_n "checking for $2... " >&6; }
2516if eval "test \"\${$3+set}\"" = set; then :
2517  $as_echo_n "(cached) " >&6
2518else
2519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2520/* end confdefs.h.  */
2521$4
2522#include <$2>
2523_ACEOF
2524if ac_fn_c_try_compile "$LINENO"; then :
2525  eval "$3=yes"
2526else
2527  eval "$3=no"
2528fi
2529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2530fi
2531eval ac_res=\$$3
2532	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
2534  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2535
2536} # ac_fn_c_check_header_compile
2537cat >config.log <<_ACEOF
2538This file contains any messages produced by compilers while
2539running configure, to aid debugging if configure makes a mistake.
2540
2541It was created by OpenJDK $as_me jdk8, which was
2542generated by GNU Autoconf 2.67.  Invocation command line was
2543
2544  $ $0 $@
2545
2546_ACEOF
2547exec 5>>config.log
2548{
2549cat <<_ASUNAME
2550## --------- ##
2551## Platform. ##
2552## --------- ##
2553
2554hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2555uname -m = `(uname -m) 2>/dev/null || echo unknown`
2556uname -r = `(uname -r) 2>/dev/null || echo unknown`
2557uname -s = `(uname -s) 2>/dev/null || echo unknown`
2558uname -v = `(uname -v) 2>/dev/null || echo unknown`
2559
2560/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2561/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2562
2563/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2564/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2565/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2566/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2567/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2568/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2569/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2570
2571_ASUNAME
2572
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576  IFS=$as_save_IFS
2577  test -z "$as_dir" && as_dir=.
2578    $as_echo "PATH: $as_dir"
2579  done
2580IFS=$as_save_IFS
2581
2582} >&5
2583
2584cat >&5 <<_ACEOF
2585
2586
2587## ----------- ##
2588## Core tests. ##
2589## ----------- ##
2590
2591_ACEOF
2592
2593
2594# Keep a trace of the command line.
2595# Strip out --no-create and --no-recursion so they do not pile up.
2596# Strip out --silent because we don't want to record it for future runs.
2597# Also quote any args containing shell meta-characters.
2598# Make two passes to allow for proper duplicate-argument suppression.
2599ac_configure_args=
2600ac_configure_args0=
2601ac_configure_args1=
2602ac_must_keep_next=false
2603for ac_pass in 1 2
2604do
2605  for ac_arg
2606  do
2607    case $ac_arg in
2608    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2609    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2610    | -silent | --silent | --silen | --sile | --sil)
2611      continue ;;
2612    *\'*)
2613      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2614    esac
2615    case $ac_pass in
2616    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2617    2)
2618      as_fn_append ac_configure_args1 " '$ac_arg'"
2619      if test $ac_must_keep_next = true; then
2620	ac_must_keep_next=false # Got value, back to normal.
2621      else
2622	case $ac_arg in
2623	  *=* | --config-cache | -C | -disable-* | --disable-* \
2624	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2625	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2626	  | -with-* | --with-* | -without-* | --without-* | --x)
2627	    case "$ac_configure_args0 " in
2628	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2629	    esac
2630	    ;;
2631	  -* ) ac_must_keep_next=true ;;
2632	esac
2633      fi
2634      as_fn_append ac_configure_args " '$ac_arg'"
2635      ;;
2636    esac
2637  done
2638done
2639{ ac_configure_args0=; unset ac_configure_args0;}
2640{ ac_configure_args1=; unset ac_configure_args1;}
2641
2642# When interrupted or exit'd, cleanup temporary files, and complete
2643# config.log.  We remove comments because anyway the quotes in there
2644# would cause problems or look ugly.
2645# WARNING: Use '\'' to represent an apostrophe within the trap.
2646# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2647trap 'exit_status=$?
2648  # Save into config.log some information that might help in debugging.
2649  {
2650    echo
2651
2652    $as_echo "## ---------------- ##
2653## Cache variables. ##
2654## ---------------- ##"
2655    echo
2656    # The following way of writing the cache mishandles newlines in values,
2657(
2658  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2659    eval ac_val=\$$ac_var
2660    case $ac_val in #(
2661    *${as_nl}*)
2662      case $ac_var in #(
2663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2665      esac
2666      case $ac_var in #(
2667      _ | IFS | as_nl) ;; #(
2668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2669      *) { eval $ac_var=; unset $ac_var;} ;;
2670      esac ;;
2671    esac
2672  done
2673  (set) 2>&1 |
2674    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2675    *${as_nl}ac_space=\ *)
2676      sed -n \
2677	"s/'\''/'\''\\\\'\'''\''/g;
2678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2679      ;; #(
2680    *)
2681      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2682      ;;
2683    esac |
2684    sort
2685)
2686    echo
2687
2688    $as_echo "## ----------------- ##
2689## Output variables. ##
2690## ----------------- ##"
2691    echo
2692    for ac_var in $ac_subst_vars
2693    do
2694      eval ac_val=\$$ac_var
2695      case $ac_val in
2696      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2697      esac
2698      $as_echo "$ac_var='\''$ac_val'\''"
2699    done | sort
2700    echo
2701
2702    if test -n "$ac_subst_files"; then
2703      $as_echo "## ------------------- ##
2704## File substitutions. ##
2705## ------------------- ##"
2706      echo
2707      for ac_var in $ac_subst_files
2708      do
2709	eval ac_val=\$$ac_var
2710	case $ac_val in
2711	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2712	esac
2713	$as_echo "$ac_var='\''$ac_val'\''"
2714      done | sort
2715      echo
2716    fi
2717
2718    if test -s confdefs.h; then
2719      $as_echo "## ----------- ##
2720## confdefs.h. ##
2721## ----------- ##"
2722      echo
2723      cat confdefs.h
2724      echo
2725    fi
2726    test "$ac_signal" != 0 &&
2727      $as_echo "$as_me: caught signal $ac_signal"
2728    $as_echo "$as_me: exit $exit_status"
2729  } >&5
2730  rm -f core *.core core.conftest.* &&
2731    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2732    exit $exit_status
2733' 0
2734for ac_signal in 1 2 13 15; do
2735  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2736done
2737ac_signal=0
2738
2739# confdefs.h avoids OS command line length limits that DEFS can exceed.
2740rm -f -r conftest* confdefs.h
2741
2742$as_echo "/* confdefs.h */" > confdefs.h
2743
2744# Predefined preprocessor variables.
2745
2746cat >>confdefs.h <<_ACEOF
2747#define PACKAGE_NAME "$PACKAGE_NAME"
2748_ACEOF
2749
2750cat >>confdefs.h <<_ACEOF
2751#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2752_ACEOF
2753
2754cat >>confdefs.h <<_ACEOF
2755#define PACKAGE_VERSION "$PACKAGE_VERSION"
2756_ACEOF
2757
2758cat >>confdefs.h <<_ACEOF
2759#define PACKAGE_STRING "$PACKAGE_STRING"
2760_ACEOF
2761
2762cat >>confdefs.h <<_ACEOF
2763#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2764_ACEOF
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_URL "$PACKAGE_URL"
2768_ACEOF
2769
2770
2771# Let the site file select an alternate cache file if it wants to.
2772# Prefer an explicitly selected file to automatically selected ones.
2773ac_site_file1=NONE
2774ac_site_file2=NONE
2775if test -n "$CONFIG_SITE"; then
2776  # We do not want a PATH search for config.site.
2777  case $CONFIG_SITE in #((
2778    -*)  ac_site_file1=./$CONFIG_SITE;;
2779    */*) ac_site_file1=$CONFIG_SITE;;
2780    *)   ac_site_file1=./$CONFIG_SITE;;
2781  esac
2782elif test "x$prefix" != xNONE; then
2783  ac_site_file1=$prefix/share/config.site
2784  ac_site_file2=$prefix/etc/config.site
2785else
2786  ac_site_file1=$ac_default_prefix/share/config.site
2787  ac_site_file2=$ac_default_prefix/etc/config.site
2788fi
2789for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2790do
2791  test "x$ac_site_file" = xNONE && continue
2792  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2793    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2794$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2795    sed 's/^/| /' "$ac_site_file" >&5
2796    . "$ac_site_file" \
2797      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2799as_fn_error $? "failed to load site script $ac_site_file
2800See \`config.log' for more details" "$LINENO" 5 ; }
2801  fi
2802done
2803
2804if test -r "$cache_file"; then
2805  # Some versions of bash will fail to source /dev/null (special files
2806  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2807  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2808    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2809$as_echo "$as_me: loading cache $cache_file" >&6;}
2810    case $cache_file in
2811      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2812      *)                      . "./$cache_file";;
2813    esac
2814  fi
2815else
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2817$as_echo "$as_me: creating cache $cache_file" >&6;}
2818  >$cache_file
2819fi
2820
2821# Check that the precious variables saved in the cache have kept the same
2822# value.
2823ac_cache_corrupted=false
2824for ac_var in $ac_precious_vars; do
2825  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2826  eval ac_new_set=\$ac_env_${ac_var}_set
2827  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2828  eval ac_new_val=\$ac_env_${ac_var}_value
2829  case $ac_old_set,$ac_new_set in
2830    set,)
2831      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2832$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2833      ac_cache_corrupted=: ;;
2834    ,set)
2835      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2836$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2837      ac_cache_corrupted=: ;;
2838    ,);;
2839    *)
2840      if test "x$ac_old_val" != "x$ac_new_val"; then
2841	# differences in whitespace do not lead to failure.
2842	ac_old_val_w=`echo x $ac_old_val`
2843	ac_new_val_w=`echo x $ac_new_val`
2844	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2845	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2846$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2847	  ac_cache_corrupted=:
2848	else
2849	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2850$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2851	  eval $ac_var=\$ac_old_val
2852	fi
2853	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2854$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2856$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2857      fi;;
2858  esac
2859  # Pass precious variables to config.status.
2860  if test "$ac_new_set" = set; then
2861    case $ac_new_val in
2862    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2863    *) ac_arg=$ac_var=$ac_new_val ;;
2864    esac
2865    case " $ac_configure_args " in
2866      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2867      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2868    esac
2869  fi
2870done
2871if $ac_cache_corrupted; then
2872  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2875$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2876  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2877fi
2878## -------------------- ##
2879## Main body of script. ##
2880## -------------------- ##
2881
2882ac_ext=c
2883ac_cpp='$CPP $CPPFLAGS'
2884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2886ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887
2888
2889
2890ac_aux_dir=
2891for ac_dir in build-aux "$srcdir"/build-aux; do
2892  if test -f "$ac_dir/install-sh"; then
2893    ac_aux_dir=$ac_dir
2894    ac_install_sh="$ac_aux_dir/install-sh -c"
2895    break
2896  elif test -f "$ac_dir/install.sh"; then
2897    ac_aux_dir=$ac_dir
2898    ac_install_sh="$ac_aux_dir/install.sh -c"
2899    break
2900  elif test -f "$ac_dir/shtool"; then
2901    ac_aux_dir=$ac_dir
2902    ac_install_sh="$ac_aux_dir/shtool install -c"
2903    break
2904  fi
2905done
2906if test -z "$ac_aux_dir"; then
2907  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2917
2918
2919# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2920#
2921# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2922#
2923# This program is free software; you can redistribute it and/or modify
2924# it under the terms of the GNU General Public License as published by
2925# the Free Software Foundation; either version 2 of the License, or
2926# (at your option) any later version.
2927#
2928# This program is distributed in the hope that it will be useful, but
2929# WITHOUT ANY WARRANTY; without even the implied warranty of
2930# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2931# General Public License for more details.
2932#
2933# You should have received a copy of the GNU General Public License
2934# along with this program; if not, write to the Free Software
2935# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2936#
2937# As a special exception to the GNU General Public License, if you
2938# distribute this file as part of a program that contains a
2939# configuration script generated by Autoconf, you may include it under
2940# the same distribution terms that you use for the rest of that program.
2941
2942# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2943# ----------------------------------
2944# PKG_PROG_PKG_CONFIG
2945
2946# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2947#
2948# Check to see whether a particular set of modules exists.  Similar
2949# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2950#
2951#
2952# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2953# this or PKG_CHECK_MODULES is called, or make sure to call
2954# PKG_CHECK_EXISTS manually
2955# --------------------------------------------------------------
2956
2957
2958
2959# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2960# ---------------------------------------------
2961# _PKG_CONFIG
2962
2963# _PKG_SHORT_ERRORS_SUPPORTED
2964# -----------------------------
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966
2967
2968# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2969# [ACTION-IF-NOT-FOUND])
2970#
2971#
2972# Note that if there is a possibility the first call to
2973# PKG_CHECK_MODULES might not happen, you should be sure to include an
2974# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2975#
2976#
2977# --------------------------------------------------------------
2978# PKG_CHECK_MODULES
2979
2980
2981# Include these first...
2982#
2983# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2985#
2986# This code is free software; you can redistribute it and/or modify it
2987# under the terms of the GNU General Public License version 2 only, as
2988# published by the Free Software Foundation.  Oracle designates this
2989# particular file as subject to the "Classpath" exception as provided
2990# by Oracle in the LICENSE file that accompanied this code.
2991#
2992# This code is distributed in the hope that it will be useful, but WITHOUT
2993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2995# version 2 for more details (a copy is included in the LICENSE file that
2996# accompanied this code).
2997#
2998# You should have received a copy of the GNU General Public License version
2999# 2 along with this work; if not, write to the Free Software Foundation,
3000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3001#
3002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3003# or visit www.oracle.com if you need additional information or have any
3004# questions.
3005#
3006
3007
3008
3009# This will make sure the given variable points to a full and proper
3010# path. This means:
3011# 1) There will be no spaces in the path. On posix platforms,
3012#    spaces in the path will result in an error. On Windows,
3013#    the path will be rewritten using short-style to be space-free.
3014# 2) The path will be absolute, and it will be in unix-style (on
3015#     cygwin).
3016# $1: The name of the variable to fix
3017
3018
3019# This will make sure the given variable points to a executable
3020# with a full and proper path. This means:
3021# 1) There will be no spaces in the path. On posix platforms,
3022#    spaces in the path will result in an error. On Windows,
3023#    the path will be rewritten using short-style to be space-free.
3024# 2) The path will be absolute, and it will be in unix-style (on
3025#     cygwin).
3026# Any arguments given to the executable is preserved.
3027# If the input variable does not have a directory specification, then
3028# it need to be in the PATH.
3029# $1: The name of the variable to fix
3030
3031
3032
3033
3034
3035
3036# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3037# $1: variable to check
3038# $2: executable name to print in warning (optional)
3039
3040
3041# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3042# Arguments as AC_PATH_PROG:
3043# $1: variable to set
3044# $2: executable name to look for
3045
3046
3047# Setup the most fundamental tools that relies on not much else to set up,
3048# but is used by much of the early bootstrap code.
3049
3050
3051# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3052
3053
3054
3055
3056
3057
3058
3059#%%% Simple tools %%%
3060
3061# Check if we have found a usable version of make
3062# $1: the path to a potential make binary (or empty)
3063# $2: the description on how we found this
3064
3065
3066# Goes looking for a usable version of GNU make.
3067
3068
3069
3070
3071
3072
3073# Check if build directory is on local disk. If not possible to determine,
3074# we prefer to claim it's local.
3075# Argument 1: directory to test
3076# Argument 2: what to do if it is on local disk
3077# Argument 3: what to do otherwise (remote disk or failure)
3078
3079
3080
3081
3082#
3083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3085#
3086# This code is free software; you can redistribute it and/or modify it
3087# under the terms of the GNU General Public License version 2 only, as
3088# published by the Free Software Foundation.  Oracle designates this
3089# particular file as subject to the "Classpath" exception as provided
3090# by Oracle in the LICENSE file that accompanied this code.
3091#
3092# This code is distributed in the hope that it will be useful, but WITHOUT
3093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3095# version 2 for more details (a copy is included in the LICENSE file that
3096# accompanied this code).
3097#
3098# You should have received a copy of the GNU General Public License version
3099# 2 along with this work; if not, write to the Free Software Foundation,
3100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3101#
3102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3103# or visit www.oracle.com if you need additional information or have any
3104# questions.
3105#
3106
3107
3108
3109
3110
3111# Helper function which possibly converts a path using DOS-style short mode.
3112# If so, the updated path is stored in $new_path.
3113# $1: The path to check
3114
3115
3116# Helper function which possibly converts a path using DOS-style short mode.
3117# If so, the updated path is stored in $new_path.
3118# $1: The path to check
3119
3120
3121# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3122# and could probably be heavily simplified. However, all changes in this
3123# area tend to need lot of testing in different scenarios, and in lack of
3124# proper unit testing, cleaning this up has not been deemed worth the effort
3125# at the moment.
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3136
3137
3138
3139
3140#
3141# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3142# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3143#
3144# This code is free software; you can redistribute it and/or modify it
3145# under the terms of the GNU General Public License version 2 only, as
3146# published by the Free Software Foundation.  Oracle designates this
3147# particular file as subject to the "Classpath" exception as provided
3148# by Oracle in the LICENSE file that accompanied this code.
3149#
3150# This code is distributed in the hope that it will be useful, but WITHOUT
3151# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3152# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3153# version 2 for more details (a copy is included in the LICENSE file that
3154# accompanied this code).
3155#
3156# You should have received a copy of the GNU General Public License version
3157# 2 along with this work; if not, write to the Free Software Foundation,
3158# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3159#
3160# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3161# or visit www.oracle.com if you need additional information or have any
3162# questions.
3163#
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# ... then the rest
3176#
3177# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3178# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3179#
3180# This code is free software; you can redistribute it and/or modify it
3181# under the terms of the GNU General Public License version 2 only, as
3182# published by the Free Software Foundation.  Oracle designates this
3183# particular file as subject to the "Classpath" exception as provided
3184# by Oracle in the LICENSE file that accompanied this code.
3185#
3186# This code is distributed in the hope that it will be useful, but WITHOUT
3187# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3188# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3189# version 2 for more details (a copy is included in the LICENSE file that
3190# accompanied this code).
3191#
3192# You should have received a copy of the GNU General Public License version
3193# 2 along with this work; if not, write to the Free Software Foundation,
3194# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3195#
3196# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3197# or visit www.oracle.com if you need additional information or have any
3198# questions.
3199#
3200
3201# Execute the check given as argument, and verify the result
3202# If the Boot JDK was previously found, do nothing
3203# $1 A command line (typically autoconf macro) to execute
3204
3205
3206# Test: Is bootjdk explicitely set by command line arguments?
3207
3208
3209# Test: Is bootjdk available from builddeps?
3210
3211
3212# Test: Is $JAVA_HOME set?
3213
3214
3215# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3216
3217
3218# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3219
3220
3221# Look for a jdk in the given path. If there are multiple, try to select the newest.
3222# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3223# $1 = Path to directory containing jdk installations.
3224# $2 = String to append to the found JDK directory to get the proper JDK home
3225
3226
3227# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3228# environmental variable as base for where to look.
3229# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3230
3231
3232# Test: Is there a JDK installed in default, well-known locations?
3233
3234
3235# Check that a command-line tool in the Boot JDK is correct
3236# $1 = name of variable to assign
3237# $2 = name of binary
3238
3239
3240###############################################################################
3241#
3242# We need a Boot JDK to bootstrap the build.
3243#
3244
3245
3246
3247
3248
3249#
3250# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291#
3292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3294#
3295# This code is free software; you can redistribute it and/or modify it
3296# under the terms of the GNU General Public License version 2 only, as
3297# published by the Free Software Foundation.  Oracle designates this
3298# particular file as subject to the "Classpath" exception as provided
3299# by Oracle in the LICENSE file that accompanied this code.
3300#
3301# This code is distributed in the hope that it will be useful, but WITHOUT
3302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3304# version 2 for more details (a copy is included in the LICENSE file that
3305# accompanied this code).
3306#
3307# You should have received a copy of the GNU General Public License version
3308# 2 along with this work; if not, write to the Free Software Foundation,
3309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3310#
3311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3312# or visit www.oracle.com if you need additional information or have any
3313# questions.
3314#
3315
3316
3317
3318
3319
3320cygwin_help() {
3321    case $1 in
3322    unzip)
3323        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3324    zip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3326    make)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3328    * )
3329       break ;;
3330    esac
3331}
3332
3333apt_help() {
3334    case $1 in
3335    devkit)
3336        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3337    openjdk)
3338        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3339    alsa)
3340        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3341    cups)
3342        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3343    freetype2)
3344        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3345    pulse)
3346        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3347    x11)
3348        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3349    ccache)
3350        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3351    * )
3352       break ;;
3353    esac
3354}
3355
3356yum_help() {
3357    case $1 in
3358    devkit)
3359        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3360    openjdk)
3361        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3362    alsa)
3363        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3364    cups)
3365        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3366    freetype2)
3367        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3368    pulse)
3369        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3370    x11)
3371        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3372    ccache)
3373        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3374    * )
3375       break ;;
3376    esac
3377}
3378
3379port_help() {
3380    PKGHANDLER_COMMAND=""
3381}
3382
3383pkgutil_help() {
3384    PKGHANDLER_COMMAND=""
3385}
3386
3387pkgadd_help() {
3388    PKGHANDLER_COMMAND=""
3389}
3390
3391
3392
3393#
3394# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396#
3397# This code is free software; you can redistribute it and/or modify it
3398# under the terms of the GNU General Public License version 2 only, as
3399# published by the Free Software Foundation.  Oracle designates this
3400# particular file as subject to the "Classpath" exception as provided
3401# by Oracle in the LICENSE file that accompanied this code.
3402#
3403# This code is distributed in the hope that it will be useful, but WITHOUT
3404# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406# version 2 for more details (a copy is included in the LICENSE file that
3407# accompanied this code).
3408#
3409# You should have received a copy of the GNU General Public License version
3410# 2 along with this work; if not, write to the Free Software Foundation,
3411# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412#
3413# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414# or visit www.oracle.com if you need additional information or have any
3415# questions.
3416#
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432# Support for customization of the build process. Some build files
3433# will include counterparts from this location, if they exist. This allows
3434# for a degree of customization of the build targets and the rules/recipes
3435# to create them
3436
3437# Check whether --with-custom-make-dir was given.
3438if test "${with_custom_make_dir+set}" = set; then :
3439  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3440fi
3441
3442
3443
3444#
3445# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3447#
3448# This code is free software; you can redistribute it and/or modify it
3449# under the terms of the GNU General Public License version 2 only, as
3450# published by the Free Software Foundation.  Oracle designates this
3451# particular file as subject to the "Classpath" exception as provided
3452# by Oracle in the LICENSE file that accompanied this code.
3453#
3454# This code is distributed in the hope that it will be useful, but WITHOUT
3455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3457# version 2 for more details (a copy is included in the LICENSE file that
3458# accompanied this code).
3459#
3460# You should have received a copy of the GNU General Public License version
3461# 2 along with this work; if not, write to the Free Software Foundation,
3462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3463#
3464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3465# or visit www.oracle.com if you need additional information or have any
3466# questions.
3467#
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3509# Converts autoconf style CPU name to OpenJDK style, into
3510# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3511
3512
3513# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3514# Converts autoconf style OS name to OpenJDK style, into
3515# VAR_OS and VAR_OS_API.
3516
3517
3518# Expects $host_os $host_cpu $build_os and $build_cpu
3519# and $with_target_bits to have been setup!
3520#
3521# Translate the standard triplet(quadruplet) definition
3522# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3523# OPENJDK_BUILD_OS, etc.
3524
3525
3526# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3527# accordingly. Must be done after setting up build and target system, but before
3528# doing anything else with these values.
3529
3530
3531    # Setup the legacy variables, for controlling the old makefiles.
3532    #
3533
3534
3535
3536
3537#%%% Build and target systems %%%
3538
3539
3540
3541
3542# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3543# Add -mX to various FLAGS variables.
3544
3545
3546
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575
3576
3577
3578
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609
3610
3611
3612
3613
3614# $1 = compiler to test (CC or CXX)
3615# $2 = human readable name of compiler (C or C++)
3616# $3 = list of compiler names to search for
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629#
3630# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3632#
3633# This code is free software; you can redistribute it and/or modify it
3634# under the terms of the GNU General Public License version 2 only, as
3635# published by the Free Software Foundation.  Oracle designates this
3636# particular file as subject to the "Classpath" exception as provided
3637# by Oracle in the LICENSE file that accompanied this code.
3638#
3639# This code is distributed in the hope that it will be useful, but WITHOUT
3640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3642# version 2 for more details (a copy is included in the LICENSE file that
3643# accompanied this code).
3644#
3645# You should have received a copy of the GNU General Public License version
3646# 2 along with this work; if not, write to the Free Software Foundation,
3647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3648#
3649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3650# or visit www.oracle.com if you need additional information or have any
3651# questions.
3652#
3653
3654
3655
3656
3657
3658
3659
3660# Check if the VS env variables were setup prior to running configure.
3661# If not, then find vcvarsall.bat and run it automatically, and integrate
3662# the set env variables into the spec file.
3663
3664
3665
3666
3667
3668
3669# This line needs to be here, verbatim, after all includes and the dummy hook
3670# definitions. It is replaced with custom functionality when building
3671# custom sources.
3672#CUSTOM_AUTOCONF_INCLUDE
3673
3674# Do not change or remove the following line, it is needed for consistency checks:
3675DATE_WHEN_GENERATED=1354526713
3676
3677###############################################################################
3678#
3679# Initialization / Boot-strapping
3680#
3681# The bootstrapping process needs to solve the "chicken or the egg" problem,
3682# thus it jumps back and forth, each time gaining something needed later on.
3683#
3684###############################################################################
3685
3686# Basic initialization that must happen first of all
3687
3688# Save the original command line. This is passed to us by the wrapper configure script.
3689
3690DATE_WHEN_CONFIGURED=`LANG=C date`
3691
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3693$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3695$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3696
3697
3698
3699# Start with tools that do not need have cross compilation support
3700# and can be expected to be found in the default PATH. These tools are
3701# used by configure. Nor are these tools expected to be found in the
3702# devkit from the builddeps server either, since they are
3703# needed to download the devkit.
3704
3705# First are all the simple required tools.
3706
3707    for ac_prog in basename
3708do
3709  # Extract the first word of "$ac_prog", so it can be a program name with args.
3710set dummy $ac_prog; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if test "${ac_cv_path_BASENAME+set}" = set; then :
3714  $as_echo_n "(cached) " >&6
3715else
3716  case $BASENAME in
3717  [\\/]* | ?:[\\/]*)
3718  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3719  ;;
3720  *)
3721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724  IFS=$as_save_IFS
3725  test -z "$as_dir" && as_dir=.
3726    for ac_exec_ext in '' $ac_executable_extensions; do
3727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3728    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3730    break 2
3731  fi
3732done
3733  done
3734IFS=$as_save_IFS
3735
3736  ;;
3737esac
3738fi
3739BASENAME=$ac_cv_path_BASENAME
3740if test -n "$BASENAME"; then
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3742$as_echo "$BASENAME" >&6; }
3743else
3744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749  test -n "$BASENAME" && break
3750done
3751
3752
3753    if test "x$BASENAME" = x; then
3754        if test "xbasename" = x; then
3755          PROG_NAME=basename
3756        else
3757          PROG_NAME=basename
3758        fi
3759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3761        as_fn_error $? "Cannot continue" "$LINENO" 5
3762    fi
3763
3764
3765
3766    for ac_prog in bash
3767do
3768  # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
3772if test "${ac_cv_path_BASH+set}" = set; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775  case $BASH in
3776  [\\/]* | ?:[\\/]*)
3777  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3778  ;;
3779  *)
3780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  test -z "$as_dir" && as_dir=.
3785    for ac_exec_ext in '' $ac_executable_extensions; do
3786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789    break 2
3790  fi
3791done
3792  done
3793IFS=$as_save_IFS
3794
3795  ;;
3796esac
3797fi
3798BASH=$ac_cv_path_BASH
3799if test -n "$BASH"; then
3800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3801$as_echo "$BASH" >&6; }
3802else
3803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
3805fi
3806
3807
3808  test -n "$BASH" && break
3809done
3810
3811
3812    if test "x$BASH" = x; then
3813        if test "xbash" = x; then
3814          PROG_NAME=bash
3815        else
3816          PROG_NAME=bash
3817        fi
3818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3820        as_fn_error $? "Cannot continue" "$LINENO" 5
3821    fi
3822
3823
3824
3825    for ac_prog in cat
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if test "${ac_cv_path_CAT+set}" = set; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $CAT in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857CAT=$ac_cv_path_CAT
3858if test -n "$CAT"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3860$as_echo "$CAT" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$CAT" && break
3868done
3869
3870
3871    if test "x$CAT" = x; then
3872        if test "xcat" = x; then
3873          PROG_NAME=cat
3874        else
3875          PROG_NAME=cat
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in chmod
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if test "${ac_cv_path_CHMOD+set}" = set; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $CHMOD in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916CHMOD=$ac_cv_path_CHMOD
3917if test -n "$CHMOD"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3919$as_echo "$CHMOD" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$CHMOD" && break
3927done
3928
3929
3930    if test "x$CHMOD" = x; then
3931        if test "xchmod" = x; then
3932          PROG_NAME=chmod
3933        else
3934          PROG_NAME=chmod
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in cmp
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if test "${ac_cv_path_CMP+set}" = set; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CMP in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CMP=$ac_cv_path_CMP
3976if test -n "$CMP"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3978$as_echo "$CMP" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CMP" && break
3986done
3987
3988
3989    if test "x$CMP" = x; then
3990        if test "xcmp" = x; then
3991          PROG_NAME=cmp
3992        else
3993          PROG_NAME=cmp
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in cp
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if test "${ac_cv_path_CP+set}" = set; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CP in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CP=$ac_cv_path_CP
4035if test -n "$CP"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4037$as_echo "$CP" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CP" && break
4045done
4046
4047
4048    if test "x$CP" = x; then
4049        if test "xcp" = x; then
4050          PROG_NAME=cp
4051        else
4052          PROG_NAME=cp
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in cut
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if test "${ac_cv_path_CUT+set}" = set; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $CUT in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093CUT=$ac_cv_path_CUT
4094if test -n "$CUT"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4096$as_echo "$CUT" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$CUT" && break
4104done
4105
4106
4107    if test "x$CUT" = x; then
4108        if test "xcut" = x; then
4109          PROG_NAME=cut
4110        else
4111          PROG_NAME=cut
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in date
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if test "${ac_cv_path_DATE+set}" = set; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $DATE in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152DATE=$ac_cv_path_DATE
4153if test -n "$DATE"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4155$as_echo "$DATE" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$DATE" && break
4163done
4164
4165
4166    if test "x$DATE" = x; then
4167        if test "xdate" = x; then
4168          PROG_NAME=date
4169        else
4170          PROG_NAME=date
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in gdiff diff
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if test "${ac_cv_path_DIFF+set}" = set; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $DIFF in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211DIFF=$ac_cv_path_DIFF
4212if test -n "$DIFF"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4214$as_echo "$DIFF" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$DIFF" && break
4222done
4223
4224
4225    if test "x$DIFF" = x; then
4226        if test "xgdiff diff" = x; then
4227          PROG_NAME=diff
4228        else
4229          PROG_NAME=gdiff diff
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in dirname
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if test "${ac_cv_path_DIRNAME+set}" = set; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $DIRNAME in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270DIRNAME=$ac_cv_path_DIRNAME
4271if test -n "$DIRNAME"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4273$as_echo "$DIRNAME" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$DIRNAME" && break
4281done
4282
4283
4284    if test "x$DIRNAME" = x; then
4285        if test "xdirname" = x; then
4286          PROG_NAME=dirname
4287        else
4288          PROG_NAME=dirname
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in echo
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if test "${ac_cv_path_ECHO+set}" = set; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $ECHO in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329ECHO=$ac_cv_path_ECHO
4330if test -n "$ECHO"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4332$as_echo "$ECHO" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$ECHO" && break
4340done
4341
4342
4343    if test "x$ECHO" = x; then
4344        if test "xecho" = x; then
4345          PROG_NAME=echo
4346        else
4347          PROG_NAME=echo
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in expr
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if test "${ac_cv_path_EXPR+set}" = set; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $EXPR in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388EXPR=$ac_cv_path_EXPR
4389if test -n "$EXPR"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4391$as_echo "$EXPR" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$EXPR" && break
4399done
4400
4401
4402    if test "x$EXPR" = x; then
4403        if test "xexpr" = x; then
4404          PROG_NAME=expr
4405        else
4406          PROG_NAME=expr
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in file
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if test "${ac_cv_path_FILE+set}" = set; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $FILE in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447FILE=$ac_cv_path_FILE
4448if test -n "$FILE"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4450$as_echo "$FILE" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$FILE" && break
4458done
4459
4460
4461    if test "x$FILE" = x; then
4462        if test "xfile" = x; then
4463          PROG_NAME=file
4464        else
4465          PROG_NAME=file
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in find
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if test "${ac_cv_path_FIND+set}" = set; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $FIND in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506FIND=$ac_cv_path_FIND
4507if test -n "$FIND"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4509$as_echo "$FIND" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$FIND" && break
4517done
4518
4519
4520    if test "x$FIND" = x; then
4521        if test "xfind" = x; then
4522          PROG_NAME=find
4523        else
4524          PROG_NAME=find
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in head
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if test "${ac_cv_path_HEAD+set}" = set; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $HEAD in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565HEAD=$ac_cv_path_HEAD
4566if test -n "$HEAD"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4568$as_echo "$HEAD" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$HEAD" && break
4576done
4577
4578
4579    if test "x$HEAD" = x; then
4580        if test "xhead" = x; then
4581          PROG_NAME=head
4582        else
4583          PROG_NAME=head
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in ln
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if test "${ac_cv_path_LN+set}" = set; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $LN in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624LN=$ac_cv_path_LN
4625if test -n "$LN"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4627$as_echo "$LN" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$LN" && break
4635done
4636
4637
4638    if test "x$LN" = x; then
4639        if test "xln" = x; then
4640          PROG_NAME=ln
4641        else
4642          PROG_NAME=ln
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in ls
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_path_LS+set}" = set; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $LS in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683LS=$ac_cv_path_LS
4684if test -n "$LS"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4686$as_echo "$LS" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$LS" && break
4694done
4695
4696
4697    if test "x$LS" = x; then
4698        if test "xls" = x; then
4699          PROG_NAME=ls
4700        else
4701          PROG_NAME=ls
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in mkdir
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if test "${ac_cv_path_MKDIR+set}" = set; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $MKDIR in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742MKDIR=$ac_cv_path_MKDIR
4743if test -n "$MKDIR"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4745$as_echo "$MKDIR" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$MKDIR" && break
4753done
4754
4755
4756    if test "x$MKDIR" = x; then
4757        if test "xmkdir" = x; then
4758          PROG_NAME=mkdir
4759        else
4760          PROG_NAME=mkdir
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in mktemp
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_path_MKTEMP+set}" = set; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $MKTEMP in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801MKTEMP=$ac_cv_path_MKTEMP
4802if test -n "$MKTEMP"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4804$as_echo "$MKTEMP" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$MKTEMP" && break
4812done
4813
4814
4815    if test "x$MKTEMP" = x; then
4816        if test "xmktemp" = x; then
4817          PROG_NAME=mktemp
4818        else
4819          PROG_NAME=mktemp
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in mv
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_path_MV+set}" = set; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $MV in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860MV=$ac_cv_path_MV
4861if test -n "$MV"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4863$as_echo "$MV" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$MV" && break
4871done
4872
4873
4874    if test "x$MV" = x; then
4875        if test "xmv" = x; then
4876          PROG_NAME=mv
4877        else
4878          PROG_NAME=mv
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in printf
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_path_PRINTF+set}" = set; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $PRINTF in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919PRINTF=$ac_cv_path_PRINTF
4920if test -n "$PRINTF"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4922$as_echo "$PRINTF" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$PRINTF" && break
4930done
4931
4932
4933    if test "x$PRINTF" = x; then
4934        if test "xprintf" = x; then
4935          PROG_NAME=printf
4936        else
4937          PROG_NAME=printf
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in pwd
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $THEPWDCMD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978THEPWDCMD=$ac_cv_path_THEPWDCMD
4979if test -n "$THEPWDCMD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4981$as_echo "$THEPWDCMD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$THEPWDCMD" && break
4989done
4990
4991
4992    if test "x$THEPWDCMD" = x; then
4993        if test "xpwd" = x; then
4994          PROG_NAME=thepwdcmd
4995        else
4996          PROG_NAME=pwd
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in rm
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if test "${ac_cv_path_RM+set}" = set; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $RM in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037RM=$ac_cv_path_RM
5038if test -n "$RM"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5040$as_echo "$RM" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$RM" && break
5048done
5049
5050
5051    if test "x$RM" = x; then
5052        if test "xrm" = x; then
5053          PROG_NAME=rm
5054        else
5055          PROG_NAME=rm
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in sh
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_path_SH+set}" = set; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $SH in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096SH=$ac_cv_path_SH
5097if test -n "$SH"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5099$as_echo "$SH" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$SH" && break
5107done
5108
5109
5110    if test "x$SH" = x; then
5111        if test "xsh" = x; then
5112          PROG_NAME=sh
5113        else
5114          PROG_NAME=sh
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in sort
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if test "${ac_cv_path_SORT+set}" = set; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $SORT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155SORT=$ac_cv_path_SORT
5156if test -n "$SORT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5158$as_echo "$SORT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$SORT" && break
5166done
5167
5168
5169    if test "x$SORT" = x; then
5170        if test "xsort" = x; then
5171          PROG_NAME=sort
5172        else
5173          PROG_NAME=sort
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in tail
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if test "${ac_cv_path_TAIL+set}" = set; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $TAIL in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214TAIL=$ac_cv_path_TAIL
5215if test -n "$TAIL"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5217$as_echo "$TAIL" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$TAIL" && break
5225done
5226
5227
5228    if test "x$TAIL" = x; then
5229        if test "xtail" = x; then
5230          PROG_NAME=tail
5231        else
5232          PROG_NAME=tail
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in tar
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if test "${ac_cv_path_TAR+set}" = set; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $TAR in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273TAR=$ac_cv_path_TAR
5274if test -n "$TAR"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5276$as_echo "$TAR" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$TAR" && break
5284done
5285
5286
5287    if test "x$TAR" = x; then
5288        if test "xtar" = x; then
5289          PROG_NAME=tar
5290        else
5291          PROG_NAME=tar
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in tee
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_TEE+set}" = set; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $TEE in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332TEE=$ac_cv_path_TEE
5333if test -n "$TEE"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5335$as_echo "$TEE" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$TEE" && break
5343done
5344
5345
5346    if test "x$TEE" = x; then
5347        if test "xtee" = x; then
5348          PROG_NAME=tee
5349        else
5350          PROG_NAME=tee
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in touch
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_path_TOUCH+set}" = set; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TOUCH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TOUCH=$ac_cv_path_TOUCH
5392if test -n "$TOUCH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5394$as_echo "$TOUCH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TOUCH" && break
5402done
5403
5404
5405    if test "x$TOUCH" = x; then
5406        if test "xtouch" = x; then
5407          PROG_NAME=touch
5408        else
5409          PROG_NAME=touch
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tr
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if test "${ac_cv_path_TR+set}" = set; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TR=$ac_cv_path_TR
5451if test -n "$TR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5453$as_echo "$TR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TR" && break
5461done
5462
5463
5464    if test "x$TR" = x; then
5465        if test "xtr" = x; then
5466          PROG_NAME=tr
5467        else
5468          PROG_NAME=tr
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in uname
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if test "${ac_cv_path_UNAME+set}" = set; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $UNAME in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509UNAME=$ac_cv_path_UNAME
5510if test -n "$UNAME"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5512$as_echo "$UNAME" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$UNAME" && break
5520done
5521
5522
5523    if test "x$UNAME" = x; then
5524        if test "xuname" = x; then
5525          PROG_NAME=uname
5526        else
5527          PROG_NAME=uname
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in uniq
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if test "${ac_cv_path_UNIQ+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $UNIQ in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568UNIQ=$ac_cv_path_UNIQ
5569if test -n "$UNIQ"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5571$as_echo "$UNIQ" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$UNIQ" && break
5579done
5580
5581
5582    if test "x$UNIQ" = x; then
5583        if test "xuniq" = x; then
5584          PROG_NAME=uniq
5585        else
5586          PROG_NAME=uniq
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in wc
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if test "${ac_cv_path_WC+set}" = set; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $WC in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627WC=$ac_cv_path_WC
5628if test -n "$WC"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5630$as_echo "$WC" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$WC" && break
5638done
5639
5640
5641    if test "x$WC" = x; then
5642        if test "xwc" = x; then
5643          PROG_NAME=wc
5644        else
5645          PROG_NAME=wc
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in which
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if test "${ac_cv_path_WHICH+set}" = set; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $WHICH in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686WHICH=$ac_cv_path_WHICH
5687if test -n "$WHICH"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5689$as_echo "$WHICH" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$WHICH" && break
5697done
5698
5699
5700    if test "x$WHICH" = x; then
5701        if test "xwhich" = x; then
5702          PROG_NAME=which
5703        else
5704          PROG_NAME=which
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in xargs
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if test "${ac_cv_path_XARGS+set}" = set; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $XARGS in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745XARGS=$ac_cv_path_XARGS
5746if test -n "$XARGS"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5748$as_echo "$XARGS" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$XARGS" && break
5756done
5757
5758
5759    if test "x$XARGS" = x; then
5760        if test "xxargs" = x; then
5761          PROG_NAME=xargs
5762        else
5763          PROG_NAME=xargs
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772# Then required tools that require some special treatment.
5773for ac_prog in gawk mawk nawk awk
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if test "${ac_cv_prog_AWK+set}" = set; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  if test -n "$AWK"; then
5783  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5784else
5785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5786for as_dir in $PATH
5787do
5788  IFS=$as_save_IFS
5789  test -z "$as_dir" && as_dir=.
5790    for ac_exec_ext in '' $ac_executable_extensions; do
5791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5792    ac_cv_prog_AWK="$ac_prog"
5793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5794    break 2
5795  fi
5796done
5797  done
5798IFS=$as_save_IFS
5799
5800fi
5801fi
5802AWK=$ac_cv_prog_AWK
5803if test -n "$AWK"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5805$as_echo "$AWK" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$AWK" && break
5813done
5814
5815
5816    if test "x$AWK" = x; then
5817        if test "x" = x; then
5818          PROG_NAME=awk
5819        else
5820          PROG_NAME=
5821        fi
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5824        as_fn_error $? "Cannot continue" "$LINENO" 5
5825    fi
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5828$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5829if test "${ac_cv_path_GREP+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  if test -z "$GREP"; then
5833  ac_path_GREP_found=false
5834  # Loop through the user's path and test for each of PROGNAME-LIST
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_prog in grep ggrep; do
5841    for ac_exec_ext in '' $ac_executable_extensions; do
5842      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5843      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5844# Check for GNU ac_path_GREP and select it if it is found.
5845  # Check for GNU $ac_path_GREP
5846case `"$ac_path_GREP" --version 2>&1` in
5847*GNU*)
5848  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5849*)
5850  ac_count=0
5851  $as_echo_n 0123456789 >"conftest.in"
5852  while :
5853  do
5854    cat "conftest.in" "conftest.in" >"conftest.tmp"
5855    mv "conftest.tmp" "conftest.in"
5856    cp "conftest.in" "conftest.nl"
5857    $as_echo 'GREP' >> "conftest.nl"
5858    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5859    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5860    as_fn_arith $ac_count + 1 && ac_count=$as_val
5861    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5862      # Best one so far, save it but keep looking for a better one
5863      ac_cv_path_GREP="$ac_path_GREP"
5864      ac_path_GREP_max=$ac_count
5865    fi
5866    # 10*(2^10) chars as input seems more than enough
5867    test $ac_count -gt 10 && break
5868  done
5869  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5870esac
5871
5872      $ac_path_GREP_found && break 3
5873    done
5874  done
5875  done
5876IFS=$as_save_IFS
5877  if test -z "$ac_cv_path_GREP"; then
5878    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5879  fi
5880else
5881  ac_cv_path_GREP=$GREP
5882fi
5883
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5886$as_echo "$ac_cv_path_GREP" >&6; }
5887 GREP="$ac_cv_path_GREP"
5888
5889
5890
5891    if test "x$GREP" = x; then
5892        if test "x" = x; then
5893          PROG_NAME=grep
5894        else
5895          PROG_NAME=
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5903$as_echo_n "checking for egrep... " >&6; }
5904if test "${ac_cv_path_EGREP+set}" = set; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5908   then ac_cv_path_EGREP="$GREP -E"
5909   else
5910     if test -z "$EGREP"; then
5911  ac_path_EGREP_found=false
5912  # Loop through the user's path and test for each of PROGNAME-LIST
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_prog in egrep; do
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5921      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5922# Check for GNU ac_path_EGREP and select it if it is found.
5923  # Check for GNU $ac_path_EGREP
5924case `"$ac_path_EGREP" --version 2>&1` in
5925*GNU*)
5926  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5927*)
5928  ac_count=0
5929  $as_echo_n 0123456789 >"conftest.in"
5930  while :
5931  do
5932    cat "conftest.in" "conftest.in" >"conftest.tmp"
5933    mv "conftest.tmp" "conftest.in"
5934    cp "conftest.in" "conftest.nl"
5935    $as_echo 'EGREP' >> "conftest.nl"
5936    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5937    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5938    as_fn_arith $ac_count + 1 && ac_count=$as_val
5939    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5940      # Best one so far, save it but keep looking for a better one
5941      ac_cv_path_EGREP="$ac_path_EGREP"
5942      ac_path_EGREP_max=$ac_count
5943    fi
5944    # 10*(2^10) chars as input seems more than enough
5945    test $ac_count -gt 10 && break
5946  done
5947  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5948esac
5949
5950      $ac_path_EGREP_found && break 3
5951    done
5952  done
5953  done
5954IFS=$as_save_IFS
5955  if test -z "$ac_cv_path_EGREP"; then
5956    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5957  fi
5958else
5959  ac_cv_path_EGREP=$EGREP
5960fi
5961
5962   fi
5963fi
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5965$as_echo "$ac_cv_path_EGREP" >&6; }
5966 EGREP="$ac_cv_path_EGREP"
5967
5968
5969
5970    if test "x$EGREP" = x; then
5971        if test "x" = x; then
5972          PROG_NAME=egrep
5973        else
5974          PROG_NAME=
5975        fi
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5977$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5978        as_fn_error $? "Cannot continue" "$LINENO" 5
5979    fi
5980
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5982$as_echo_n "checking for fgrep... " >&6; }
5983if test "${ac_cv_path_FGREP+set}" = set; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5987   then ac_cv_path_FGREP="$GREP -F"
5988   else
5989     if test -z "$FGREP"; then
5990  ac_path_FGREP_found=false
5991  # Loop through the user's path and test for each of PROGNAME-LIST
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_prog in fgrep; do
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6000      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6001# Check for GNU ac_path_FGREP and select it if it is found.
6002  # Check for GNU $ac_path_FGREP
6003case `"$ac_path_FGREP" --version 2>&1` in
6004*GNU*)
6005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6006*)
6007  ac_count=0
6008  $as_echo_n 0123456789 >"conftest.in"
6009  while :
6010  do
6011    cat "conftest.in" "conftest.in" >"conftest.tmp"
6012    mv "conftest.tmp" "conftest.in"
6013    cp "conftest.in" "conftest.nl"
6014    $as_echo 'FGREP' >> "conftest.nl"
6015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6017    as_fn_arith $ac_count + 1 && ac_count=$as_val
6018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6019      # Best one so far, save it but keep looking for a better one
6020      ac_cv_path_FGREP="$ac_path_FGREP"
6021      ac_path_FGREP_max=$ac_count
6022    fi
6023    # 10*(2^10) chars as input seems more than enough
6024    test $ac_count -gt 10 && break
6025  done
6026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6027esac
6028
6029      $ac_path_FGREP_found && break 3
6030    done
6031  done
6032  done
6033IFS=$as_save_IFS
6034  if test -z "$ac_cv_path_FGREP"; then
6035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6036  fi
6037else
6038  ac_cv_path_FGREP=$FGREP
6039fi
6040
6041   fi
6042fi
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6044$as_echo "$ac_cv_path_FGREP" >&6; }
6045 FGREP="$ac_cv_path_FGREP"
6046
6047
6048
6049    if test "x$FGREP" = x; then
6050        if test "x" = x; then
6051          PROG_NAME=fgrep
6052        else
6053          PROG_NAME=
6054        fi
6055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6057        as_fn_error $? "Cannot continue" "$LINENO" 5
6058    fi
6059
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6061$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6062if test "${ac_cv_path_SED+set}" = set; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6066     for ac_i in 1 2 3 4 5 6 7; do
6067       ac_script="$ac_script$as_nl$ac_script"
6068     done
6069     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6070     { ac_script=; unset ac_script;}
6071     if test -z "$SED"; then
6072  ac_path_SED_found=false
6073  # Loop through the user's path and test for each of PROGNAME-LIST
6074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077  IFS=$as_save_IFS
6078  test -z "$as_dir" && as_dir=.
6079    for ac_prog in sed gsed; do
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6082      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6083# Check for GNU ac_path_SED and select it if it is found.
6084  # Check for GNU $ac_path_SED
6085case `"$ac_path_SED" --version 2>&1` in
6086*GNU*)
6087  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6088*)
6089  ac_count=0
6090  $as_echo_n 0123456789 >"conftest.in"
6091  while :
6092  do
6093    cat "conftest.in" "conftest.in" >"conftest.tmp"
6094    mv "conftest.tmp" "conftest.in"
6095    cp "conftest.in" "conftest.nl"
6096    $as_echo '' >> "conftest.nl"
6097    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6098    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6099    as_fn_arith $ac_count + 1 && ac_count=$as_val
6100    if test $ac_count -gt ${ac_path_SED_max-0}; then
6101      # Best one so far, save it but keep looking for a better one
6102      ac_cv_path_SED="$ac_path_SED"
6103      ac_path_SED_max=$ac_count
6104    fi
6105    # 10*(2^10) chars as input seems more than enough
6106    test $ac_count -gt 10 && break
6107  done
6108  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6109esac
6110
6111      $ac_path_SED_found && break 3
6112    done
6113  done
6114  done
6115IFS=$as_save_IFS
6116  if test -z "$ac_cv_path_SED"; then
6117    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6118  fi
6119else
6120  ac_cv_path_SED=$SED
6121fi
6122
6123fi
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6125$as_echo "$ac_cv_path_SED" >&6; }
6126 SED="$ac_cv_path_SED"
6127  rm -f conftest.sed
6128
6129
6130    if test "x$SED" = x; then
6131        if test "x" = x; then
6132          PROG_NAME=sed
6133        else
6134          PROG_NAME=
6135        fi
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6137$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6138        as_fn_error $? "Cannot continue" "$LINENO" 5
6139    fi
6140
6141
6142for ac_prog in nawk gawk awk
6143do
6144  # Extract the first word of "$ac_prog", so it can be a program name with args.
6145set dummy $ac_prog; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if test "${ac_cv_path_NAWK+set}" = set; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $NAWK in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6163    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174NAWK=$ac_cv_path_NAWK
6175if test -n "$NAWK"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6177$as_echo "$NAWK" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184  test -n "$NAWK" && break
6185done
6186
6187
6188    if test "x$NAWK" = x; then
6189        if test "x" = x; then
6190          PROG_NAME=nawk
6191        else
6192          PROG_NAME=
6193        fi
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6196        as_fn_error $? "Cannot continue" "$LINENO" 5
6197    fi
6198
6199
6200# Always force rm.
6201RM="$RM -f"
6202
6203# These are not required on all platforms
6204# Extract the first word of "cygpath", so it can be a program name with args.
6205set dummy cygpath; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if test "${ac_cv_path_CYGPATH+set}" = set; then :
6209  $as_echo_n "(cached) " >&6
6210else
6211  case $CYGPATH in
6212  [\\/]* | ?:[\\/]*)
6213  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6214  ;;
6215  *)
6216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219  IFS=$as_save_IFS
6220  test -z "$as_dir" && as_dir=.
6221    for ac_exec_ext in '' $ac_executable_extensions; do
6222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6223    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6225    break 2
6226  fi
6227done
6228  done
6229IFS=$as_save_IFS
6230
6231  ;;
6232esac
6233fi
6234CYGPATH=$ac_cv_path_CYGPATH
6235if test -n "$CYGPATH"; then
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6237$as_echo "$CYGPATH" >&6; }
6238else
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6240$as_echo "no" >&6; }
6241fi
6242
6243
6244# Extract the first word of "readlink", so it can be a program name with args.
6245set dummy readlink; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if test "${ac_cv_path_READLINK+set}" = set; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $READLINK in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6263    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274READLINK=$ac_cv_path_READLINK
6275if test -n "$READLINK"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6277$as_echo "$READLINK" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284# Extract the first word of "df", so it can be a program name with args.
6285set dummy df; ac_word=$2
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287$as_echo_n "checking for $ac_word... " >&6; }
6288if test "${ac_cv_path_DF+set}" = set; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291  case $DF in
6292  [\\/]* | ?:[\\/]*)
6293  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6294  ;;
6295  *)
6296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6303    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311  ;;
6312esac
6313fi
6314DF=$ac_cv_path_DF
6315if test -n "$DF"; then
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6317$as_echo "$DF" >&6; }
6318else
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
6324# Extract the first word of "SetFile", so it can be a program name with args.
6325set dummy SetFile; ac_word=$2
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327$as_echo_n "checking for $ac_word... " >&6; }
6328if test "${ac_cv_path_SETFILE+set}" = set; then :
6329  $as_echo_n "(cached) " >&6
6330else
6331  case $SETFILE in
6332  [\\/]* | ?:[\\/]*)
6333  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6334  ;;
6335  *)
6336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337for as_dir in $PATH
6338do
6339  IFS=$as_save_IFS
6340  test -z "$as_dir" && as_dir=.
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6343    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351  ;;
6352esac
6353fi
6354SETFILE=$ac_cv_path_SETFILE
6355if test -n "$SETFILE"; then
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6357$as_echo "$SETFILE" >&6; }
6358else
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364
6365
6366# Now we can determine OpenJDK build and target platforms. This is required to
6367# have early on.
6368# Make sure we can run config.sub.
6369$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6370  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6371
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6373$as_echo_n "checking build system type... " >&6; }
6374if test "${ac_cv_build+set}" = set; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  ac_build_alias=$build_alias
6378test "x$ac_build_alias" = x &&
6379  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6380test "x$ac_build_alias" = x &&
6381  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6382ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6383  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6384
6385fi
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6387$as_echo "$ac_cv_build" >&6; }
6388case $ac_cv_build in
6389*-*-*) ;;
6390*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6391esac
6392build=$ac_cv_build
6393ac_save_IFS=$IFS; IFS='-'
6394set x $ac_cv_build
6395shift
6396build_cpu=$1
6397build_vendor=$2
6398shift; shift
6399# Remember, the first character of IFS is used to create $*,
6400# except with old shells:
6401build_os=$*
6402IFS=$ac_save_IFS
6403case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6404
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6407$as_echo_n "checking host system type... " >&6; }
6408if test "${ac_cv_host+set}" = set; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  if test "x$host_alias" = x; then
6412  ac_cv_host=$ac_cv_build
6413else
6414  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6415    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6416fi
6417
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6420$as_echo "$ac_cv_host" >&6; }
6421case $ac_cv_host in
6422*-*-*) ;;
6423*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6424esac
6425host=$ac_cv_host
6426ac_save_IFS=$IFS; IFS='-'
6427set x $ac_cv_host
6428shift
6429host_cpu=$1
6430host_vendor=$2
6431shift; shift
6432# Remember, the first character of IFS is used to create $*,
6433# except with old shells:
6434host_os=$*
6435IFS=$ac_save_IFS
6436case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6437
6438
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6440$as_echo_n "checking target system type... " >&6; }
6441if test "${ac_cv_target+set}" = set; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  if test "x$target_alias" = x; then
6445  ac_cv_target=$ac_cv_host
6446else
6447  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6448    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6449fi
6450
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6453$as_echo "$ac_cv_target" >&6; }
6454case $ac_cv_target in
6455*-*-*) ;;
6456*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6457esac
6458target=$ac_cv_target
6459ac_save_IFS=$IFS; IFS='-'
6460set x $ac_cv_target
6461shift
6462target_cpu=$1
6463target_vendor=$2
6464shift; shift
6465# Remember, the first character of IFS is used to create $*,
6466# except with old shells:
6467target_os=$*
6468IFS=$ac_save_IFS
6469case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6470
6471
6472# The aliases save the names the user supplied, while $host etc.
6473# will get canonicalized.
6474test -n "$target_alias" &&
6475  test "$program_prefix$program_suffix$program_transform_name" = \
6476    NONENONEs,x,x, &&
6477  program_prefix=${target_alias}-
6478
6479# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6480# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6481# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6482# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6483# to use the configure naming style.
6484
6485
6486
6487
6488
6489    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6490    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6491    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6492    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6493    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6494    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6495
6496
6497
6498    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6499
6500  case "$build_os" in
6501    *linux*)
6502      VAR_OS=linux
6503      VAR_OS_API=posix
6504      VAR_OS_ENV=linux
6505      ;;
6506    *solaris*)
6507      VAR_OS=solaris
6508      VAR_OS_API=posix
6509      VAR_OS_ENV=solaris
6510      ;;
6511    *darwin*)
6512      VAR_OS=macosx
6513      VAR_OS_API=posix
6514      VAR_OS_ENV=macosx
6515      ;;
6516    *bsd*)
6517      VAR_OS=bsd
6518      VAR_OS_API=posix
6519      VAR_OS_ENV=bsd
6520      ;;
6521    *cygwin*)
6522      VAR_OS=windows
6523      VAR_OS_API=winapi
6524      VAR_OS_ENV=windows.cygwin
6525      ;;
6526    *mingw*)
6527      VAR_OS=windows
6528      VAR_OS_API=winapi
6529      VAR_OS_ENV=windows.msys
6530      ;;
6531    *)
6532      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6533      ;;
6534  esac
6535
6536
6537  # First argument is the cpu name from the trip/quad
6538  case "$build_cpu" in
6539    x86_64)
6540      VAR_CPU=x86_64
6541      VAR_CPU_ARCH=x86
6542      VAR_CPU_BITS=64
6543      VAR_CPU_ENDIAN=little
6544      ;;
6545    i?86)
6546      VAR_CPU=x86
6547      VAR_CPU_ARCH=x86
6548      VAR_CPU_BITS=32
6549      VAR_CPU_ENDIAN=little
6550      ;;
6551    arm*)
6552      VAR_CPU=arm
6553      VAR_CPU_ARCH=arm
6554      VAR_CPU_BITS=32
6555      VAR_CPU_ENDIAN=little
6556      ;;
6557    powerpc)
6558      VAR_CPU=ppc
6559      VAR_CPU_ARCH=ppc
6560      VAR_CPU_BITS=32
6561      VAR_CPU_ENDIAN=big
6562       ;;
6563    powerpc64)
6564      VAR_CPU=ppc64
6565      VAR_CPU_ARCH=ppc
6566      VAR_CPU_BITS=64
6567      VAR_CPU_ENDIAN=big
6568       ;;
6569    sparc)
6570      VAR_CPU=sparc
6571      VAR_CPU_ARCH=sparc
6572      VAR_CPU_BITS=32
6573      VAR_CPU_ENDIAN=big
6574       ;;
6575    sparcv9)
6576      VAR_CPU=sparcv9
6577      VAR_CPU_ARCH=sparc
6578      VAR_CPU_BITS=64
6579      VAR_CPU_ENDIAN=big
6580       ;;
6581    *)
6582      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6583      ;;
6584  esac
6585
6586    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6587    OPENJDK_BUILD_OS="$VAR_OS"
6588    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6589    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6590    OPENJDK_BUILD_CPU="$VAR_CPU"
6591    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6592    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6593    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6594
6595
6596
6597
6598
6599
6600
6601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6602$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6604$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6605
6606    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6607
6608  case "$host_os" in
6609    *linux*)
6610      VAR_OS=linux
6611      VAR_OS_API=posix
6612      VAR_OS_ENV=linux
6613      ;;
6614    *solaris*)
6615      VAR_OS=solaris
6616      VAR_OS_API=posix
6617      VAR_OS_ENV=solaris
6618      ;;
6619    *darwin*)
6620      VAR_OS=macosx
6621      VAR_OS_API=posix
6622      VAR_OS_ENV=macosx
6623      ;;
6624    *bsd*)
6625      VAR_OS=bsd
6626      VAR_OS_API=posix
6627      VAR_OS_ENV=bsd
6628      ;;
6629    *cygwin*)
6630      VAR_OS=windows
6631      VAR_OS_API=winapi
6632      VAR_OS_ENV=windows.cygwin
6633      ;;
6634    *mingw*)
6635      VAR_OS=windows
6636      VAR_OS_API=winapi
6637      VAR_OS_ENV=windows.msys
6638      ;;
6639    *)
6640      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6641      ;;
6642  esac
6643
6644
6645  # First argument is the cpu name from the trip/quad
6646  case "$host_cpu" in
6647    x86_64)
6648      VAR_CPU=x86_64
6649      VAR_CPU_ARCH=x86
6650      VAR_CPU_BITS=64
6651      VAR_CPU_ENDIAN=little
6652      ;;
6653    i?86)
6654      VAR_CPU=x86
6655      VAR_CPU_ARCH=x86
6656      VAR_CPU_BITS=32
6657      VAR_CPU_ENDIAN=little
6658      ;;
6659    arm*)
6660      VAR_CPU=arm
6661      VAR_CPU_ARCH=arm
6662      VAR_CPU_BITS=32
6663      VAR_CPU_ENDIAN=little
6664      ;;
6665    powerpc)
6666      VAR_CPU=ppc
6667      VAR_CPU_ARCH=ppc
6668      VAR_CPU_BITS=32
6669      VAR_CPU_ENDIAN=big
6670       ;;
6671    powerpc64)
6672      VAR_CPU=ppc64
6673      VAR_CPU_ARCH=ppc
6674      VAR_CPU_BITS=64
6675      VAR_CPU_ENDIAN=big
6676       ;;
6677    sparc)
6678      VAR_CPU=sparc
6679      VAR_CPU_ARCH=sparc
6680      VAR_CPU_BITS=32
6681      VAR_CPU_ENDIAN=big
6682       ;;
6683    sparcv9)
6684      VAR_CPU=sparcv9
6685      VAR_CPU_ARCH=sparc
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=big
6688       ;;
6689    *)
6690      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6691      ;;
6692  esac
6693
6694    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6695    OPENJDK_TARGET_OS="$VAR_OS"
6696    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6697    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6698    OPENJDK_TARGET_CPU="$VAR_CPU"
6699    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6700    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6701    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6702
6703
6704
6705
6706
6707
6708
6709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6710$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6712$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6713
6714
6715
6716# Check whether --with-target-bits was given.
6717if test "${with_target_bits+set}" = set; then :
6718  withval=$with_target_bits;
6719fi
6720
6721
6722  # We have three types of compiles:
6723  # native  == normal compilation, target system == build system
6724  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6725  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6726  #
6727  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6728    # We're doing a proper cross-compilation
6729    COMPILE_TYPE="cross"
6730  else
6731    COMPILE_TYPE="native"
6732  fi
6733
6734  if test "x$with_target_bits" != x; then
6735    if test "x$COMPILE_TYPE" = "xcross"; then
6736      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6737    fi
6738
6739    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6740      # A reduced build is requested
6741      COMPILE_TYPE="reduced"
6742      OPENJDK_TARGET_CPU_BITS=32
6743      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6744        OPENJDK_TARGET_CPU=x86
6745      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6746        OPENJDK_TARGET_CPU=sparc
6747      else
6748        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6749      fi
6750    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6751      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
6752    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6753      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6754$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6755    else
6756      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6757    fi
6758  fi
6759
6760
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6762$as_echo_n "checking compilation type... " >&6; }
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6764$as_echo "$COMPILE_TYPE" >&6; }
6765
6766
6767    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6768       REQUIRED_OS_NAME=SunOS
6769       REQUIRED_OS_VERSION=5.10
6770    fi
6771    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6772       REQUIRED_OS_NAME=Linux
6773       REQUIRED_OS_VERSION=2.6
6774    fi
6775    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6776        REQUIRED_OS_NAME=Windows
6777        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6778            REQUIRED_OS_VERSION=5.2
6779        else
6780            REQUIRED_OS_VERSION=5.1
6781        fi
6782    fi
6783    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6784        REQUIRED_OS_NAME=Darwin
6785        REQUIRED_OS_VERSION=11.2
6786    fi
6787
6788
6789
6790
6791
6792    # Also store the legacy naming of the cpu.
6793    # Ie i586 and amd64 instead of x86 and x86_64
6794    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6795    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6796      OPENJDK_TARGET_CPU_LEGACY="i586"
6797    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6798      # On all platforms except MacOSX replace x86_64 with amd64.
6799      OPENJDK_TARGET_CPU_LEGACY="amd64"
6800    fi
6801
6802
6803    # And the second legacy naming of the cpu.
6804    # Ie i386 and amd64 instead of x86 and x86_64.
6805    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6806    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6807      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6808    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6810    fi
6811
6812
6813    # This is the name of the cpu (but using i386 and amd64 instead of
6814    # x86 and x86_64, respectively), preceeded by a /, to be used when
6815    # locating libraries. On macosx, it's empty, though.
6816    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6817    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6818        OPENJDK_TARGET_CPU_LIBDIR=""
6819    fi
6820
6821
6822    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6823    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6824    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6825    OPENJDK_TARGET_CPU_ISADIR=""
6826    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6827      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6828          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6829      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6830          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6831      fi
6832    fi
6833
6834
6835    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6836    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6837    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6838      # On linux only, we replace x86 with i386.
6839      OPENJDK_TARGET_CPU_OSARCH="i386"
6840    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6841      # On all platforms except macosx, we replace x86_64 with amd64.
6842      OPENJDK_TARGET_CPU_OSARCH="amd64"
6843    fi
6844
6845
6846    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6847    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6848      OPENJDK_TARGET_CPU_JLI="i386"
6849    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6850      # On all platforms except macosx, we replace x86_64 with amd64.
6851      OPENJDK_TARGET_CPU_JLI="amd64"
6852    fi
6853    # Now setup the -D flags for building libjli.
6854    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6855    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6856      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6857        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6858      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6860      fi
6861    fi
6862
6863
6864    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6865    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6866        OPENJDK_TARGET_OS_API_DIR="solaris"
6867    fi
6868    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6869        OPENJDK_TARGET_OS_API_DIR="windows"
6870    fi
6871
6872
6873    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6874        A_LP64="LP64:="
6875        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6876        # unpack200.exe
6877        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6878            ADD_LP64="-D_LP64=1"
6879        fi
6880    fi
6881    LP64=$A_LP64
6882
6883
6884    if test "x$COMPILE_TYPE" = "xcross"; then
6885      # FIXME: ... or should this include reduced builds..?
6886      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6887    else
6888      DEFINE_CROSS_COMPILE_ARCH=""
6889    fi
6890
6891
6892
6893
6894# Continue setting up basic stuff. Most remaining code require fundamental tools.
6895
6896# Locate the directory of this script.
6897SCRIPT="$0"
6898
6899    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6900        # Follow a chain of symbolic links. Use readlink
6901        # where it exists, else fall back to horribly
6902        # complicated shell code.
6903        if test "x$READLINK_TESTED" != yes; then
6904            # On MacOSX there is a readlink tool with a different
6905            # purpose than the GNU readlink tool. Check the found readlink.
6906            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
6907            if test "x$ISGNU" = x; then
6908                 # A readlink that we do not know how to use.
6909                 # Are there other non-GNU readlinks out there?
6910                 READLINK_TESTED=yes
6911                 READLINK=
6912            fi
6913        fi
6914
6915        if test "x$READLINK" != x; then
6916            SCRIPT=`$READLINK -f $SCRIPT`
6917        else
6918            STARTDIR=$PWD
6919            COUNTER=0
6920            sym_link_dir=`$DIRNAME $SCRIPT`
6921            sym_link_file=`$BASENAME $SCRIPT`
6922            while test $COUNTER -lt 20; do
6923                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6924                if test "x$ISLINK" == x; then
6925                    # This is not a symbolic link! We are done!
6926                    break
6927                fi
6928                # The link might be relative! We have to use cd to travel safely.
6929                cd $sym_link_dir
6930                # ... and we must get the to the absolute path, not one using symbolic links.
6931                cd `pwd -P`
6932                cd `$DIRNAME $ISLINK`
6933                sym_link_dir=`$THEPWDCMD`
6934                sym_link_file=`$BASENAME $ISLINK`
6935                let COUNTER=COUNTER+1
6936            done
6937            cd $STARTDIR
6938            SCRIPT=$sym_link_dir/$sym_link_file
6939        fi
6940    fi
6941
6942AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6943
6944# Where is the source? It is located two levels above the configure script.
6945CURDIR="$PWD"
6946cd "$AUTOCONF_DIR/../.."
6947SRC_ROOT="`pwd`"
6948
6949if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6950  PATH_SEP=";"
6951
6952  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6953  if test $SRC_ROOT_LENGTH -gt 100; then
6954      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6955  fi
6956
6957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6959$as_echo_n "checking cygwin release... " >&6; }
6960    CYGWIN_VERSION=`$UNAME -r`
6961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6962$as_echo "$CYGWIN_VERSION" >&6; }
6963    WINDOWS_ENV_VENDOR='cygwin'
6964    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6965
6966    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6967    if test "x$CYGWIN_VERSION_OK" = x; then
6968      { $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
6969$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;}
6970      as_fn_error $? "Cannot continue" "$LINENO" 5
6971    fi
6972    if test "x$CYGPATH" = x; then
6973        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6974    fi
6975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6976$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6977    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6978    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6979    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6980    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6982$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6983    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6984    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6985    if test "x$test_cygdrive_prefix" = x; then
6986        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6987    fi
6988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6989    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6990$as_echo_n "checking msys release... " >&6; }
6991    MSYS_VERSION=`$UNAME -r`
6992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6993$as_echo "$MSYS_VERSION" >&6; }
6994
6995    WINDOWS_ENV_VENDOR='msys'
6996    WINDOWS_ENV_VERSION="$MSYS_VERSION"
6997
6998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
6999$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7000    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7001    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7002
7003  windows_path="$MSYS_ROOT_PATH"
7004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7005    unix_path=`$CYGPATH -u "$windows_path"`
7006    MSYS_ROOT_PATH="$unix_path"
7007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7009    MSYS_ROOT_PATH="$unix_path"
7010  fi
7011
7012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7013$as_echo "$MSYS_ROOT_PATH" >&6; }
7014    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7015  else
7016    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7017  fi
7018
7019  # Test if windows or unix (cygwin/msys) find is first in path.
7020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7021$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7022  FIND_BINARY_OUTPUT=`find --version 2>&1`
7023  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7025$as_echo "unix style" >&6; }
7026  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7028$as_echo "Windows" >&6; }
7029    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7030$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7031    { $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
7032$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7033    as_fn_error $? "Cannot continue" "$LINENO" 5
7034  else
7035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7036$as_echo "unknown" >&6; }
7037    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7038$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7039  fi
7040
7041else
7042  PATH_SEP=":"
7043fi
7044
7045
7046
7047cd "$CURDIR"
7048
7049
7050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7051
7052  # Input might be given as Windows format, start by converting to
7053  # unix format.
7054  path="$SRC_ROOT"
7055  new_path=`$CYGPATH -u "$path"`
7056
7057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7060  # "foo.exe" is OK but "foo" is an error.
7061  #
7062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7063  # It is also a way to make sure we got the proper file name for the real test later on.
7064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7065  if test "x$test_shortpath" = x; then
7066    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7067$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7068    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7069  fi
7070
7071  # Call helper function which possibly converts this using DOS-style short mode.
7072  # If so, the updated path is stored in $new_path.
7073
7074  input_path="$new_path"
7075  # Check if we need to convert this using DOS-style short mode. If the path
7076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7077  # take no chances and rewrite it.
7078  # Note: m4 eats our [], so we need to use [ and ] instead.
7079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7080  if test "x$has_forbidden_chars" != x; then
7081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7085      # Going to short mode and back again did indeed matter. Since short mode is
7086      # case insensitive, let's make it lowercase to improve readability.
7087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7088      # Now convert it back to Unix-stile (cygpath)
7089      input_path=`$CYGPATH -u "$shortmode_path"`
7090      new_path="$input_path"
7091    fi
7092  fi
7093
7094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7095  if test "x$test_cygdrive_prefix" = x; then
7096    # As a simple fix, exclude /usr/bin since it's not a real path.
7097    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7099      # a path prefixed by /cygdrive for fixpath to work.
7100      new_path="$CYGWIN_ROOT_PATH$input_path"
7101    fi
7102  fi
7103
7104
7105  if test "x$path" != "x$new_path"; then
7106    SRC_ROOT="$new_path"
7107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7108$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7109  fi
7110
7111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7112
7113  path="$SRC_ROOT"
7114  has_colon=`$ECHO $path | $GREP ^.:`
7115  new_path="$path"
7116  if test "x$has_colon" = x; then
7117    # Not in mixed or Windows style, start by that.
7118    new_path=`cmd //c echo $path`
7119  fi
7120
7121
7122  input_path="$new_path"
7123  # Check if we need to convert this using DOS-style short mode. If the path
7124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7125  # take no chances and rewrite it.
7126  # Note: m4 eats our [], so we need to use [ and ] instead.
7127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7128  if test "x$has_forbidden_chars" != x; then
7129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7131  fi
7132
7133
7134  windows_path="$new_path"
7135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7136    unix_path=`$CYGPATH -u "$windows_path"`
7137    new_path="$unix_path"
7138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7140    new_path="$unix_path"
7141  fi
7142
7143  if test "x$path" != "x$new_path"; then
7144    SRC_ROOT="$new_path"
7145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7146$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7147  fi
7148
7149  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7150  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7151
7152  else
7153    # We're on a posix platform. Hooray! :)
7154    path="$SRC_ROOT"
7155
7156    if test ! -f "$path" && test ! -d "$path"; then
7157      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7158    fi
7159
7160    has_space=`$ECHO "$path" | $GREP " "`
7161    if test "x$has_space" != x; then
7162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7163$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7165    fi
7166  fi
7167
7168
7169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7170
7171  # Input might be given as Windows format, start by converting to
7172  # unix format.
7173  path="$CURDIR"
7174  new_path=`$CYGPATH -u "$path"`
7175
7176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7179  # "foo.exe" is OK but "foo" is an error.
7180  #
7181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7182  # It is also a way to make sure we got the proper file name for the real test later on.
7183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7184  if test "x$test_shortpath" = x; then
7185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7186$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7187    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7188  fi
7189
7190  # Call helper function which possibly converts this using DOS-style short mode.
7191  # If so, the updated path is stored in $new_path.
7192
7193  input_path="$new_path"
7194  # Check if we need to convert this using DOS-style short mode. If the path
7195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7196  # take no chances and rewrite it.
7197  # Note: m4 eats our [], so we need to use [ and ] instead.
7198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7199  if test "x$has_forbidden_chars" != x; then
7200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7204      # Going to short mode and back again did indeed matter. Since short mode is
7205      # case insensitive, let's make it lowercase to improve readability.
7206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7207      # Now convert it back to Unix-stile (cygpath)
7208      input_path=`$CYGPATH -u "$shortmode_path"`
7209      new_path="$input_path"
7210    fi
7211  fi
7212
7213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7214  if test "x$test_cygdrive_prefix" = x; then
7215    # As a simple fix, exclude /usr/bin since it's not a real path.
7216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7218      # a path prefixed by /cygdrive for fixpath to work.
7219      new_path="$CYGWIN_ROOT_PATH$input_path"
7220    fi
7221  fi
7222
7223
7224  if test "x$path" != "x$new_path"; then
7225    CURDIR="$new_path"
7226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7227$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7228  fi
7229
7230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7231
7232  path="$CURDIR"
7233  has_colon=`$ECHO $path | $GREP ^.:`
7234  new_path="$path"
7235  if test "x$has_colon" = x; then
7236    # Not in mixed or Windows style, start by that.
7237    new_path=`cmd //c echo $path`
7238  fi
7239
7240
7241  input_path="$new_path"
7242  # Check if we need to convert this using DOS-style short mode. If the path
7243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7244  # take no chances and rewrite it.
7245  # Note: m4 eats our [], so we need to use [ and ] instead.
7246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7247  if test "x$has_forbidden_chars" != x; then
7248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7250  fi
7251
7252
7253  windows_path="$new_path"
7254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7255    unix_path=`$CYGPATH -u "$windows_path"`
7256    new_path="$unix_path"
7257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7259    new_path="$unix_path"
7260  fi
7261
7262  if test "x$path" != "x$new_path"; then
7263    CURDIR="$new_path"
7264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7265$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7266  fi
7267
7268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7270
7271  else
7272    # We're on a posix platform. Hooray! :)
7273    path="$CURDIR"
7274
7275    if test ! -f "$path" && test ! -d "$path"; then
7276      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7277    fi
7278
7279    has_space=`$ECHO "$path" | $GREP " "`
7280    if test "x$has_space" != x; then
7281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7282$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7283      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7284    fi
7285  fi
7286
7287
7288if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7289    # Add extra search paths on solaris for utilities like ar and as etc...
7290    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7291fi
7292
7293# You can force the sys-root if the sys-root encoded into the cross compiler tools
7294# is not correct.
7295
7296# Check whether --with-sys-root was given.
7297if test "${with_sys_root+set}" = set; then :
7298  withval=$with_sys_root;
7299fi
7300
7301
7302if test "x$with_sys_root" != x; then
7303  SYS_ROOT=$with_sys_root
7304else
7305  SYS_ROOT=/
7306fi
7307
7308
7309
7310# Check whether --with-tools-dir was given.
7311if test "${with_tools_dir+set}" = set; then :
7312  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7313fi
7314
7315
7316
7317# Check whether --with-devkit was given.
7318if test "${with_devkit+set}" = set; then :
7319  withval=$with_devkit;
7320    if test "x$with_sys_root" != x; then
7321      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7322    fi
7323    if test "x$with_tools_dir" != x; then
7324      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7325    fi
7326    TOOLS_DIR=$with_devkit/bin
7327    SYS_ROOT=$with_devkit/$host_alias/libc
7328
7329fi
7330
7331
7332
7333
7334# Setup default logging of stdout and stderr to build.log in the output root.
7335BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7336BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7337BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7338
7339
7340
7341
7342
7343# These are needed to be able to create a configuration name (and thus the output directory)
7344
7345###############################################################################
7346#
7347# Check which variant of the JDK that we want to build.
7348# Currently we have:
7349#    normal:   standard edition
7350# but the custom make system may add other variants
7351#
7352# Effectively the JDK variant gives a name to a specific set of
7353# modules to compile into the JDK. In the future, these modules
7354# might even be Jigsaw modules.
7355#
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7357$as_echo_n "checking which variant of the JDK to build... " >&6; }
7358
7359# Check whether --with-jdk-variant was given.
7360if test "${with_jdk_variant+set}" = set; then :
7361  withval=$with_jdk_variant;
7362fi
7363
7364
7365if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7366    JDK_VARIANT="normal"
7367else
7368    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7369fi
7370
7371
7372
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7374$as_echo "$JDK_VARIANT" >&6; }
7375
7376
7377
7378###############################################################################
7379#
7380# Check which variants of the JVM that we want to build.
7381# Currently we have:
7382#    server: normal interpreter and a tiered C1/C2 compiler
7383#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7384#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7385#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7386#    zero: no machine code interpreter, no compiler
7387#    zeroshark: zero interpreter and shark/llvm compiler backend
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7389$as_echo_n "checking which variants of the JVM to build... " >&6; }
7390
7391# Check whether --with-jvm-variants was given.
7392if test "${with_jvm_variants+set}" = set; then :
7393  withval=$with_jvm_variants;
7394fi
7395
7396
7397if test "x$with_jvm_variants" = x; then
7398     with_jvm_variants="server"
7399fi
7400
7401JVM_VARIANTS=",$with_jvm_variants,"
7402TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7403
7404if test "x$TEST_VARIANTS" != "x,"; then
7405   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7406fi
7407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7408$as_echo "$with_jvm_variants" >&6; }
7409
7410JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7411JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7412JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7413JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7414JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7415
7416if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7417    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7418        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7419    fi
7420fi
7421if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7422    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7423        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7424    fi
7425fi
7426
7427# Replace the commas with AND for use in the build directory name.
7428ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7429COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7430if test "x$COUNT_VARIANTS" != "x,1"; then
7431    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7432else
7433    BUILDING_MULTIPLE_JVM_VARIANTS=no
7434fi
7435
7436
7437
7438
7439
7440
7441
7442
7443if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7444   MACOSX_UNIVERSAL="true"
7445fi
7446
7447
7448
7449
7450
7451###############################################################################
7452#
7453# Set the debug level
7454#    release: no debug information, all optimizations, no asserts.
7455#    fastdebug: debug information (-g), all optimizations, all asserts
7456#    slowdebug: debug information (-g), no optimizations, all asserts
7457#
7458DEBUG_LEVEL="release"
7459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7460$as_echo_n "checking which debug level to use... " >&6; }
7461# Check whether --enable-debug was given.
7462if test "${enable_debug+set}" = set; then :
7463  enableval=$enable_debug;
7464        ENABLE_DEBUG="${enableval}"
7465        DEBUG_LEVEL="fastdebug"
7466
7467else
7468  ENABLE_DEBUG="no"
7469fi
7470
7471
7472
7473# Check whether --with-debug-level was given.
7474if test "${with_debug_level+set}" = set; then :
7475  withval=$with_debug_level;
7476        DEBUG_LEVEL="${withval}"
7477        if test "x$ENABLE_DEBUG" = xyes; then
7478			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7479        fi
7480
7481fi
7482
7483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7484$as_echo "$DEBUG_LEVEL" >&6; }
7485
7486if test "x$DEBUG_LEVEL" != xrelease && \
7487   test "x$DEBUG_LEVEL" != xfastdebug && \
7488   test "x$DEBUG_LEVEL" != xslowdebug; then
7489   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7490fi
7491
7492
7493###############################################################################
7494#
7495# Setup legacy vars/targets and new vars to deal with different debug levels.
7496#
7497
7498case $DEBUG_LEVEL in
7499      release )
7500          VARIANT="OPT"
7501          FASTDEBUG="false"
7502          DEBUG_CLASSFILES="false"
7503          BUILD_VARIANT_RELEASE=""
7504          HOTSPOT_DEBUG_LEVEL="product"
7505          HOTSPOT_EXPORT="product"
7506           ;;
7507      fastdebug )
7508          VARIANT="DBG"
7509          FASTDEBUG="true"
7510          DEBUG_CLASSFILES="true"
7511          BUILD_VARIANT_RELEASE="-fastdebug"
7512          HOTSPOT_DEBUG_LEVEL="fastdebug"
7513          HOTSPOT_EXPORT="fastdebug"
7514           ;;
7515      slowdebug )
7516          VARIANT="DBG"
7517          FASTDEBUG="false"
7518          DEBUG_CLASSFILES="true"
7519          BUILD_VARIANT_RELEASE="-debug"
7520          HOTSPOT_DEBUG_LEVEL="jvmg"
7521          HOTSPOT_EXPORT="debug"
7522           ;;
7523esac
7524
7525#####
7526# Generate the legacy makefile targets for hotspot.
7527# The hotspot api for selecting the build artifacts, really, needs to be improved.
7528#
7529HOTSPOT_TARGET=""
7530
7531if test "x$JVM_VARIANT_SERVER" = xtrue; then
7532    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7533fi
7534
7535if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7536    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7537fi
7538
7539if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7540    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7541fi
7542
7543if test "x$JVM_VARIANT_ZERO" = xtrue; then
7544    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7545fi
7546
7547if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7548    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7549fi
7550
7551HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7552
7553# On Macosx universal binaries are produced, but they only contain
7554# 64 bit intel. This invalidates control of which jvms are built
7555# from configure, but only server is valid anyway. Fix this
7556# when hotspot makefiles are rewritten.
7557if test "x$MACOSX_UNIVERSAL" = xtrue; then
7558    HOTSPOT_TARGET=universal_product
7559fi
7560
7561#####
7562
7563
7564
7565
7566
7567
7568
7569
7570# With basic setup done, call the custom early hook.
7571
7572
7573# To properly create a configuration name, we need to have the OpenJDK target
7574# and options (variants and debug level) parsed.
7575
7576
7577
7578# Check whether --with-conf-name was given.
7579if test "${with_conf_name+set}" = set; then :
7580  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7581fi
7582
7583
7584# Test from where we are running configure, in or outside of src root.
7585# To enable comparison of directories, CURDIR needs to be symlink free
7586# just like SRC_ROOT already is
7587NOSYM_CURDIR="$CURDIR"
7588
7589    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7590        # Follow a chain of symbolic links. Use readlink
7591        # where it exists, else fall back to horribly
7592        # complicated shell code.
7593        if test "x$READLINK_TESTED" != yes; then
7594            # On MacOSX there is a readlink tool with a different
7595            # purpose than the GNU readlink tool. Check the found readlink.
7596            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
7597            if test "x$ISGNU" = x; then
7598                 # A readlink that we do not know how to use.
7599                 # Are there other non-GNU readlinks out there?
7600                 READLINK_TESTED=yes
7601                 READLINK=
7602            fi
7603        fi
7604
7605        if test "x$READLINK" != x; then
7606            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7607        else
7608            STARTDIR=$PWD
7609            COUNTER=0
7610            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7611            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7612            while test $COUNTER -lt 20; do
7613                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7614                if test "x$ISLINK" == x; then
7615                    # This is not a symbolic link! We are done!
7616                    break
7617                fi
7618                # The link might be relative! We have to use cd to travel safely.
7619                cd $sym_link_dir
7620                # ... and we must get the to the absolute path, not one using symbolic links.
7621                cd `pwd -P`
7622                cd `$DIRNAME $ISLINK`
7623                sym_link_dir=`$THEPWDCMD`
7624                sym_link_file=`$BASENAME $ISLINK`
7625                let COUNTER=COUNTER+1
7626            done
7627            cd $STARTDIR
7628            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7629        fi
7630    fi
7631
7632if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7633        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7634        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7635    # We are running configure from the src root.
7636    # Create a default ./build/target-variant-debuglevel output root.
7637    if test "x${CONF_NAME}" = x; then
7638        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7639    fi
7640    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7641    $MKDIR -p "$OUTPUT_ROOT"
7642    if test ! -d "$OUTPUT_ROOT"; then
7643        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7644    fi
7645else
7646    # We are running configure from outside of the src dir.
7647    # Then use the current directory as output dir!
7648    # If configuration is situated in normal build directory, just use the build
7649    # directory name as configuration name, otherwise use the complete path.
7650    if test "x${CONF_NAME}" = x; then
7651        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7652    fi
7653    OUTPUT_ROOT="$CURDIR"
7654
7655    # WARNING: This might be a bad thing to do. You need to be sure you want to
7656    # have a configuration in this directory. Do some sanity checks!
7657
7658    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7659      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7660      # other files
7661      files_present=`$LS $OUTPUT_ROOT`
7662      # Configure has already touched config.log and confdefs.h in the current dir when this check
7663      # is performed.
7664      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7665                                             | $TR -d '\n'`
7666      if test "x$filtered_files" != x; then
7667        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7668$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7669        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7670$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7671        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7672$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7673        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7674$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7676$as_echo "$as_me: seriously mess up just about everything." >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7678$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7680$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7681        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7682      fi
7683    fi
7684fi
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7686$as_echo_n "checking what configuration name to use... " >&6; }
7687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7688$as_echo "$CONF_NAME" >&6; }
7689
7690
7691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7692
7693  # Input might be given as Windows format, start by converting to
7694  # unix format.
7695  path="$OUTPUT_ROOT"
7696  new_path=`$CYGPATH -u "$path"`
7697
7698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7701  # "foo.exe" is OK but "foo" is an error.
7702  #
7703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7704  # It is also a way to make sure we got the proper file name for the real test later on.
7705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7706  if test "x$test_shortpath" = x; then
7707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7708$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7709    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7710  fi
7711
7712  # Call helper function which possibly converts this using DOS-style short mode.
7713  # If so, the updated path is stored in $new_path.
7714
7715  input_path="$new_path"
7716  # Check if we need to convert this using DOS-style short mode. If the path
7717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7718  # take no chances and rewrite it.
7719  # Note: m4 eats our [], so we need to use [ and ] instead.
7720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7721  if test "x$has_forbidden_chars" != x; then
7722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7726      # Going to short mode and back again did indeed matter. Since short mode is
7727      # case insensitive, let's make it lowercase to improve readability.
7728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7729      # Now convert it back to Unix-stile (cygpath)
7730      input_path=`$CYGPATH -u "$shortmode_path"`
7731      new_path="$input_path"
7732    fi
7733  fi
7734
7735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7736  if test "x$test_cygdrive_prefix" = x; then
7737    # As a simple fix, exclude /usr/bin since it's not a real path.
7738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7740      # a path prefixed by /cygdrive for fixpath to work.
7741      new_path="$CYGWIN_ROOT_PATH$input_path"
7742    fi
7743  fi
7744
7745
7746  if test "x$path" != "x$new_path"; then
7747    OUTPUT_ROOT="$new_path"
7748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7749$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7750  fi
7751
7752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7753
7754  path="$OUTPUT_ROOT"
7755  has_colon=`$ECHO $path | $GREP ^.:`
7756  new_path="$path"
7757  if test "x$has_colon" = x; then
7758    # Not in mixed or Windows style, start by that.
7759    new_path=`cmd //c echo $path`
7760  fi
7761
7762
7763  input_path="$new_path"
7764  # Check if we need to convert this using DOS-style short mode. If the path
7765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7766  # take no chances and rewrite it.
7767  # Note: m4 eats our [], so we need to use [ and ] instead.
7768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7769  if test "x$has_forbidden_chars" != x; then
7770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7772  fi
7773
7774
7775  windows_path="$new_path"
7776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7777    unix_path=`$CYGPATH -u "$windows_path"`
7778    new_path="$unix_path"
7779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7781    new_path="$unix_path"
7782  fi
7783
7784  if test "x$path" != "x$new_path"; then
7785    OUTPUT_ROOT="$new_path"
7786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7787$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7788  fi
7789
7790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7792
7793  else
7794    # We're on a posix platform. Hooray! :)
7795    path="$OUTPUT_ROOT"
7796
7797    if test ! -f "$path" && test ! -d "$path"; then
7798      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7799    fi
7800
7801    has_space=`$ECHO "$path" | $GREP " "`
7802    if test "x$has_space" != x; then
7803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7804$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7805      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7806    fi
7807  fi
7808
7809
7810SPEC=$OUTPUT_ROOT/spec.gmk
7811
7812CONF_NAME=$CONF_NAME
7813
7814OUTPUT_ROOT=$OUTPUT_ROOT
7815
7816
7817# Most of the probed defines are put into config.h
7818ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7819
7820# The spec.gmk file contains all variables for the make system.
7821ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7822
7823# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7824ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7825
7826# The bootcycle-spec.gmk file contains support for boot cycle builds.
7827ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7828
7829# The compare.sh is used to compare the build output to other builds.
7830ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7831
7832# Spec.sh is currently used by compare-objects.sh
7833ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7834
7835# The generated Makefile knows where the spec.gmk is and where the source is.
7836# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7837# which will look for generated configurations
7838ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7839
7840
7841# Save the arguments given to us
7842echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7843
7844
7845# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7846
7847    for ac_prog in apt-get yum port pkgutil pkgadd
7848do
7849  # Extract the first word of "$ac_prog", so it can be a program name with args.
7850set dummy $ac_prog; ac_word=$2
7851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7852$as_echo_n "checking for $ac_word... " >&6; }
7853if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7854  $as_echo_n "(cached) " >&6
7855else
7856  if test -n "$PKGHANDLER"; then
7857  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7858else
7859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7860for as_dir in $PATH
7861do
7862  IFS=$as_save_IFS
7863  test -z "$as_dir" && as_dir=.
7864    for ac_exec_ext in '' $ac_executable_extensions; do
7865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7866    ac_cv_prog_PKGHANDLER="$ac_prog"
7867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7868    break 2
7869  fi
7870done
7871  done
7872IFS=$as_save_IFS
7873
7874fi
7875fi
7876PKGHANDLER=$ac_cv_prog_PKGHANDLER
7877if test -n "$PKGHANDLER"; then
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7879$as_echo "$PKGHANDLER" >&6; }
7880else
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882$as_echo "no" >&6; }
7883fi
7884
7885
7886  test -n "$PKGHANDLER" && break
7887done
7888
7889
7890
7891# Setup tools that requires more complex handling, or that is not needed by the configure script.
7892
7893
7894  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7895  if test "x$MAKE" != x; then
7896    # User has supplied a make, test it.
7897    if test ! -f "$MAKE"; then
7898      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7899    fi
7900
7901  MAKE_CANDIDATE=""$MAKE""
7902  DESCRIPTION="user supplied MAKE=$MAKE"
7903  if test "x$MAKE_CANDIDATE" != x; then
7904    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7905$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7906    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7907    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7908    if test "x$IS_GNU_MAKE" = x; then
7909      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7910$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7911    else
7912      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7913      if test "x$IS_MODERN_MAKE" = x; then
7914        { $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
7915$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;}
7916      else
7917        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7918          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7919            MAKE_EXPECTED_ENV='cygwin'
7920          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7921            MAKE_EXPECTED_ENV='msys'
7922          else
7923            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7924          fi
7925          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7926          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7927        else
7928          # Not relevant for non-Windows
7929          IS_MAKE_CORRECT_ENV=true
7930        fi
7931        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7932          { $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
7933$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;}
7934        else
7935          FOUND_MAKE=$MAKE_CANDIDATE
7936
7937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7938
7939  # First separate the path from the arguments. This will split at the first
7940  # space.
7941  complete="$FOUND_MAKE"
7942  path="${complete%% *}"
7943  tmp="$complete EOL"
7944  arguments="${tmp#* }"
7945
7946  # Input might be given as Windows format, start by converting to
7947  # unix format.
7948  new_path=`$CYGPATH -u "$path"`
7949
7950  # Now try to locate executable using which
7951  new_path=`$WHICH "$new_path" 2> /dev/null`
7952  # bat and cmd files are not always considered executable in cygwin causing which
7953  # to not find them
7954  if test "x$new_path" = x \
7955           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7956           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7957    new_path=`$CYGPATH -u "$path"`
7958  fi
7959  if test "x$new_path" = x; then
7960    # Oops. Which didn't find the executable.
7961    # The splitting of arguments from the executable at a space might have been incorrect,
7962    # since paths with space are more likely in Windows. Give it another try with the whole
7963    # argument.
7964    path="$complete"
7965    arguments="EOL"
7966    new_path=`$CYGPATH -u "$path"`
7967    new_path=`$WHICH "$new_path" 2> /dev/null`
7968    # bat and cmd files are not always considered executable in cygwin causing which
7969    # to not find them
7970    if test "x$new_path" = x \
7971             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7972             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7973      new_path=`$CYGPATH -u "$path"`
7974    fi
7975    if test "x$new_path" = x; then
7976      # It's still not found. Now this is an unrecoverable error.
7977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7978$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7979      has_space=`$ECHO "$complete" | $GREP " "`
7980      if test "x$has_space" != x; then
7981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7983      fi
7984      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7985    fi
7986  fi
7987
7988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7991  # "foo.exe" is OK but "foo" is an error.
7992  #
7993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7994  # It is also a way to make sure we got the proper file name for the real test later on.
7995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7996  if test "x$test_shortpath" = x; then
7997    # Short path failed, file does not exist as specified.
7998    # Try adding .exe or .cmd
7999    if test -f "${new_path}.exe"; then
8000       input_to_shortpath="${new_path}.exe"
8001    elif test -f "${new_path}.cmd"; then
8002       input_to_shortpath="${new_path}.cmd"
8003    else
8004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8009    fi
8010  else
8011    input_to_shortpath="$new_path"
8012  fi
8013
8014  # Call helper function which possibly converts this using DOS-style short mode.
8015  # If so, the updated path is stored in $new_path.
8016  new_path="$input_to_shortpath"
8017
8018  input_path="$input_to_shortpath"
8019  # Check if we need to convert this using DOS-style short mode. If the path
8020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8021  # take no chances and rewrite it.
8022  # Note: m4 eats our [], so we need to use [ and ] instead.
8023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8024  if test "x$has_forbidden_chars" != x; then
8025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8029      # Going to short mode and back again did indeed matter. Since short mode is
8030      # case insensitive, let's make it lowercase to improve readability.
8031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8032      # Now convert it back to Unix-stile (cygpath)
8033      input_path=`$CYGPATH -u "$shortmode_path"`
8034      new_path="$input_path"
8035    fi
8036  fi
8037
8038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8039  if test "x$test_cygdrive_prefix" = x; then
8040    # As a simple fix, exclude /usr/bin since it's not a real path.
8041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8043      # a path prefixed by /cygdrive for fixpath to work.
8044      new_path="$CYGWIN_ROOT_PATH$input_path"
8045    fi
8046  fi
8047
8048  # remove trailing .exe if any
8049  new_path="${new_path/%.exe/}"
8050
8051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8052
8053  # First separate the path from the arguments. This will split at the first
8054  # space.
8055  complete="$FOUND_MAKE"
8056  path="${complete%% *}"
8057  tmp="$complete EOL"
8058  arguments="${tmp#* }"
8059
8060  # Input might be given as Windows format, start by converting to
8061  # unix format.
8062  new_path="$path"
8063
8064  windows_path="$new_path"
8065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8066    unix_path=`$CYGPATH -u "$windows_path"`
8067    new_path="$unix_path"
8068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8070    new_path="$unix_path"
8071  fi
8072
8073
8074  # Now try to locate executable using which
8075  new_path=`$WHICH "$new_path" 2> /dev/null`
8076
8077  if test "x$new_path" = x; then
8078    # Oops. Which didn't find the executable.
8079    # The splitting of arguments from the executable at a space might have been incorrect,
8080    # since paths with space are more likely in Windows. Give it another try with the whole
8081    # argument.
8082    path="$complete"
8083    arguments="EOL"
8084    new_path="$path"
8085
8086  windows_path="$new_path"
8087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8088    unix_path=`$CYGPATH -u "$windows_path"`
8089    new_path="$unix_path"
8090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8092    new_path="$unix_path"
8093  fi
8094
8095
8096    new_path=`$WHICH "$new_path" 2> /dev/null`
8097
8098    if test "x$new_path" = x; then
8099      # It's still not found. Now this is an unrecoverable error.
8100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8101$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8102      has_space=`$ECHO "$complete" | $GREP " "`
8103      if test "x$has_space" != x; then
8104        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8105$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8106      fi
8107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8108    fi
8109  fi
8110
8111  # Now new_path has a complete unix path to the binary
8112  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8113    # Keep paths in /bin as-is, but remove trailing .exe if any
8114    new_path="${new_path/%.exe/}"
8115    # Do not save /bin paths to all_fixpath_prefixes!
8116  else
8117    # Not in mixed or Windows style, start by that.
8118    new_path=`cmd //c echo $new_path`
8119
8120  input_path="$new_path"
8121  # Check if we need to convert this using DOS-style short mode. If the path
8122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8123  # take no chances and rewrite it.
8124  # Note: m4 eats our [], so we need to use [ and ] instead.
8125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8126  if test "x$has_forbidden_chars" != x; then
8127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8129  fi
8130
8131    # Output is in $new_path
8132
8133  windows_path="$new_path"
8134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8135    unix_path=`$CYGPATH -u "$windows_path"`
8136    new_path="$unix_path"
8137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8139    new_path="$unix_path"
8140  fi
8141
8142    # remove trailing .exe if any
8143    new_path="${new_path/%.exe/}"
8144
8145    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8146    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8147  fi
8148
8149  else
8150    # We're on a posix platform. Hooray! :)
8151    # First separate the path from the arguments. This will split at the first
8152    # space.
8153    complete="$FOUND_MAKE"
8154    path="${complete%% *}"
8155    tmp="$complete EOL"
8156    arguments="${tmp#* }"
8157
8158    new_path=`$WHICH $path 2> /dev/null`
8159    if test "x$new_path" = x; then
8160      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8161      if test "x$is_absolute_path" != x; then
8162        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8163$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8164        new_path="$path"
8165      else
8166        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8167$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8168        has_space=`$ECHO "$complete" | $GREP " "`
8169        if test "x$has_space" != x; then
8170          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8171$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8172        fi
8173        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8174      fi
8175    fi
8176  fi
8177
8178  # Now join together the path and the arguments once again
8179  if test "x$arguments" != xEOL; then
8180      new_complete="$new_path ${arguments% *}"
8181  else
8182      new_complete="$new_path"
8183  fi
8184
8185  if test "x$complete" != "x$new_complete"; then
8186    FOUND_MAKE="$new_complete"
8187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8188$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8189  fi
8190
8191        fi
8192      fi
8193    fi
8194  fi
8195
8196    if test "x$FOUND_MAKE" = x; then
8197      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8198    fi
8199  else
8200    # Try our hardest to locate a correct version of GNU make
8201    for ac_prog in gmake
8202do
8203  # Extract the first word of "$ac_prog", so it can be a program name with args.
8204set dummy $ac_prog; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $CHECK_GMAKE in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8222    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8234if test -n "$CHECK_GMAKE"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8236$as_echo "$CHECK_GMAKE" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243  test -n "$CHECK_GMAKE" && break
8244done
8245
8246
8247  MAKE_CANDIDATE=""$CHECK_GMAKE""
8248  DESCRIPTION="gmake in PATH"
8249  if test "x$MAKE_CANDIDATE" != x; then
8250    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8251$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8252    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8253    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8254    if test "x$IS_GNU_MAKE" = x; then
8255      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8256$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8257    else
8258      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8259      if test "x$IS_MODERN_MAKE" = x; then
8260        { $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
8261$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;}
8262      else
8263        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8264          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8265            MAKE_EXPECTED_ENV='cygwin'
8266          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8267            MAKE_EXPECTED_ENV='msys'
8268          else
8269            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8270          fi
8271          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8272          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8273        else
8274          # Not relevant for non-Windows
8275          IS_MAKE_CORRECT_ENV=true
8276        fi
8277        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8278          { $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
8279$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;}
8280        else
8281          FOUND_MAKE=$MAKE_CANDIDATE
8282
8283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8284
8285  # First separate the path from the arguments. This will split at the first
8286  # space.
8287  complete="$FOUND_MAKE"
8288  path="${complete%% *}"
8289  tmp="$complete EOL"
8290  arguments="${tmp#* }"
8291
8292  # Input might be given as Windows format, start by converting to
8293  # unix format.
8294  new_path=`$CYGPATH -u "$path"`
8295
8296  # Now try to locate executable using which
8297  new_path=`$WHICH "$new_path" 2> /dev/null`
8298  # bat and cmd files are not always considered executable in cygwin causing which
8299  # to not find them
8300  if test "x$new_path" = x \
8301           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8302           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8303    new_path=`$CYGPATH -u "$path"`
8304  fi
8305  if test "x$new_path" = x; then
8306    # Oops. Which didn't find the executable.
8307    # The splitting of arguments from the executable at a space might have been incorrect,
8308    # since paths with space are more likely in Windows. Give it another try with the whole
8309    # argument.
8310    path="$complete"
8311    arguments="EOL"
8312    new_path=`$CYGPATH -u "$path"`
8313    new_path=`$WHICH "$new_path" 2> /dev/null`
8314    # bat and cmd files are not always considered executable in cygwin causing which
8315    # to not find them
8316    if test "x$new_path" = x \
8317             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8318             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8319      new_path=`$CYGPATH -u "$path"`
8320    fi
8321    if test "x$new_path" = x; then
8322      # It's still not found. Now this is an unrecoverable error.
8323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8324$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8325      has_space=`$ECHO "$complete" | $GREP " "`
8326      if test "x$has_space" != x; then
8327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8329      fi
8330      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8331    fi
8332  fi
8333
8334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8337  # "foo.exe" is OK but "foo" is an error.
8338  #
8339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8340  # It is also a way to make sure we got the proper file name for the real test later on.
8341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8342  if test "x$test_shortpath" = x; then
8343    # Short path failed, file does not exist as specified.
8344    # Try adding .exe or .cmd
8345    if test -f "${new_path}.exe"; then
8346       input_to_shortpath="${new_path}.exe"
8347    elif test -f "${new_path}.cmd"; then
8348       input_to_shortpath="${new_path}.cmd"
8349    else
8350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8351$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8354      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8355    fi
8356  else
8357    input_to_shortpath="$new_path"
8358  fi
8359
8360  # Call helper function which possibly converts this using DOS-style short mode.
8361  # If so, the updated path is stored in $new_path.
8362  new_path="$input_to_shortpath"
8363
8364  input_path="$input_to_shortpath"
8365  # Check if we need to convert this using DOS-style short mode. If the path
8366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8367  # take no chances and rewrite it.
8368  # Note: m4 eats our [], so we need to use [ and ] instead.
8369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8370  if test "x$has_forbidden_chars" != x; then
8371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8375      # Going to short mode and back again did indeed matter. Since short mode is
8376      # case insensitive, let's make it lowercase to improve readability.
8377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8378      # Now convert it back to Unix-stile (cygpath)
8379      input_path=`$CYGPATH -u "$shortmode_path"`
8380      new_path="$input_path"
8381    fi
8382  fi
8383
8384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8385  if test "x$test_cygdrive_prefix" = x; then
8386    # As a simple fix, exclude /usr/bin since it's not a real path.
8387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8389      # a path prefixed by /cygdrive for fixpath to work.
8390      new_path="$CYGWIN_ROOT_PATH$input_path"
8391    fi
8392  fi
8393
8394  # remove trailing .exe if any
8395  new_path="${new_path/%.exe/}"
8396
8397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8398
8399  # First separate the path from the arguments. This will split at the first
8400  # space.
8401  complete="$FOUND_MAKE"
8402  path="${complete%% *}"
8403  tmp="$complete EOL"
8404  arguments="${tmp#* }"
8405
8406  # Input might be given as Windows format, start by converting to
8407  # unix format.
8408  new_path="$path"
8409
8410  windows_path="$new_path"
8411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8412    unix_path=`$CYGPATH -u "$windows_path"`
8413    new_path="$unix_path"
8414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8416    new_path="$unix_path"
8417  fi
8418
8419
8420  # Now try to locate executable using which
8421  new_path=`$WHICH "$new_path" 2> /dev/null`
8422
8423  if test "x$new_path" = x; then
8424    # Oops. Which didn't find the executable.
8425    # The splitting of arguments from the executable at a space might have been incorrect,
8426    # since paths with space are more likely in Windows. Give it another try with the whole
8427    # argument.
8428    path="$complete"
8429    arguments="EOL"
8430    new_path="$path"
8431
8432  windows_path="$new_path"
8433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8434    unix_path=`$CYGPATH -u "$windows_path"`
8435    new_path="$unix_path"
8436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8438    new_path="$unix_path"
8439  fi
8440
8441
8442    new_path=`$WHICH "$new_path" 2> /dev/null`
8443
8444    if test "x$new_path" = x; then
8445      # It's still not found. Now this is an unrecoverable error.
8446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8447$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8448      has_space=`$ECHO "$complete" | $GREP " "`
8449      if test "x$has_space" != x; then
8450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8452      fi
8453      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8454    fi
8455  fi
8456
8457  # Now new_path has a complete unix path to the binary
8458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8459    # Keep paths in /bin as-is, but remove trailing .exe if any
8460    new_path="${new_path/%.exe/}"
8461    # Do not save /bin paths to all_fixpath_prefixes!
8462  else
8463    # Not in mixed or Windows style, start by that.
8464    new_path=`cmd //c echo $new_path`
8465
8466  input_path="$new_path"
8467  # Check if we need to convert this using DOS-style short mode. If the path
8468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8469  # take no chances and rewrite it.
8470  # Note: m4 eats our [], so we need to use [ and ] instead.
8471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8472  if test "x$has_forbidden_chars" != x; then
8473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8475  fi
8476
8477    # Output is in $new_path
8478
8479  windows_path="$new_path"
8480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8481    unix_path=`$CYGPATH -u "$windows_path"`
8482    new_path="$unix_path"
8483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8485    new_path="$unix_path"
8486  fi
8487
8488    # remove trailing .exe if any
8489    new_path="${new_path/%.exe/}"
8490
8491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8493  fi
8494
8495  else
8496    # We're on a posix platform. Hooray! :)
8497    # First separate the path from the arguments. This will split at the first
8498    # space.
8499    complete="$FOUND_MAKE"
8500    path="${complete%% *}"
8501    tmp="$complete EOL"
8502    arguments="${tmp#* }"
8503
8504    new_path=`$WHICH $path 2> /dev/null`
8505    if test "x$new_path" = x; then
8506      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8507      if test "x$is_absolute_path" != x; then
8508        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8509$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8510        new_path="$path"
8511      else
8512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8513$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8514        has_space=`$ECHO "$complete" | $GREP " "`
8515        if test "x$has_space" != x; then
8516          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8517$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8518        fi
8519        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8520      fi
8521    fi
8522  fi
8523
8524  # Now join together the path and the arguments once again
8525  if test "x$arguments" != xEOL; then
8526      new_complete="$new_path ${arguments% *}"
8527  else
8528      new_complete="$new_path"
8529  fi
8530
8531  if test "x$complete" != "x$new_complete"; then
8532    FOUND_MAKE="$new_complete"
8533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8534$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8535  fi
8536
8537        fi
8538      fi
8539    fi
8540  fi
8541
8542
8543    if test "x$FOUND_MAKE" = x; then
8544      for ac_prog in make
8545do
8546  # Extract the first word of "$ac_prog", so it can be a program name with args.
8547set dummy $ac_prog; ac_word=$2
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8549$as_echo_n "checking for $ac_word... " >&6; }
8550if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8551  $as_echo_n "(cached) " >&6
8552else
8553  case $CHECK_MAKE in
8554  [\\/]* | ?:[\\/]*)
8555  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8556  ;;
8557  *)
8558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8559for as_dir in $PATH
8560do
8561  IFS=$as_save_IFS
8562  test -z "$as_dir" && as_dir=.
8563    for ac_exec_ext in '' $ac_executable_extensions; do
8564  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8565    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8567    break 2
8568  fi
8569done
8570  done
8571IFS=$as_save_IFS
8572
8573  ;;
8574esac
8575fi
8576CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8577if test -n "$CHECK_MAKE"; then
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8579$as_echo "$CHECK_MAKE" >&6; }
8580else
8581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8582$as_echo "no" >&6; }
8583fi
8584
8585
8586  test -n "$CHECK_MAKE" && break
8587done
8588
8589
8590  MAKE_CANDIDATE=""$CHECK_MAKE""
8591  DESCRIPTION="make in PATH"
8592  if test "x$MAKE_CANDIDATE" != x; then
8593    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8594$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8595    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8596    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8597    if test "x$IS_GNU_MAKE" = x; then
8598      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8599$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8600    else
8601      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8602      if test "x$IS_MODERN_MAKE" = x; then
8603        { $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
8604$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;}
8605      else
8606        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8607          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8608            MAKE_EXPECTED_ENV='cygwin'
8609          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8610            MAKE_EXPECTED_ENV='msys'
8611          else
8612            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8613          fi
8614          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8615          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8616        else
8617          # Not relevant for non-Windows
8618          IS_MAKE_CORRECT_ENV=true
8619        fi
8620        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8621          { $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
8622$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;}
8623        else
8624          FOUND_MAKE=$MAKE_CANDIDATE
8625
8626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8627
8628  # First separate the path from the arguments. This will split at the first
8629  # space.
8630  complete="$FOUND_MAKE"
8631  path="${complete%% *}"
8632  tmp="$complete EOL"
8633  arguments="${tmp#* }"
8634
8635  # Input might be given as Windows format, start by converting to
8636  # unix format.
8637  new_path=`$CYGPATH -u "$path"`
8638
8639  # Now try to locate executable using which
8640  new_path=`$WHICH "$new_path" 2> /dev/null`
8641  # bat and cmd files are not always considered executable in cygwin causing which
8642  # to not find them
8643  if test "x$new_path" = x \
8644           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8645           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8646    new_path=`$CYGPATH -u "$path"`
8647  fi
8648  if test "x$new_path" = x; then
8649    # Oops. Which didn't find the executable.
8650    # The splitting of arguments from the executable at a space might have been incorrect,
8651    # since paths with space are more likely in Windows. Give it another try with the whole
8652    # argument.
8653    path="$complete"
8654    arguments="EOL"
8655    new_path=`$CYGPATH -u "$path"`
8656    new_path=`$WHICH "$new_path" 2> /dev/null`
8657    # bat and cmd files are not always considered executable in cygwin causing which
8658    # to not find them
8659    if test "x$new_path" = x \
8660             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8661             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8662      new_path=`$CYGPATH -u "$path"`
8663    fi
8664    if test "x$new_path" = x; then
8665      # It's still not found. Now this is an unrecoverable error.
8666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8668      has_space=`$ECHO "$complete" | $GREP " "`
8669      if test "x$has_space" != x; then
8670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8672      fi
8673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8674    fi
8675  fi
8676
8677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8680  # "foo.exe" is OK but "foo" is an error.
8681  #
8682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8683  # It is also a way to make sure we got the proper file name for the real test later on.
8684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8685  if test "x$test_shortpath" = x; then
8686    # Short path failed, file does not exist as specified.
8687    # Try adding .exe or .cmd
8688    if test -f "${new_path}.exe"; then
8689       input_to_shortpath="${new_path}.exe"
8690    elif test -f "${new_path}.cmd"; then
8691       input_to_shortpath="${new_path}.cmd"
8692    else
8693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8698    fi
8699  else
8700    input_to_shortpath="$new_path"
8701  fi
8702
8703  # Call helper function which possibly converts this using DOS-style short mode.
8704  # If so, the updated path is stored in $new_path.
8705  new_path="$input_to_shortpath"
8706
8707  input_path="$input_to_shortpath"
8708  # Check if we need to convert this using DOS-style short mode. If the path
8709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8710  # take no chances and rewrite it.
8711  # Note: m4 eats our [], so we need to use [ and ] instead.
8712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8713  if test "x$has_forbidden_chars" != x; then
8714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8718      # Going to short mode and back again did indeed matter. Since short mode is
8719      # case insensitive, let's make it lowercase to improve readability.
8720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8721      # Now convert it back to Unix-stile (cygpath)
8722      input_path=`$CYGPATH -u "$shortmode_path"`
8723      new_path="$input_path"
8724    fi
8725  fi
8726
8727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8728  if test "x$test_cygdrive_prefix" = x; then
8729    # As a simple fix, exclude /usr/bin since it's not a real path.
8730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8732      # a path prefixed by /cygdrive for fixpath to work.
8733      new_path="$CYGWIN_ROOT_PATH$input_path"
8734    fi
8735  fi
8736
8737  # remove trailing .exe if any
8738  new_path="${new_path/%.exe/}"
8739
8740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8741
8742  # First separate the path from the arguments. This will split at the first
8743  # space.
8744  complete="$FOUND_MAKE"
8745  path="${complete%% *}"
8746  tmp="$complete EOL"
8747  arguments="${tmp#* }"
8748
8749  # Input might be given as Windows format, start by converting to
8750  # unix format.
8751  new_path="$path"
8752
8753  windows_path="$new_path"
8754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8755    unix_path=`$CYGPATH -u "$windows_path"`
8756    new_path="$unix_path"
8757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8759    new_path="$unix_path"
8760  fi
8761
8762
8763  # Now try to locate executable using which
8764  new_path=`$WHICH "$new_path" 2> /dev/null`
8765
8766  if test "x$new_path" = x; then
8767    # Oops. Which didn't find the executable.
8768    # The splitting of arguments from the executable at a space might have been incorrect,
8769    # since paths with space are more likely in Windows. Give it another try with the whole
8770    # argument.
8771    path="$complete"
8772    arguments="EOL"
8773    new_path="$path"
8774
8775  windows_path="$new_path"
8776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8777    unix_path=`$CYGPATH -u "$windows_path"`
8778    new_path="$unix_path"
8779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8781    new_path="$unix_path"
8782  fi
8783
8784
8785    new_path=`$WHICH "$new_path" 2> /dev/null`
8786
8787    if test "x$new_path" = x; then
8788      # It's still not found. Now this is an unrecoverable error.
8789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8790$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8791      has_space=`$ECHO "$complete" | $GREP " "`
8792      if test "x$has_space" != x; then
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8795      fi
8796      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8797    fi
8798  fi
8799
8800  # Now new_path has a complete unix path to the binary
8801  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8802    # Keep paths in /bin as-is, but remove trailing .exe if any
8803    new_path="${new_path/%.exe/}"
8804    # Do not save /bin paths to all_fixpath_prefixes!
8805  else
8806    # Not in mixed or Windows style, start by that.
8807    new_path=`cmd //c echo $new_path`
8808
8809  input_path="$new_path"
8810  # Check if we need to convert this using DOS-style short mode. If the path
8811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8812  # take no chances and rewrite it.
8813  # Note: m4 eats our [], so we need to use [ and ] instead.
8814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8815  if test "x$has_forbidden_chars" != x; then
8816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8817    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8818  fi
8819
8820    # Output is in $new_path
8821
8822  windows_path="$new_path"
8823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8824    unix_path=`$CYGPATH -u "$windows_path"`
8825    new_path="$unix_path"
8826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8828    new_path="$unix_path"
8829  fi
8830
8831    # remove trailing .exe if any
8832    new_path="${new_path/%.exe/}"
8833
8834    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8835    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8836  fi
8837
8838  else
8839    # We're on a posix platform. Hooray! :)
8840    # First separate the path from the arguments. This will split at the first
8841    # space.
8842    complete="$FOUND_MAKE"
8843    path="${complete%% *}"
8844    tmp="$complete EOL"
8845    arguments="${tmp#* }"
8846
8847    new_path=`$WHICH $path 2> /dev/null`
8848    if test "x$new_path" = x; then
8849      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8850      if test "x$is_absolute_path" != x; then
8851        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8852$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8853        new_path="$path"
8854      else
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8857        has_space=`$ECHO "$complete" | $GREP " "`
8858        if test "x$has_space" != x; then
8859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8861        fi
8862        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8863      fi
8864    fi
8865  fi
8866
8867  # Now join together the path and the arguments once again
8868  if test "x$arguments" != xEOL; then
8869      new_complete="$new_path ${arguments% *}"
8870  else
8871      new_complete="$new_path"
8872  fi
8873
8874  if test "x$complete" != "x$new_complete"; then
8875    FOUND_MAKE="$new_complete"
8876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8877$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8878  fi
8879
8880        fi
8881      fi
8882    fi
8883  fi
8884
8885    fi
8886
8887    if test "x$FOUND_MAKE" = x; then
8888      if test "x$TOOLS_DIR" != x; then
8889        # We have a tools-dir, check that as well before giving up.
8890        OLD_PATH=$PATH
8891        PATH=$TOOLS_DIR:$PATH
8892        for ac_prog in gmake
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $CHECK_TOOLSDIR_GMAKE in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8913    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8925if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8927$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8935done
8936
8937
8938  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8939  DESCRIPTION="gmake in tools-dir"
8940  if test "x$MAKE_CANDIDATE" != x; then
8941    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8942$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8943    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8944    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8945    if test "x$IS_GNU_MAKE" = x; then
8946      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8947$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8948    else
8949      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8950      if test "x$IS_MODERN_MAKE" = x; then
8951        { $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
8952$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;}
8953      else
8954        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8955          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8956            MAKE_EXPECTED_ENV='cygwin'
8957          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8958            MAKE_EXPECTED_ENV='msys'
8959          else
8960            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8961          fi
8962          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8963          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8964        else
8965          # Not relevant for non-Windows
8966          IS_MAKE_CORRECT_ENV=true
8967        fi
8968        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8969          { $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
8970$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;}
8971        else
8972          FOUND_MAKE=$MAKE_CANDIDATE
8973
8974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8975
8976  # First separate the path from the arguments. This will split at the first
8977  # space.
8978  complete="$FOUND_MAKE"
8979  path="${complete%% *}"
8980  tmp="$complete EOL"
8981  arguments="${tmp#* }"
8982
8983  # Input might be given as Windows format, start by converting to
8984  # unix format.
8985  new_path=`$CYGPATH -u "$path"`
8986
8987  # Now try to locate executable using which
8988  new_path=`$WHICH "$new_path" 2> /dev/null`
8989  # bat and cmd files are not always considered executable in cygwin causing which
8990  # to not find them
8991  if test "x$new_path" = x \
8992           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8993           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8994    new_path=`$CYGPATH -u "$path"`
8995  fi
8996  if test "x$new_path" = x; then
8997    # Oops. Which didn't find the executable.
8998    # The splitting of arguments from the executable at a space might have been incorrect,
8999    # since paths with space are more likely in Windows. Give it another try with the whole
9000    # argument.
9001    path="$complete"
9002    arguments="EOL"
9003    new_path=`$CYGPATH -u "$path"`
9004    new_path=`$WHICH "$new_path" 2> /dev/null`
9005    # bat and cmd files are not always considered executable in cygwin causing which
9006    # to not find them
9007    if test "x$new_path" = x \
9008             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9009             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9010      new_path=`$CYGPATH -u "$path"`
9011    fi
9012    if test "x$new_path" = x; then
9013      # It's still not found. Now this is an unrecoverable error.
9014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9015$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9016      has_space=`$ECHO "$complete" | $GREP " "`
9017      if test "x$has_space" != x; then
9018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9020      fi
9021      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9022    fi
9023  fi
9024
9025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9028  # "foo.exe" is OK but "foo" is an error.
9029  #
9030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9031  # It is also a way to make sure we got the proper file name for the real test later on.
9032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9033  if test "x$test_shortpath" = x; then
9034    # Short path failed, file does not exist as specified.
9035    # Try adding .exe or .cmd
9036    if test -f "${new_path}.exe"; then
9037       input_to_shortpath="${new_path}.exe"
9038    elif test -f "${new_path}.cmd"; then
9039       input_to_shortpath="${new_path}.cmd"
9040    else
9041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9045      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9046    fi
9047  else
9048    input_to_shortpath="$new_path"
9049  fi
9050
9051  # Call helper function which possibly converts this using DOS-style short mode.
9052  # If so, the updated path is stored in $new_path.
9053  new_path="$input_to_shortpath"
9054
9055  input_path="$input_to_shortpath"
9056  # Check if we need to convert this using DOS-style short mode. If the path
9057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9058  # take no chances and rewrite it.
9059  # Note: m4 eats our [], so we need to use [ and ] instead.
9060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9061  if test "x$has_forbidden_chars" != x; then
9062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9066      # Going to short mode and back again did indeed matter. Since short mode is
9067      # case insensitive, let's make it lowercase to improve readability.
9068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9069      # Now convert it back to Unix-stile (cygpath)
9070      input_path=`$CYGPATH -u "$shortmode_path"`
9071      new_path="$input_path"
9072    fi
9073  fi
9074
9075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9076  if test "x$test_cygdrive_prefix" = x; then
9077    # As a simple fix, exclude /usr/bin since it's not a real path.
9078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9080      # a path prefixed by /cygdrive for fixpath to work.
9081      new_path="$CYGWIN_ROOT_PATH$input_path"
9082    fi
9083  fi
9084
9085  # remove trailing .exe if any
9086  new_path="${new_path/%.exe/}"
9087
9088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089
9090  # First separate the path from the arguments. This will split at the first
9091  # space.
9092  complete="$FOUND_MAKE"
9093  path="${complete%% *}"
9094  tmp="$complete EOL"
9095  arguments="${tmp#* }"
9096
9097  # Input might be given as Windows format, start by converting to
9098  # unix format.
9099  new_path="$path"
9100
9101  windows_path="$new_path"
9102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9103    unix_path=`$CYGPATH -u "$windows_path"`
9104    new_path="$unix_path"
9105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9107    new_path="$unix_path"
9108  fi
9109
9110
9111  # Now try to locate executable using which
9112  new_path=`$WHICH "$new_path" 2> /dev/null`
9113
9114  if test "x$new_path" = x; then
9115    # Oops. Which didn't find the executable.
9116    # The splitting of arguments from the executable at a space might have been incorrect,
9117    # since paths with space are more likely in Windows. Give it another try with the whole
9118    # argument.
9119    path="$complete"
9120    arguments="EOL"
9121    new_path="$path"
9122
9123  windows_path="$new_path"
9124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9125    unix_path=`$CYGPATH -u "$windows_path"`
9126    new_path="$unix_path"
9127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9129    new_path="$unix_path"
9130  fi
9131
9132
9133    new_path=`$WHICH "$new_path" 2> /dev/null`
9134
9135    if test "x$new_path" = x; then
9136      # It's still not found. Now this is an unrecoverable error.
9137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9139      has_space=`$ECHO "$complete" | $GREP " "`
9140      if test "x$has_space" != x; then
9141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9143      fi
9144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9145    fi
9146  fi
9147
9148  # Now new_path has a complete unix path to the binary
9149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9150    # Keep paths in /bin as-is, but remove trailing .exe if any
9151    new_path="${new_path/%.exe/}"
9152    # Do not save /bin paths to all_fixpath_prefixes!
9153  else
9154    # Not in mixed or Windows style, start by that.
9155    new_path=`cmd //c echo $new_path`
9156
9157  input_path="$new_path"
9158  # Check if we need to convert this using DOS-style short mode. If the path
9159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9160  # take no chances and rewrite it.
9161  # Note: m4 eats our [], so we need to use [ and ] instead.
9162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9163  if test "x$has_forbidden_chars" != x; then
9164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9166  fi
9167
9168    # Output is in $new_path
9169
9170  windows_path="$new_path"
9171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9172    unix_path=`$CYGPATH -u "$windows_path"`
9173    new_path="$unix_path"
9174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9176    new_path="$unix_path"
9177  fi
9178
9179    # remove trailing .exe if any
9180    new_path="${new_path/%.exe/}"
9181
9182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9184  fi
9185
9186  else
9187    # We're on a posix platform. Hooray! :)
9188    # First separate the path from the arguments. This will split at the first
9189    # space.
9190    complete="$FOUND_MAKE"
9191    path="${complete%% *}"
9192    tmp="$complete EOL"
9193    arguments="${tmp#* }"
9194
9195    new_path=`$WHICH $path 2> /dev/null`
9196    if test "x$new_path" = x; then
9197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9198      if test "x$is_absolute_path" != x; then
9199        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9200$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9201        new_path="$path"
9202      else
9203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9205        has_space=`$ECHO "$complete" | $GREP " "`
9206        if test "x$has_space" != x; then
9207          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9209        fi
9210        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9211      fi
9212    fi
9213  fi
9214
9215  # Now join together the path and the arguments once again
9216  if test "x$arguments" != xEOL; then
9217      new_complete="$new_path ${arguments% *}"
9218  else
9219      new_complete="$new_path"
9220  fi
9221
9222  if test "x$complete" != "x$new_complete"; then
9223    FOUND_MAKE="$new_complete"
9224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9225$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9226  fi
9227
9228        fi
9229      fi
9230    fi
9231  fi
9232
9233        if test "x$FOUND_MAKE" = x; then
9234          for ac_prog in make
9235do
9236  # Extract the first word of "$ac_prog", so it can be a program name with args.
9237set dummy $ac_prog; ac_word=$2
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9239$as_echo_n "checking for $ac_word... " >&6; }
9240if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9241  $as_echo_n "(cached) " >&6
9242else
9243  case $CHECK_TOOLSDIR_MAKE in
9244  [\\/]* | ?:[\\/]*)
9245  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9246  ;;
9247  *)
9248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9249for as_dir in $PATH
9250do
9251  IFS=$as_save_IFS
9252  test -z "$as_dir" && as_dir=.
9253    for ac_exec_ext in '' $ac_executable_extensions; do
9254  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9255    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9257    break 2
9258  fi
9259done
9260  done
9261IFS=$as_save_IFS
9262
9263  ;;
9264esac
9265fi
9266CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9267if test -n "$CHECK_TOOLSDIR_MAKE"; then
9268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9269$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9270else
9271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9272$as_echo "no" >&6; }
9273fi
9274
9275
9276  test -n "$CHECK_TOOLSDIR_MAKE" && break
9277done
9278
9279
9280  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9281  DESCRIPTION="make in tools-dir"
9282  if test "x$MAKE_CANDIDATE" != x; then
9283    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9284$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9285    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9286    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9287    if test "x$IS_GNU_MAKE" = x; then
9288      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9289$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9290    else
9291      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9292      if test "x$IS_MODERN_MAKE" = x; then
9293        { $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
9294$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;}
9295      else
9296        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9297          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9298            MAKE_EXPECTED_ENV='cygwin'
9299          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9300            MAKE_EXPECTED_ENV='msys'
9301          else
9302            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9303          fi
9304          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9305          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9306        else
9307          # Not relevant for non-Windows
9308          IS_MAKE_CORRECT_ENV=true
9309        fi
9310        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9311          { $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
9312$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;}
9313        else
9314          FOUND_MAKE=$MAKE_CANDIDATE
9315
9316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9317
9318  # First separate the path from the arguments. This will split at the first
9319  # space.
9320  complete="$FOUND_MAKE"
9321  path="${complete%% *}"
9322  tmp="$complete EOL"
9323  arguments="${tmp#* }"
9324
9325  # Input might be given as Windows format, start by converting to
9326  # unix format.
9327  new_path=`$CYGPATH -u "$path"`
9328
9329  # Now try to locate executable using which
9330  new_path=`$WHICH "$new_path" 2> /dev/null`
9331  # bat and cmd files are not always considered executable in cygwin causing which
9332  # to not find them
9333  if test "x$new_path" = x \
9334           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9336    new_path=`$CYGPATH -u "$path"`
9337  fi
9338  if test "x$new_path" = x; then
9339    # Oops. Which didn't find the executable.
9340    # The splitting of arguments from the executable at a space might have been incorrect,
9341    # since paths with space are more likely in Windows. Give it another try with the whole
9342    # argument.
9343    path="$complete"
9344    arguments="EOL"
9345    new_path=`$CYGPATH -u "$path"`
9346    new_path=`$WHICH "$new_path" 2> /dev/null`
9347    # bat and cmd files are not always considered executable in cygwin causing which
9348    # to not find them
9349    if test "x$new_path" = x \
9350             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352      new_path=`$CYGPATH -u "$path"`
9353    fi
9354    if test "x$new_path" = x; then
9355      # It's still not found. Now this is an unrecoverable error.
9356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9358      has_space=`$ECHO "$complete" | $GREP " "`
9359      if test "x$has_space" != x; then
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9362      fi
9363      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9364    fi
9365  fi
9366
9367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9370  # "foo.exe" is OK but "foo" is an error.
9371  #
9372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9373  # It is also a way to make sure we got the proper file name for the real test later on.
9374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9375  if test "x$test_shortpath" = x; then
9376    # Short path failed, file does not exist as specified.
9377    # Try adding .exe or .cmd
9378    if test -f "${new_path}.exe"; then
9379       input_to_shortpath="${new_path}.exe"
9380    elif test -f "${new_path}.cmd"; then
9381       input_to_shortpath="${new_path}.cmd"
9382    else
9383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9384$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9388    fi
9389  else
9390    input_to_shortpath="$new_path"
9391  fi
9392
9393  # Call helper function which possibly converts this using DOS-style short mode.
9394  # If so, the updated path is stored in $new_path.
9395  new_path="$input_to_shortpath"
9396
9397  input_path="$input_to_shortpath"
9398  # Check if we need to convert this using DOS-style short mode. If the path
9399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9400  # take no chances and rewrite it.
9401  # Note: m4 eats our [], so we need to use [ and ] instead.
9402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9403  if test "x$has_forbidden_chars" != x; then
9404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9408      # Going to short mode and back again did indeed matter. Since short mode is
9409      # case insensitive, let's make it lowercase to improve readability.
9410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411      # Now convert it back to Unix-stile (cygpath)
9412      input_path=`$CYGPATH -u "$shortmode_path"`
9413      new_path="$input_path"
9414    fi
9415  fi
9416
9417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9418  if test "x$test_cygdrive_prefix" = x; then
9419    # As a simple fix, exclude /usr/bin since it's not a real path.
9420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9422      # a path prefixed by /cygdrive for fixpath to work.
9423      new_path="$CYGWIN_ROOT_PATH$input_path"
9424    fi
9425  fi
9426
9427  # remove trailing .exe if any
9428  new_path="${new_path/%.exe/}"
9429
9430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9431
9432  # First separate the path from the arguments. This will split at the first
9433  # space.
9434  complete="$FOUND_MAKE"
9435  path="${complete%% *}"
9436  tmp="$complete EOL"
9437  arguments="${tmp#* }"
9438
9439  # Input might be given as Windows format, start by converting to
9440  # unix format.
9441  new_path="$path"
9442
9443  windows_path="$new_path"
9444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445    unix_path=`$CYGPATH -u "$windows_path"`
9446    new_path="$unix_path"
9447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449    new_path="$unix_path"
9450  fi
9451
9452
9453  # Now try to locate executable using which
9454  new_path=`$WHICH "$new_path" 2> /dev/null`
9455
9456  if test "x$new_path" = x; then
9457    # Oops. Which didn't find the executable.
9458    # The splitting of arguments from the executable at a space might have been incorrect,
9459    # since paths with space are more likely in Windows. Give it another try with the whole
9460    # argument.
9461    path="$complete"
9462    arguments="EOL"
9463    new_path="$path"
9464
9465  windows_path="$new_path"
9466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9467    unix_path=`$CYGPATH -u "$windows_path"`
9468    new_path="$unix_path"
9469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9471    new_path="$unix_path"
9472  fi
9473
9474
9475    new_path=`$WHICH "$new_path" 2> /dev/null`
9476
9477    if test "x$new_path" = x; then
9478      # It's still not found. Now this is an unrecoverable error.
9479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9480$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9481      has_space=`$ECHO "$complete" | $GREP " "`
9482      if test "x$has_space" != x; then
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9485      fi
9486      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9487    fi
9488  fi
9489
9490  # Now new_path has a complete unix path to the binary
9491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9492    # Keep paths in /bin as-is, but remove trailing .exe if any
9493    new_path="${new_path/%.exe/}"
9494    # Do not save /bin paths to all_fixpath_prefixes!
9495  else
9496    # Not in mixed or Windows style, start by that.
9497    new_path=`cmd //c echo $new_path`
9498
9499  input_path="$new_path"
9500  # Check if we need to convert this using DOS-style short mode. If the path
9501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9502  # take no chances and rewrite it.
9503  # Note: m4 eats our [], so we need to use [ and ] instead.
9504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9505  if test "x$has_forbidden_chars" != x; then
9506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9508  fi
9509
9510    # Output is in $new_path
9511
9512  windows_path="$new_path"
9513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9514    unix_path=`$CYGPATH -u "$windows_path"`
9515    new_path="$unix_path"
9516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9518    new_path="$unix_path"
9519  fi
9520
9521    # remove trailing .exe if any
9522    new_path="${new_path/%.exe/}"
9523
9524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9526  fi
9527
9528  else
9529    # We're on a posix platform. Hooray! :)
9530    # First separate the path from the arguments. This will split at the first
9531    # space.
9532    complete="$FOUND_MAKE"
9533    path="${complete%% *}"
9534    tmp="$complete EOL"
9535    arguments="${tmp#* }"
9536
9537    new_path=`$WHICH $path 2> /dev/null`
9538    if test "x$new_path" = x; then
9539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9540      if test "x$is_absolute_path" != x; then
9541        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9542$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9543        new_path="$path"
9544      else
9545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9547        has_space=`$ECHO "$complete" | $GREP " "`
9548        if test "x$has_space" != x; then
9549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9551        fi
9552        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9553      fi
9554    fi
9555  fi
9556
9557  # Now join together the path and the arguments once again
9558  if test "x$arguments" != xEOL; then
9559      new_complete="$new_path ${arguments% *}"
9560  else
9561      new_complete="$new_path"
9562  fi
9563
9564  if test "x$complete" != "x$new_complete"; then
9565    FOUND_MAKE="$new_complete"
9566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9567$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9568  fi
9569
9570        fi
9571      fi
9572    fi
9573  fi
9574
9575        fi
9576        PATH=$OLD_PATH
9577      fi
9578    fi
9579
9580    if test "x$FOUND_MAKE" = x; then
9581      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
9582    fi
9583  fi
9584
9585  MAKE=$FOUND_MAKE
9586
9587  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9588$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9589
9590
9591
9592    # Test if find supports -delete
9593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9594$as_echo_n "checking if find supports -delete... " >&6; }
9595    FIND_DELETE="-delete"
9596
9597    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9598
9599    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9600
9601    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9602    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9603        # No, it does not.
9604        rm $DELETEDIR/TestIfFindSupportsDelete
9605        FIND_DELETE="-exec rm \{\} \+"
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9607$as_echo "no" >&6; }
9608    else
9609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9610$as_echo "yes" >&6; }
9611    fi
9612    rmdir $DELETEDIR
9613
9614
9615
9616# These tools might not be installed by default,
9617# need hint on how to install them.
9618
9619    for ac_prog in unzip
9620do
9621  # Extract the first word of "$ac_prog", so it can be a program name with args.
9622set dummy $ac_prog; ac_word=$2
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9624$as_echo_n "checking for $ac_word... " >&6; }
9625if test "${ac_cv_path_UNZIP+set}" = set; then :
9626  $as_echo_n "(cached) " >&6
9627else
9628  case $UNZIP in
9629  [\\/]* | ?:[\\/]*)
9630  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9631  ;;
9632  *)
9633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634for as_dir in $PATH
9635do
9636  IFS=$as_save_IFS
9637  test -z "$as_dir" && as_dir=.
9638    for ac_exec_ext in '' $ac_executable_extensions; do
9639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9640    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9642    break 2
9643  fi
9644done
9645  done
9646IFS=$as_save_IFS
9647
9648  ;;
9649esac
9650fi
9651UNZIP=$ac_cv_path_UNZIP
9652if test -n "$UNZIP"; then
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9654$as_echo "$UNZIP" >&6; }
9655else
9656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }
9658fi
9659
9660
9661  test -n "$UNZIP" && break
9662done
9663
9664
9665    if test "x$UNZIP" = x; then
9666        if test "xunzip" = x; then
9667          PROG_NAME=unzip
9668        else
9669          PROG_NAME=unzip
9670        fi
9671        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9672$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9673        as_fn_error $? "Cannot continue" "$LINENO" 5
9674    fi
9675
9676
9677
9678    for ac_prog in zip
9679do
9680  # Extract the first word of "$ac_prog", so it can be a program name with args.
9681set dummy $ac_prog; ac_word=$2
9682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9683$as_echo_n "checking for $ac_word... " >&6; }
9684if test "${ac_cv_path_ZIP+set}" = set; then :
9685  $as_echo_n "(cached) " >&6
9686else
9687  case $ZIP in
9688  [\\/]* | ?:[\\/]*)
9689  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9690  ;;
9691  *)
9692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9693for as_dir in $PATH
9694do
9695  IFS=$as_save_IFS
9696  test -z "$as_dir" && as_dir=.
9697    for ac_exec_ext in '' $ac_executable_extensions; do
9698  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9699    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9701    break 2
9702  fi
9703done
9704  done
9705IFS=$as_save_IFS
9706
9707  ;;
9708esac
9709fi
9710ZIP=$ac_cv_path_ZIP
9711if test -n "$ZIP"; then
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9713$as_echo "$ZIP" >&6; }
9714else
9715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9716$as_echo "no" >&6; }
9717fi
9718
9719
9720  test -n "$ZIP" && break
9721done
9722
9723
9724    if test "x$ZIP" = x; then
9725        if test "xzip" = x; then
9726          PROG_NAME=zip
9727        else
9728          PROG_NAME=zip
9729        fi
9730        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9731$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9732        as_fn_error $? "Cannot continue" "$LINENO" 5
9733    fi
9734
9735
9736
9737# Non-required basic tools
9738
9739# Extract the first word of "ldd", so it can be a program name with args.
9740set dummy ldd; ac_word=$2
9741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9742$as_echo_n "checking for $ac_word... " >&6; }
9743if test "${ac_cv_path_LDD+set}" = set; then :
9744  $as_echo_n "(cached) " >&6
9745else
9746  case $LDD in
9747  [\\/]* | ?:[\\/]*)
9748  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9749  ;;
9750  *)
9751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9752for as_dir in $PATH
9753do
9754  IFS=$as_save_IFS
9755  test -z "$as_dir" && as_dir=.
9756    for ac_exec_ext in '' $ac_executable_extensions; do
9757  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9758    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9760    break 2
9761  fi
9762done
9763  done
9764IFS=$as_save_IFS
9765
9766  ;;
9767esac
9768fi
9769LDD=$ac_cv_path_LDD
9770if test -n "$LDD"; then
9771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9772$as_echo "$LDD" >&6; }
9773else
9774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775$as_echo "no" >&6; }
9776fi
9777
9778
9779if test "x$LDD" = "x"; then
9780    # List shared lib dependencies is used for
9781    # debug output and checking for forbidden dependencies.
9782    # We can build without it.
9783    LDD="true"
9784fi
9785# Extract the first word of "otool", so it can be a program name with args.
9786set dummy otool; ac_word=$2
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9788$as_echo_n "checking for $ac_word... " >&6; }
9789if test "${ac_cv_path_OTOOL+set}" = set; then :
9790  $as_echo_n "(cached) " >&6
9791else
9792  case $OTOOL in
9793  [\\/]* | ?:[\\/]*)
9794  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9795  ;;
9796  *)
9797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9798for as_dir in $PATH
9799do
9800  IFS=$as_save_IFS
9801  test -z "$as_dir" && as_dir=.
9802    for ac_exec_ext in '' $ac_executable_extensions; do
9803  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9804    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9806    break 2
9807  fi
9808done
9809  done
9810IFS=$as_save_IFS
9811
9812  ;;
9813esac
9814fi
9815OTOOL=$ac_cv_path_OTOOL
9816if test -n "$OTOOL"; then
9817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9818$as_echo "$OTOOL" >&6; }
9819else
9820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822fi
9823
9824
9825if test "x$OTOOL" = "x"; then
9826   OTOOL="true"
9827fi
9828for ac_prog in readelf greadelf
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if test "${ac_cv_path_READELF+set}" = set; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $READELF in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9849    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860READELF=$ac_cv_path_READELF
9861if test -n "$READELF"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9863$as_echo "$READELF" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$READELF" && break
9871done
9872
9873# Extract the first word of "hg", so it can be a program name with args.
9874set dummy hg; ac_word=$2
9875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876$as_echo_n "checking for $ac_word... " >&6; }
9877if test "${ac_cv_path_HG+set}" = set; then :
9878  $as_echo_n "(cached) " >&6
9879else
9880  case $HG in
9881  [\\/]* | ?:[\\/]*)
9882  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9883  ;;
9884  *)
9885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886for as_dir in $PATH
9887do
9888  IFS=$as_save_IFS
9889  test -z "$as_dir" && as_dir=.
9890    for ac_exec_ext in '' $ac_executable_extensions; do
9891  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9892    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894    break 2
9895  fi
9896done
9897  done
9898IFS=$as_save_IFS
9899
9900  ;;
9901esac
9902fi
9903HG=$ac_cv_path_HG
9904if test -n "$HG"; then
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9906$as_echo "$HG" >&6; }
9907else
9908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909$as_echo "no" >&6; }
9910fi
9911
9912
9913# Extract the first word of "stat", so it can be a program name with args.
9914set dummy stat; ac_word=$2
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9916$as_echo_n "checking for $ac_word... " >&6; }
9917if test "${ac_cv_path_STAT+set}" = set; then :
9918  $as_echo_n "(cached) " >&6
9919else
9920  case $STAT in
9921  [\\/]* | ?:[\\/]*)
9922  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9923  ;;
9924  *)
9925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9926for as_dir in $PATH
9927do
9928  IFS=$as_save_IFS
9929  test -z "$as_dir" && as_dir=.
9930    for ac_exec_ext in '' $ac_executable_extensions; do
9931  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9932    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9934    break 2
9935  fi
9936done
9937  done
9938IFS=$as_save_IFS
9939
9940  ;;
9941esac
9942fi
9943STAT=$ac_cv_path_STAT
9944if test -n "$STAT"; then
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9946$as_echo "$STAT" >&6; }
9947else
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
9950fi
9951
9952
9953# Extract the first word of "time", so it can be a program name with args.
9954set dummy time; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if test "${ac_cv_path_TIME+set}" = set; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  case $TIME in
9961  [\\/]* | ?:[\\/]*)
9962  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9963  ;;
9964  *)
9965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970    for ac_exec_ext in '' $ac_executable_extensions; do
9971  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9972    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977  done
9978IFS=$as_save_IFS
9979
9980  ;;
9981esac
9982fi
9983TIME=$ac_cv_path_TIME
9984if test -n "$TIME"; then
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9986$as_echo "$TIME" >&6; }
9987else
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993
9994if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
9995
9996    for ac_prog in comm
9997do
9998  # Extract the first word of "$ac_prog", so it can be a program name with args.
9999set dummy $ac_prog; ac_word=$2
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10001$as_echo_n "checking for $ac_word... " >&6; }
10002if test "${ac_cv_path_COMM+set}" = set; then :
10003  $as_echo_n "(cached) " >&6
10004else
10005  case $COMM in
10006  [\\/]* | ?:[\\/]*)
10007  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10008  ;;
10009  *)
10010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10011for as_dir in $PATH
10012do
10013  IFS=$as_save_IFS
10014  test -z "$as_dir" && as_dir=.
10015    for ac_exec_ext in '' $ac_executable_extensions; do
10016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10017    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10019    break 2
10020  fi
10021done
10022  done
10023IFS=$as_save_IFS
10024
10025  ;;
10026esac
10027fi
10028COMM=$ac_cv_path_COMM
10029if test -n "$COMM"; then
10030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10031$as_echo "$COMM" >&6; }
10032else
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10034$as_echo "no" >&6; }
10035fi
10036
10037
10038  test -n "$COMM" && break
10039done
10040
10041
10042    if test "x$COMM" = x; then
10043        if test "xcomm" = x; then
10044          PROG_NAME=comm
10045        else
10046          PROG_NAME=comm
10047        fi
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10050        as_fn_error $? "Cannot continue" "$LINENO" 5
10051    fi
10052
10053
10054fi
10055
10056
10057# Check if pkg-config is available.
10058
10059
10060if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10061	if test -n "$ac_tool_prefix"; then
10062  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10063set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065$as_echo_n "checking for $ac_word... " >&6; }
10066if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10067  $as_echo_n "(cached) " >&6
10068else
10069  case $PKG_CONFIG in
10070  [\\/]* | ?:[\\/]*)
10071  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10072  ;;
10073  *)
10074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075for as_dir in $PATH
10076do
10077  IFS=$as_save_IFS
10078  test -z "$as_dir" && as_dir=.
10079    for ac_exec_ext in '' $ac_executable_extensions; do
10080  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10081    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083    break 2
10084  fi
10085done
10086  done
10087IFS=$as_save_IFS
10088
10089  ;;
10090esac
10091fi
10092PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10093if test -n "$PKG_CONFIG"; then
10094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10095$as_echo "$PKG_CONFIG" >&6; }
10096else
10097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102fi
10103if test -z "$ac_cv_path_PKG_CONFIG"; then
10104  ac_pt_PKG_CONFIG=$PKG_CONFIG
10105  # Extract the first word of "pkg-config", so it can be a program name with args.
10106set dummy pkg-config; ac_word=$2
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10108$as_echo_n "checking for $ac_word... " >&6; }
10109if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10110  $as_echo_n "(cached) " >&6
10111else
10112  case $ac_pt_PKG_CONFIG in
10113  [\\/]* | ?:[\\/]*)
10114  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10115  ;;
10116  *)
10117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10118for as_dir in $PATH
10119do
10120  IFS=$as_save_IFS
10121  test -z "$as_dir" && as_dir=.
10122    for ac_exec_ext in '' $ac_executable_extensions; do
10123  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10124    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10126    break 2
10127  fi
10128done
10129  done
10130IFS=$as_save_IFS
10131
10132  ;;
10133esac
10134fi
10135ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10136if test -n "$ac_pt_PKG_CONFIG"; then
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10138$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10139else
10140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142fi
10143
10144  if test "x$ac_pt_PKG_CONFIG" = x; then
10145    PKG_CONFIG=""
10146  else
10147    case $cross_compiling:$ac_tool_warned in
10148yes:)
10149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10151ac_tool_warned=yes ;;
10152esac
10153    PKG_CONFIG=$ac_pt_PKG_CONFIG
10154  fi
10155else
10156  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10157fi
10158
10159fi
10160if test -n "$PKG_CONFIG"; then
10161	_pkg_min_version=0.9.0
10162	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10163$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10164	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10165		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10166$as_echo "yes" >&6; }
10167	else
10168		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10169$as_echo "no" >&6; }
10170		PKG_CONFIG=""
10171	fi
10172
10173fi
10174
10175# After basic tools have been setup, we can check build os specific details.
10176
10177###############################################################################
10178
10179# Note that this is the build platform OS version!
10180
10181OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10182OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10183OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10184OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10185
10186
10187
10188
10189
10190# Setup builddeps, for automatic downloading of tools we need.
10191# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10192# boot-jdk setup, but we need to have basic tools setup first.
10193
10194
10195# Check whether --with-builddeps-conf was given.
10196if test "${with_builddeps_conf+set}" = set; then :
10197  withval=$with_builddeps_conf;
10198fi
10199
10200
10201
10202# Check whether --with-builddeps-server was given.
10203if test "${with_builddeps_server+set}" = set; then :
10204  withval=$with_builddeps_server;
10205fi
10206
10207
10208
10209# Check whether --with-builddeps-dir was given.
10210if test "${with_builddeps_dir+set}" = set; then :
10211  withval=$with_builddeps_dir;
10212else
10213  with_builddeps_dir=/localhome/builddeps
10214fi
10215
10216
10217
10218# Check whether --with-builddeps-group was given.
10219if test "${with_builddeps_group+set}" = set; then :
10220  withval=$with_builddeps_group;
10221fi
10222
10223
10224
10225
10226    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10227        if test "x$with_builddeps_conf" != x; then
10228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10229$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10230            builddepsfile=$with_builddeps_conf
10231            if test -s $builddepsfile; then
10232                . $builddepsfile
10233                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10234$as_echo "loaded!" >&6; }
10235            else
10236               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10237           fi
10238        else
10239            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10240$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10241            builddepsfile=`mktemp`
10242            touch $builddepsfile
10243            # Put all found confs into a single file.
10244            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10245            # Source the file to acquire the variables
10246            if test -s $builddepsfile; then
10247                . $builddepsfile
10248                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10249$as_echo "found at least one!" >&6; }
10250            else
10251               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10252           fi
10253        fi
10254        # Create build and target names that use _ instead of "-" and ".".
10255        # This is necessary to use them in variable names.
10256        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10257        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10258        # Extract rewrite information for build and target
10259        eval rewritten_build=\${REWRITE_${build_var}}
10260        if test "x$rewritten_build" = x; then
10261            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10262            echo Build stays the same $rewritten_build
10263        else
10264            echo Rewriting build for builddeps into $rewritten_build
10265        fi
10266        eval rewritten_target=\${REWRITE_${target_var}}
10267        if test "x$rewritten_target" = x; then
10268            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10269            echo Target stays the same $rewritten_target
10270        else
10271            echo Rewriting target for builddeps into $rewritten_target
10272        fi
10273        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10274        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10275    fi
10276    for ac_prog in 7z unzip
10277do
10278  # Extract the first word of "$ac_prog", so it can be a program name with args.
10279set dummy $ac_prog; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  if test -n "$BDEPS_UNZIP"; then
10286  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10287else
10288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289for as_dir in $PATH
10290do
10291  IFS=$as_save_IFS
10292  test -z "$as_dir" && as_dir=.
10293    for ac_exec_ext in '' $ac_executable_extensions; do
10294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10295    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297    break 2
10298  fi
10299done
10300  done
10301IFS=$as_save_IFS
10302
10303fi
10304fi
10305BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10306if test -n "$BDEPS_UNZIP"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10308$as_echo "$BDEPS_UNZIP" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$BDEPS_UNZIP" && break
10316done
10317
10318    if test "x$BDEPS_UNZIP" = x7z; then
10319        BDEPS_UNZIP="7z x"
10320    fi
10321
10322    for ac_prog in wget lftp ftp
10323do
10324  # Extract the first word of "$ac_prog", so it can be a program name with args.
10325set dummy $ac_prog; ac_word=$2
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327$as_echo_n "checking for $ac_word... " >&6; }
10328if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10329  $as_echo_n "(cached) " >&6
10330else
10331  if test -n "$BDEPS_FTP"; then
10332  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10333else
10334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10341    ac_cv_prog_BDEPS_FTP="$ac_prog"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349fi
10350fi
10351BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10352if test -n "$BDEPS_FTP"; then
10353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10354$as_echo "$BDEPS_FTP" >&6; }
10355else
10356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358fi
10359
10360
10361  test -n "$BDEPS_FTP" && break
10362done
10363
10364
10365
10366###############################################################################
10367#
10368# Determine OpenJDK variants, options and version numbers.
10369#
10370###############################################################################
10371
10372# We need build & target for this.
10373
10374
10375###############################################################################
10376#
10377# Should we build only OpenJDK even if closed sources are present?
10378#
10379# Check whether --enable-openjdk-only was given.
10380if test "${enable_openjdk_only+set}" = set; then :
10381  enableval=$enable_openjdk_only;
10382else
10383  enable_openjdk_only="no"
10384fi
10385
10386
10387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10388$as_echo_n "checking for presence of closed sources... " >&6; }
10389if test -d "$SRC_ROOT/jdk/src/closed"; then
10390    CLOSED_SOURCE_PRESENT=yes
10391else
10392    CLOSED_SOURCE_PRESENT=no
10393fi
10394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10395$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10396
10397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10398$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10399SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10401$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10402
10403if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10404  OPENJDK=true
10405  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10407$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10408  fi
10409else
10410  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10411    OPENJDK=true
10412  else
10413    OPENJDK=false
10414  fi
10415fi
10416
10417if test "x$OPENJDK" = "xtrue"; then
10418    SET_OPENJDK="OPENJDK=true"
10419fi
10420
10421
10422
10423###############################################################################
10424#
10425# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10426# We always build headless support.
10427#
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10429$as_echo_n "checking headful support... " >&6; }
10430# Check whether --enable-headful was given.
10431if test "${enable_headful+set}" = set; then :
10432  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10433else
10434  SUPPORT_HEADFUL=yes
10435fi
10436
10437
10438SUPPORT_HEADLESS=yes
10439BUILD_HEADLESS="BUILD_HEADLESS:=true"
10440
10441if test "x$SUPPORT_HEADFUL" = xyes; then
10442    # We are building both headful and headless.
10443    headful_msg="inlude support for both headful and headless"
10444fi
10445
10446if test "x$SUPPORT_HEADFUL" = xno; then
10447    # Thus we are building headless only.
10448    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10449    headful_msg="headless only"
10450fi
10451
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10453$as_echo "$headful_msg" >&6; }
10454
10455
10456
10457
10458
10459# Control wether Hotspot runs Queens test after build.
10460# Check whether --enable-hotspot-test-in-build was given.
10461if test "${enable_hotspot_test_in_build+set}" = set; then :
10462  enableval=$enable_hotspot_test_in_build;
10463else
10464  enable_hotspot_test_in_build=no
10465fi
10466
10467if test "x$enable_hotspot_test_in_build" = "xyes"; then
10468    TEST_IN_BUILD=true
10469else
10470    TEST_IN_BUILD=false
10471fi
10472
10473
10474###############################################################################
10475#
10476# Choose cacerts source file
10477#
10478
10479# Check whether --with-cacerts-file was given.
10480if test "${with_cacerts_file+set}" = set; then :
10481  withval=$with_cacerts_file;
10482fi
10483
10484if test "x$with_cacerts_file" != x; then
10485    CACERTS_FILE=$with_cacerts_file
10486else
10487    if test "x$OPENJDK" = "xtrue"; then
10488        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10489    else
10490        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10491    fi
10492fi
10493
10494
10495###############################################################################
10496#
10497# Enable or disable unlimited crypto
10498#
10499# Check whether --enable-unlimited-crypto was given.
10500if test "${enable_unlimited_crypto+set}" = set; then :
10501  enableval=$enable_unlimited_crypto;
10502else
10503  enable_unlimited_crypto=no
10504fi
10505
10506if test "x$enable_unlimited_crypto" = "xyes"; then
10507    UNLIMITED_CRYPTO=true
10508else
10509    UNLIMITED_CRYPTO=false
10510fi
10511
10512
10513###############################################################################
10514#
10515# Compress jars
10516#
10517COMPRESS_JARS=false
10518
10519
10520
10521
10522# Source the version numbers
10523. $AUTOCONF_DIR/version.numbers
10524if test "x$OPENJDK" = "xfalse"; then
10525    . $AUTOCONF_DIR/closed.version.numbers
10526fi
10527# Now set the JDK version, milestone, build number etc.
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542COPYRIGHT_YEAR=`date +'%Y'`
10543
10544
10545RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10546
10547
10548if test "x$JDK_UPDATE_VERSION" != x; then
10549    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10550else
10551    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10552fi
10553
10554
10555if test "x$MILESTONE" != x; then
10556    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10557else
10558    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10559fi
10560
10561
10562if test "x$JDK_BUILD_NUMBER" != x; then
10563    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10564else
10565    JDK_BUILD_NUMBER=b00
10566    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10567    # Avoid [:alnum:] since it depends on the locale.
10568    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10569    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10570    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10571fi
10572
10573COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10574
10575
10576
10577###############################################################################
10578#
10579# Setup BootJDK, used to bootstrap the build.
10580#
10581###############################################################################
10582
10583
10584BOOT_JDK_FOUND=no
10585
10586# Check whether --with-boot-jdk was given.
10587if test "${with_boot_jdk+set}" = set; then :
10588  withval=$with_boot_jdk;
10589fi
10590
10591
10592# We look for the Boot JDK through various means, going from more certain to
10593# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10594# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10595# must check if this is indeed valid; otherwise we'll continue looking.
10596
10597# Test: Is bootjdk explicitely set by command line arguments?
10598
10599  if test "x$BOOT_JDK_FOUND" = xno; then
10600    # Now execute the test
10601
10602if test "x$with_boot_jdk" != x; then
10603    BOOT_JDK=$with_boot_jdk
10604    BOOT_JDK_FOUND=maybe
10605    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10606$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10607fi
10608
10609
10610    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10611    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10612      # Do we have a bin/java?
10613      if test ! -x "$BOOT_JDK/bin/java"; then
10614        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10616        BOOT_JDK_FOUND=no
10617      else
10618        # Do we have a bin/javac?
10619        if test ! -x "$BOOT_JDK/bin/javac"; then
10620          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10622          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10623$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10624          BOOT_JDK_FOUND=no
10625        else
10626          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10627          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10628            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10630            BOOT_JDK_FOUND=no
10631          else
10632            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10633            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10634
10635            # Extra M4 quote needed to protect [] in grep expression.
10636            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10637            if test "x$FOUND_VERSION_78" = x; then
10638              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10640              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10641$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10642              BOOT_JDK_FOUND=no
10643            else
10644              # We're done! :-)
10645              BOOT_JDK_FOUND=yes
10646
10647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10648
10649  # Input might be given as Windows format, start by converting to
10650  # unix format.
10651  path="$BOOT_JDK"
10652  new_path=`$CYGPATH -u "$path"`
10653
10654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10657  # "foo.exe" is OK but "foo" is an error.
10658  #
10659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10660  # It is also a way to make sure we got the proper file name for the real test later on.
10661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10662  if test "x$test_shortpath" = x; then
10663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10666  fi
10667
10668  # Call helper function which possibly converts this using DOS-style short mode.
10669  # If so, the updated path is stored in $new_path.
10670
10671  input_path="$new_path"
10672  # Check if we need to convert this using DOS-style short mode. If the path
10673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10674  # take no chances and rewrite it.
10675  # Note: m4 eats our [], so we need to use [ and ] instead.
10676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10677  if test "x$has_forbidden_chars" != x; then
10678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10682      # Going to short mode and back again did indeed matter. Since short mode is
10683      # case insensitive, let's make it lowercase to improve readability.
10684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10685      # Now convert it back to Unix-stile (cygpath)
10686      input_path=`$CYGPATH -u "$shortmode_path"`
10687      new_path="$input_path"
10688    fi
10689  fi
10690
10691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10692  if test "x$test_cygdrive_prefix" = x; then
10693    # As a simple fix, exclude /usr/bin since it's not a real path.
10694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10696      # a path prefixed by /cygdrive for fixpath to work.
10697      new_path="$CYGWIN_ROOT_PATH$input_path"
10698    fi
10699  fi
10700
10701
10702  if test "x$path" != "x$new_path"; then
10703    BOOT_JDK="$new_path"
10704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10706  fi
10707
10708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10709
10710  path="$BOOT_JDK"
10711  has_colon=`$ECHO $path | $GREP ^.:`
10712  new_path="$path"
10713  if test "x$has_colon" = x; then
10714    # Not in mixed or Windows style, start by that.
10715    new_path=`cmd //c echo $path`
10716  fi
10717
10718
10719  input_path="$new_path"
10720  # Check if we need to convert this using DOS-style short mode. If the path
10721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10722  # take no chances and rewrite it.
10723  # Note: m4 eats our [], so we need to use [ and ] instead.
10724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10725  if test "x$has_forbidden_chars" != x; then
10726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10728  fi
10729
10730
10731  windows_path="$new_path"
10732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10733    unix_path=`$CYGPATH -u "$windows_path"`
10734    new_path="$unix_path"
10735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10737    new_path="$unix_path"
10738  fi
10739
10740  if test "x$path" != "x$new_path"; then
10741    BOOT_JDK="$new_path"
10742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10744  fi
10745
10746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10748
10749  else
10750    # We're on a posix platform. Hooray! :)
10751    path="$BOOT_JDK"
10752
10753    if test ! -f "$path" && test ! -d "$path"; then
10754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10755    fi
10756
10757    has_space=`$ECHO "$path" | $GREP " "`
10758    if test "x$has_space" != x; then
10759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10761      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10762    fi
10763  fi
10764
10765              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10766$as_echo_n "checking for Boot JDK... " >&6; }
10767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10768$as_echo "$BOOT_JDK" >&6; }
10769              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10770$as_echo_n "checking Boot JDK version... " >&6; }
10771              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10773$as_echo "$BOOT_JDK_VERSION" >&6; }
10774            fi # end check jdk version
10775          fi # end check rt.jar
10776        fi # end check javac
10777      fi # end check java
10778    fi # end check boot jdk found
10779  fi
10780
10781if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10782  # Having specified an argument which is incorrect will produce an instant failure;
10783  # we should not go on looking
10784  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10785fi
10786
10787# Test: Is bootjdk available from builddeps?
10788
10789  if test "x$BOOT_JDK_FOUND" = xno; then
10790    # Now execute the test
10791
10792
10793
10794    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10795        # Source the builddeps file again, to make sure it uses the latest variables!
10796        . $builddepsfile
10797        # Look for a target and build machine specific resource!
10798        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10799        if test "x$resource" = x; then
10800            # Ok, lets instead look for a target specific resource
10801            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10802        fi
10803        if test "x$resource" = x; then
10804            # Ok, lets instead look for a build specific resource
10805            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10806        fi
10807        if test "x$resource" = x; then
10808            # Ok, lets instead look for a generic resource
10809            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10810            resource=${builddep_bootjdk}
10811        fi
10812        if test "x$resource" != x; then
10813            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10814$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10815	    # If the resource in the builddeps.conf file is an existing directory,
10816	    # for example /java/linux/cups
10817	    if test -d ${resource}; then
10818	       depdir=${resource}
10819	    else
10820
10821# bootjdk is for example mymodule
10822# $resource is for example libs/general/libmymod_1_2_3.zip
10823# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10824# $with_builddeps_dir is for example /localhome/builddeps
10825# depdir is the name of the variable into which we store the depdir, eg MYMOD
10826# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10827# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10828    filename=`basename $resource`
10829    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10830    filebase=${filename%%.*}
10831    extension=${filename#*.}
10832    installdir=$with_builddeps_dir/$filebase
10833    if test ! -f $installdir/$filename.unpacked; then
10834        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10835$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10836        if test ! -d $installdir; then
10837            mkdir -p $installdir
10838        fi
10839        if test ! -d $installdir; then
10840            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10841        fi
10842        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10843        touch $tmpfile
10844        if test ! -f $tmpfile; then
10845            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10846        fi
10847
10848    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10849    # $tmpfile is the local file name for the downloaded file.
10850    VALID_TOOL=no
10851    if test "x$BDEPS_FTP" = xwget; then
10852       VALID_TOOL=yes
10853       wget -O $tmpfile $with_builddeps_server/$resource
10854    fi
10855    if test "x$BDEPS_FTP" = xlftp; then
10856       VALID_TOOL=yes
10857       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10858    fi
10859    if test "x$BDEPS_FTP" = xftp; then
10860        VALID_TOOL=yes
10861        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10862        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10863        FTPUSERPWD=${FTPSERVER%%@*}
10864        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10865            FTPUSER=${userpwd%%:*}
10866            FTPPWD=${userpwd#*@}
10867            FTPSERVER=${FTPSERVER#*@}
10868        else
10869            FTPUSER=ftp
10870            FTPPWD=ftp
10871        fi
10872        # the "pass" command does not work on some
10873        # ftp clients (read ftp.exe) but if it works,
10874        # passive mode is better!
10875        (\
10876            echo "user $FTPUSER $FTPPWD"        ;\
10877            echo "pass"                         ;\
10878            echo "bin"                          ;\
10879            echo "get $FTPPATH $tmpfile"              ;\
10880        ) | ftp -in $FTPSERVER
10881    fi
10882    if test "x$VALID_TOOL" != xyes; then
10883       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10884    fi
10885
10886        mv $tmpfile $installdir/$filename
10887        if test ! -s $installdir/$filename; then
10888            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10889        fi
10890        case "$extension" in
10891            zip)  echo "Unzipping $installdir/$filename..."
10892               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10893            ;;
10894            tar.gz) echo "Untaring $installdir/$filename..."
10895               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10896            ;;
10897            tgz) echo "Untaring $installdir/$filename..."
10898               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10899            ;;
10900            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10901            ;;
10902        esac
10903    fi
10904    if test -f $installdir/$filename.unpacked; then
10905        depdir=$installdir
10906    fi
10907
10908	    fi
10909            # Source the builddeps file again, because in the previous command, the depdir
10910            # was updated to point at the current build dependency install directory.
10911            . $builddepsfile
10912            # Now extract variables from the builddeps.conf files.
10913            theroot=${builddep_bootjdk_ROOT}
10914            thecflags=${builddep_bootjdk_CFLAGS}
10915            thelibs=${builddep_bootjdk_LIBS}
10916            if test "x$depdir" = x; then
10917                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10918            fi
10919            BOOT_JDK=$depdir
10920            if test "x$theroot" != x; then
10921               BOOT_JDK="$theroot"
10922            fi
10923            if test "x$thecflags" != x; then
10924               BOOT_JDK_CFLAGS="$thecflags"
10925            fi
10926            if test "x$thelibs" != x; then
10927               BOOT_JDK_LIBS="$thelibs"
10928            fi
10929            BOOT_JDK_FOUND=maybe
10930            else BOOT_JDK_FOUND=no
10931
10932        fi
10933        else BOOT_JDK_FOUND=no
10934
10935    fi
10936
10937
10938
10939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10941      # Do we have a bin/java?
10942      if test ! -x "$BOOT_JDK/bin/java"; then
10943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10945        BOOT_JDK_FOUND=no
10946      else
10947        # Do we have a bin/javac?
10948        if test ! -x "$BOOT_JDK/bin/javac"; then
10949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10953          BOOT_JDK_FOUND=no
10954        else
10955          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10956          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10957            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10959            BOOT_JDK_FOUND=no
10960          else
10961            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10962            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10963
10964            # Extra M4 quote needed to protect [] in grep expression.
10965            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10966            if test "x$FOUND_VERSION_78" = x; then
10967              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10969              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10970$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10971              BOOT_JDK_FOUND=no
10972            else
10973              # We're done! :-)
10974              BOOT_JDK_FOUND=yes
10975
10976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10977
10978  # Input might be given as Windows format, start by converting to
10979  # unix format.
10980  path="$BOOT_JDK"
10981  new_path=`$CYGPATH -u "$path"`
10982
10983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10986  # "foo.exe" is OK but "foo" is an error.
10987  #
10988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10989  # It is also a way to make sure we got the proper file name for the real test later on.
10990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10991  if test "x$test_shortpath" = x; then
10992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10993$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10994    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10995  fi
10996
10997  # Call helper function which possibly converts this using DOS-style short mode.
10998  # If so, the updated path is stored in $new_path.
10999
11000  input_path="$new_path"
11001  # Check if we need to convert this using DOS-style short mode. If the path
11002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11003  # take no chances and rewrite it.
11004  # Note: m4 eats our [], so we need to use [ and ] instead.
11005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11006  if test "x$has_forbidden_chars" != x; then
11007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11011      # Going to short mode and back again did indeed matter. Since short mode is
11012      # case insensitive, let's make it lowercase to improve readability.
11013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11014      # Now convert it back to Unix-stile (cygpath)
11015      input_path=`$CYGPATH -u "$shortmode_path"`
11016      new_path="$input_path"
11017    fi
11018  fi
11019
11020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11021  if test "x$test_cygdrive_prefix" = x; then
11022    # As a simple fix, exclude /usr/bin since it's not a real path.
11023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11025      # a path prefixed by /cygdrive for fixpath to work.
11026      new_path="$CYGWIN_ROOT_PATH$input_path"
11027    fi
11028  fi
11029
11030
11031  if test "x$path" != "x$new_path"; then
11032    BOOT_JDK="$new_path"
11033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11035  fi
11036
11037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11038
11039  path="$BOOT_JDK"
11040  has_colon=`$ECHO $path | $GREP ^.:`
11041  new_path="$path"
11042  if test "x$has_colon" = x; then
11043    # Not in mixed or Windows style, start by that.
11044    new_path=`cmd //c echo $path`
11045  fi
11046
11047
11048  input_path="$new_path"
11049  # Check if we need to convert this using DOS-style short mode. If the path
11050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11051  # take no chances and rewrite it.
11052  # Note: m4 eats our [], so we need to use [ and ] instead.
11053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11054  if test "x$has_forbidden_chars" != x; then
11055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11057  fi
11058
11059
11060  windows_path="$new_path"
11061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11062    unix_path=`$CYGPATH -u "$windows_path"`
11063    new_path="$unix_path"
11064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11066    new_path="$unix_path"
11067  fi
11068
11069  if test "x$path" != "x$new_path"; then
11070    BOOT_JDK="$new_path"
11071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11073  fi
11074
11075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11077
11078  else
11079    # We're on a posix platform. Hooray! :)
11080    path="$BOOT_JDK"
11081
11082    if test ! -f "$path" && test ! -d "$path"; then
11083      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11084    fi
11085
11086    has_space=`$ECHO "$path" | $GREP " "`
11087    if test "x$has_space" != x; then
11088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11089$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11091    fi
11092  fi
11093
11094              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11095$as_echo_n "checking for Boot JDK... " >&6; }
11096              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11097$as_echo "$BOOT_JDK" >&6; }
11098              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11099$as_echo_n "checking Boot JDK version... " >&6; }
11100              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11101              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11102$as_echo "$BOOT_JDK_VERSION" >&6; }
11103            fi # end check jdk version
11104          fi # end check rt.jar
11105        fi # end check javac
11106      fi # end check java
11107    fi # end check boot jdk found
11108  fi
11109
11110
11111# Test: Is $JAVA_HOME set?
11112
11113  if test "x$BOOT_JDK_FOUND" = xno; then
11114    # Now execute the test
11115
11116    if test "x$JAVA_HOME" != x; then
11117        JAVA_HOME_PROCESSED="$JAVA_HOME"
11118
11119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11120
11121  # Input might be given as Windows format, start by converting to
11122  # unix format.
11123  path="$JAVA_HOME_PROCESSED"
11124  new_path=`$CYGPATH -u "$path"`
11125
11126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11129  # "foo.exe" is OK but "foo" is an error.
11130  #
11131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11132  # It is also a way to make sure we got the proper file name for the real test later on.
11133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11134  if test "x$test_shortpath" = x; then
11135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11136$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11137    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11138  fi
11139
11140  # Call helper function which possibly converts this using DOS-style short mode.
11141  # If so, the updated path is stored in $new_path.
11142
11143  input_path="$new_path"
11144  # Check if we need to convert this using DOS-style short mode. If the path
11145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11146  # take no chances and rewrite it.
11147  # Note: m4 eats our [], so we need to use [ and ] instead.
11148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11149  if test "x$has_forbidden_chars" != x; then
11150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11154      # Going to short mode and back again did indeed matter. Since short mode is
11155      # case insensitive, let's make it lowercase to improve readability.
11156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11157      # Now convert it back to Unix-stile (cygpath)
11158      input_path=`$CYGPATH -u "$shortmode_path"`
11159      new_path="$input_path"
11160    fi
11161  fi
11162
11163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11164  if test "x$test_cygdrive_prefix" = x; then
11165    # As a simple fix, exclude /usr/bin since it's not a real path.
11166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11168      # a path prefixed by /cygdrive for fixpath to work.
11169      new_path="$CYGWIN_ROOT_PATH$input_path"
11170    fi
11171  fi
11172
11173
11174  if test "x$path" != "x$new_path"; then
11175    JAVA_HOME_PROCESSED="$new_path"
11176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11177$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11178  fi
11179
11180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11181
11182  path="$JAVA_HOME_PROCESSED"
11183  has_colon=`$ECHO $path | $GREP ^.:`
11184  new_path="$path"
11185  if test "x$has_colon" = x; then
11186    # Not in mixed or Windows style, start by that.
11187    new_path=`cmd //c echo $path`
11188  fi
11189
11190
11191  input_path="$new_path"
11192  # Check if we need to convert this using DOS-style short mode. If the path
11193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11194  # take no chances and rewrite it.
11195  # Note: m4 eats our [], so we need to use [ and ] instead.
11196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11197  if test "x$has_forbidden_chars" != x; then
11198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11200  fi
11201
11202
11203  windows_path="$new_path"
11204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11205    unix_path=`$CYGPATH -u "$windows_path"`
11206    new_path="$unix_path"
11207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11209    new_path="$unix_path"
11210  fi
11211
11212  if test "x$path" != "x$new_path"; then
11213    JAVA_HOME_PROCESSED="$new_path"
11214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11215$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11216  fi
11217
11218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11220
11221  else
11222    # We're on a posix platform. Hooray! :)
11223    path="$JAVA_HOME_PROCESSED"
11224
11225    if test ! -f "$path" && test ! -d "$path"; then
11226      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11227    fi
11228
11229    has_space=`$ECHO "$path" | $GREP " "`
11230    if test "x$has_space" != x; then
11231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11232$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11233      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11234    fi
11235  fi
11236
11237        if test ! -d "$JAVA_HOME_PROCESSED"; then
11238            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11239$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11240        else
11241          # Aha, the user has set a JAVA_HOME
11242          # let us use that as the Boot JDK.
11243          BOOT_JDK="$JAVA_HOME_PROCESSED"
11244          BOOT_JDK_FOUND=maybe
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11246$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11247        fi
11248    fi
11249
11250
11251    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11252    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11253      # Do we have a bin/java?
11254      if test ! -x "$BOOT_JDK/bin/java"; then
11255        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11257        BOOT_JDK_FOUND=no
11258      else
11259        # Do we have a bin/javac?
11260        if test ! -x "$BOOT_JDK/bin/javac"; then
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11262$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11263          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11264$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11265          BOOT_JDK_FOUND=no
11266        else
11267          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11268          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11269            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11271            BOOT_JDK_FOUND=no
11272          else
11273            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11274            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11275
11276            # Extra M4 quote needed to protect [] in grep expression.
11277            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11278            if test "x$FOUND_VERSION_78" = x; then
11279              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11281              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11282$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11283              BOOT_JDK_FOUND=no
11284            else
11285              # We're done! :-)
11286              BOOT_JDK_FOUND=yes
11287
11288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11289
11290  # Input might be given as Windows format, start by converting to
11291  # unix format.
11292  path="$BOOT_JDK"
11293  new_path=`$CYGPATH -u "$path"`
11294
11295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11298  # "foo.exe" is OK but "foo" is an error.
11299  #
11300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11301  # It is also a way to make sure we got the proper file name for the real test later on.
11302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11303  if test "x$test_shortpath" = x; then
11304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11305$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11306    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11307  fi
11308
11309  # Call helper function which possibly converts this using DOS-style short mode.
11310  # If so, the updated path is stored in $new_path.
11311
11312  input_path="$new_path"
11313  # Check if we need to convert this using DOS-style short mode. If the path
11314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11315  # take no chances and rewrite it.
11316  # Note: m4 eats our [], so we need to use [ and ] instead.
11317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11318  if test "x$has_forbidden_chars" != x; then
11319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11323      # Going to short mode and back again did indeed matter. Since short mode is
11324      # case insensitive, let's make it lowercase to improve readability.
11325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11326      # Now convert it back to Unix-stile (cygpath)
11327      input_path=`$CYGPATH -u "$shortmode_path"`
11328      new_path="$input_path"
11329    fi
11330  fi
11331
11332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11333  if test "x$test_cygdrive_prefix" = x; then
11334    # As a simple fix, exclude /usr/bin since it's not a real path.
11335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11337      # a path prefixed by /cygdrive for fixpath to work.
11338      new_path="$CYGWIN_ROOT_PATH$input_path"
11339    fi
11340  fi
11341
11342
11343  if test "x$path" != "x$new_path"; then
11344    BOOT_JDK="$new_path"
11345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11347  fi
11348
11349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11350
11351  path="$BOOT_JDK"
11352  has_colon=`$ECHO $path | $GREP ^.:`
11353  new_path="$path"
11354  if test "x$has_colon" = x; then
11355    # Not in mixed or Windows style, start by that.
11356    new_path=`cmd //c echo $path`
11357  fi
11358
11359
11360  input_path="$new_path"
11361  # Check if we need to convert this using DOS-style short mode. If the path
11362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11363  # take no chances and rewrite it.
11364  # Note: m4 eats our [], so we need to use [ and ] instead.
11365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11366  if test "x$has_forbidden_chars" != x; then
11367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11369  fi
11370
11371
11372  windows_path="$new_path"
11373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11374    unix_path=`$CYGPATH -u "$windows_path"`
11375    new_path="$unix_path"
11376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11378    new_path="$unix_path"
11379  fi
11380
11381  if test "x$path" != "x$new_path"; then
11382    BOOT_JDK="$new_path"
11383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11384$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11385  fi
11386
11387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11389
11390  else
11391    # We're on a posix platform. Hooray! :)
11392    path="$BOOT_JDK"
11393
11394    if test ! -f "$path" && test ! -d "$path"; then
11395      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11396    fi
11397
11398    has_space=`$ECHO "$path" | $GREP " "`
11399    if test "x$has_space" != x; then
11400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11403    fi
11404  fi
11405
11406              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11407$as_echo_n "checking for Boot JDK... " >&6; }
11408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11409$as_echo "$BOOT_JDK" >&6; }
11410              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11411$as_echo_n "checking Boot JDK version... " >&6; }
11412              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11413              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11414$as_echo "$BOOT_JDK_VERSION" >&6; }
11415            fi # end check jdk version
11416          fi # end check rt.jar
11417        fi # end check javac
11418      fi # end check java
11419    fi # end check boot jdk found
11420  fi
11421
11422
11423# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11424
11425  if test "x$BOOT_JDK_FOUND" = xno; then
11426    # Now execute the test
11427
11428    if test -x /usr/libexec/java_home; then
11429        BOOT_JDK=`/usr/libexec/java_home`
11430        BOOT_JDK_FOUND=maybe
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11432$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11433    fi
11434
11435
11436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11438      # Do we have a bin/java?
11439      if test ! -x "$BOOT_JDK/bin/java"; then
11440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11442        BOOT_JDK_FOUND=no
11443      else
11444        # Do we have a bin/javac?
11445        if test ! -x "$BOOT_JDK/bin/javac"; then
11446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11450          BOOT_JDK_FOUND=no
11451        else
11452          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11453          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11454            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11456            BOOT_JDK_FOUND=no
11457          else
11458            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11459            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11460
11461            # Extra M4 quote needed to protect [] in grep expression.
11462            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11463            if test "x$FOUND_VERSION_78" = x; then
11464              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11465$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11466              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11467$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11468              BOOT_JDK_FOUND=no
11469            else
11470              # We're done! :-)
11471              BOOT_JDK_FOUND=yes
11472
11473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11474
11475  # Input might be given as Windows format, start by converting to
11476  # unix format.
11477  path="$BOOT_JDK"
11478  new_path=`$CYGPATH -u "$path"`
11479
11480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11483  # "foo.exe" is OK but "foo" is an error.
11484  #
11485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11486  # It is also a way to make sure we got the proper file name for the real test later on.
11487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11488  if test "x$test_shortpath" = x; then
11489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11490$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11491    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11492  fi
11493
11494  # Call helper function which possibly converts this using DOS-style short mode.
11495  # If so, the updated path is stored in $new_path.
11496
11497  input_path="$new_path"
11498  # Check if we need to convert this using DOS-style short mode. If the path
11499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11500  # take no chances and rewrite it.
11501  # Note: m4 eats our [], so we need to use [ and ] instead.
11502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11503  if test "x$has_forbidden_chars" != x; then
11504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11508      # Going to short mode and back again did indeed matter. Since short mode is
11509      # case insensitive, let's make it lowercase to improve readability.
11510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11511      # Now convert it back to Unix-stile (cygpath)
11512      input_path=`$CYGPATH -u "$shortmode_path"`
11513      new_path="$input_path"
11514    fi
11515  fi
11516
11517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11518  if test "x$test_cygdrive_prefix" = x; then
11519    # As a simple fix, exclude /usr/bin since it's not a real path.
11520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11522      # a path prefixed by /cygdrive for fixpath to work.
11523      new_path="$CYGWIN_ROOT_PATH$input_path"
11524    fi
11525  fi
11526
11527
11528  if test "x$path" != "x$new_path"; then
11529    BOOT_JDK="$new_path"
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11531$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11532  fi
11533
11534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11535
11536  path="$BOOT_JDK"
11537  has_colon=`$ECHO $path | $GREP ^.:`
11538  new_path="$path"
11539  if test "x$has_colon" = x; then
11540    # Not in mixed or Windows style, start by that.
11541    new_path=`cmd //c echo $path`
11542  fi
11543
11544
11545  input_path="$new_path"
11546  # Check if we need to convert this using DOS-style short mode. If the path
11547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11548  # take no chances and rewrite it.
11549  # Note: m4 eats our [], so we need to use [ and ] instead.
11550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11551  if test "x$has_forbidden_chars" != x; then
11552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11554  fi
11555
11556
11557  windows_path="$new_path"
11558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11559    unix_path=`$CYGPATH -u "$windows_path"`
11560    new_path="$unix_path"
11561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11563    new_path="$unix_path"
11564  fi
11565
11566  if test "x$path" != "x$new_path"; then
11567    BOOT_JDK="$new_path"
11568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11569$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11570  fi
11571
11572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11574
11575  else
11576    # We're on a posix platform. Hooray! :)
11577    path="$BOOT_JDK"
11578
11579    if test ! -f "$path" && test ! -d "$path"; then
11580      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11581    fi
11582
11583    has_space=`$ECHO "$path" | $GREP " "`
11584    if test "x$has_space" != x; then
11585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11588    fi
11589  fi
11590
11591              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11592$as_echo_n "checking for Boot JDK... " >&6; }
11593              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11594$as_echo "$BOOT_JDK" >&6; }
11595              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11596$as_echo_n "checking Boot JDK version... " >&6; }
11597              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11598              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11599$as_echo "$BOOT_JDK_VERSION" >&6; }
11600            fi # end check jdk version
11601          fi # end check rt.jar
11602        fi # end check javac
11603      fi # end check java
11604    fi # end check boot jdk found
11605  fi
11606
11607
11608# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11609
11610  if test "x$BOOT_JDK_FOUND" = xno; then
11611    # Now execute the test
11612
11613    # Extract the first word of "javac", so it can be a program name with args.
11614set dummy javac; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $JAVAC_CHECK in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11632    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11644if test -n "$JAVAC_CHECK"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11646$as_echo "$JAVAC_CHECK" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653    # Extract the first word of "java", so it can be a program name with args.
11654set dummy java; ac_word=$2
11655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11656$as_echo_n "checking for $ac_word... " >&6; }
11657if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11658  $as_echo_n "(cached) " >&6
11659else
11660  case $JAVA_CHECK in
11661  [\\/]* | ?:[\\/]*)
11662  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11663  ;;
11664  *)
11665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11666for as_dir in $PATH
11667do
11668  IFS=$as_save_IFS
11669  test -z "$as_dir" && as_dir=.
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11672    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11674    break 2
11675  fi
11676done
11677  done
11678IFS=$as_save_IFS
11679
11680  ;;
11681esac
11682fi
11683JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11684if test -n "$JAVA_CHECK"; then
11685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11686$as_echo "$JAVA_CHECK" >&6; }
11687else
11688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11689$as_echo "no" >&6; }
11690fi
11691
11692
11693    BINARY="$JAVAC_CHECK"
11694    if test "x$JAVAC_CHECK" = x; then
11695        BINARY="$JAVA_CHECK"
11696    fi
11697    if test "x$BINARY" != x; then
11698        # So there is a java(c) binary, it might be part of a JDK.
11699        # Lets find the JDK/JRE directory by following symbolic links.
11700        # Linux/GNU systems often have links from /usr/bin/java to
11701        # /etc/alternatives/java to the real JDK binary.
11702
11703    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11704        # Follow a chain of symbolic links. Use readlink
11705        # where it exists, else fall back to horribly
11706        # complicated shell code.
11707        if test "x$READLINK_TESTED" != yes; then
11708            # On MacOSX there is a readlink tool with a different
11709            # purpose than the GNU readlink tool. Check the found readlink.
11710            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
11711            if test "x$ISGNU" = x; then
11712                 # A readlink that we do not know how to use.
11713                 # Are there other non-GNU readlinks out there?
11714                 READLINK_TESTED=yes
11715                 READLINK=
11716            fi
11717        fi
11718
11719        if test "x$READLINK" != x; then
11720            BINARY=`$READLINK -f $BINARY`
11721        else
11722            STARTDIR=$PWD
11723            COUNTER=0
11724            sym_link_dir=`$DIRNAME $BINARY`
11725            sym_link_file=`$BASENAME $BINARY`
11726            while test $COUNTER -lt 20; do
11727                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11728                if test "x$ISLINK" == x; then
11729                    # This is not a symbolic link! We are done!
11730                    break
11731                fi
11732                # The link might be relative! We have to use cd to travel safely.
11733                cd $sym_link_dir
11734                # ... and we must get the to the absolute path, not one using symbolic links.
11735                cd `pwd -P`
11736                cd `$DIRNAME $ISLINK`
11737                sym_link_dir=`$THEPWDCMD`
11738                sym_link_file=`$BASENAME $ISLINK`
11739                let COUNTER=COUNTER+1
11740            done
11741            cd $STARTDIR
11742            BINARY=$sym_link_dir/$sym_link_file
11743        fi
11744    fi
11745
11746        BOOT_JDK=`dirname "$BINARY"`
11747        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11748        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11749            # Looks like we found ourselves an JDK
11750            BOOT_JDK_FOUND=maybe
11751            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11752$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11753        fi
11754    fi
11755
11756
11757    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11758    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11759      # Do we have a bin/java?
11760      if test ! -x "$BOOT_JDK/bin/java"; then
11761        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11763        BOOT_JDK_FOUND=no
11764      else
11765        # Do we have a bin/javac?
11766        if test ! -x "$BOOT_JDK/bin/javac"; then
11767          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11769          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11770$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11771          BOOT_JDK_FOUND=no
11772        else
11773          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11774          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11775            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11777            BOOT_JDK_FOUND=no
11778          else
11779            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11781
11782            # Extra M4 quote needed to protect [] in grep expression.
11783            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11784            if test "x$FOUND_VERSION_78" = x; then
11785              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11786$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11787              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11788$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11789              BOOT_JDK_FOUND=no
11790            else
11791              # We're done! :-)
11792              BOOT_JDK_FOUND=yes
11793
11794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11795
11796  # Input might be given as Windows format, start by converting to
11797  # unix format.
11798  path="$BOOT_JDK"
11799  new_path=`$CYGPATH -u "$path"`
11800
11801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11804  # "foo.exe" is OK but "foo" is an error.
11805  #
11806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11807  # It is also a way to make sure we got the proper file name for the real test later on.
11808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11809  if test "x$test_shortpath" = x; then
11810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11813  fi
11814
11815  # Call helper function which possibly converts this using DOS-style short mode.
11816  # If so, the updated path is stored in $new_path.
11817
11818  input_path="$new_path"
11819  # Check if we need to convert this using DOS-style short mode. If the path
11820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11821  # take no chances and rewrite it.
11822  # Note: m4 eats our [], so we need to use [ and ] instead.
11823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11824  if test "x$has_forbidden_chars" != x; then
11825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11829      # Going to short mode and back again did indeed matter. Since short mode is
11830      # case insensitive, let's make it lowercase to improve readability.
11831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11832      # Now convert it back to Unix-stile (cygpath)
11833      input_path=`$CYGPATH -u "$shortmode_path"`
11834      new_path="$input_path"
11835    fi
11836  fi
11837
11838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11839  if test "x$test_cygdrive_prefix" = x; then
11840    # As a simple fix, exclude /usr/bin since it's not a real path.
11841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11843      # a path prefixed by /cygdrive for fixpath to work.
11844      new_path="$CYGWIN_ROOT_PATH$input_path"
11845    fi
11846  fi
11847
11848
11849  if test "x$path" != "x$new_path"; then
11850    BOOT_JDK="$new_path"
11851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11853  fi
11854
11855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11856
11857  path="$BOOT_JDK"
11858  has_colon=`$ECHO $path | $GREP ^.:`
11859  new_path="$path"
11860  if test "x$has_colon" = x; then
11861    # Not in mixed or Windows style, start by that.
11862    new_path=`cmd //c echo $path`
11863  fi
11864
11865
11866  input_path="$new_path"
11867  # Check if we need to convert this using DOS-style short mode. If the path
11868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11869  # take no chances and rewrite it.
11870  # Note: m4 eats our [], so we need to use [ and ] instead.
11871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11872  if test "x$has_forbidden_chars" != x; then
11873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11875  fi
11876
11877
11878  windows_path="$new_path"
11879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11880    unix_path=`$CYGPATH -u "$windows_path"`
11881    new_path="$unix_path"
11882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11884    new_path="$unix_path"
11885  fi
11886
11887  if test "x$path" != "x$new_path"; then
11888    BOOT_JDK="$new_path"
11889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11891  fi
11892
11893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11895
11896  else
11897    # We're on a posix platform. Hooray! :)
11898    path="$BOOT_JDK"
11899
11900    if test ! -f "$path" && test ! -d "$path"; then
11901      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11902    fi
11903
11904    has_space=`$ECHO "$path" | $GREP " "`
11905    if test "x$has_space" != x; then
11906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11908      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11909    fi
11910  fi
11911
11912              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11913$as_echo_n "checking for Boot JDK... " >&6; }
11914              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11915$as_echo "$BOOT_JDK" >&6; }
11916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11917$as_echo_n "checking Boot JDK version... " >&6; }
11918              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11919              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11920$as_echo "$BOOT_JDK_VERSION" >&6; }
11921            fi # end check jdk version
11922          fi # end check rt.jar
11923        fi # end check javac
11924      fi # end check java
11925    fi # end check boot jdk found
11926  fi
11927
11928
11929# Test: Is there a JDK installed in default, well-known locations?
11930
11931  if test "x$BOOT_JDK_FOUND" = xno; then
11932    # Now execute the test
11933
11934  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11935
11936  if test "x$BOOT_JDK_FOUND" = xno; then
11937    # Now execute the test
11938
11939  if test "x$ProgramW6432" != x; then
11940    VIRTUAL_DIR="$ProgramW6432/Java"
11941
11942  windows_path="$VIRTUAL_DIR"
11943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11944    unix_path=`$CYGPATH -u "$windows_path"`
11945    VIRTUAL_DIR="$unix_path"
11946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11948    VIRTUAL_DIR="$unix_path"
11949  fi
11950
11951
11952  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11953  BOOT_JDK_SUFFIX=""
11954  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11955  if test "x$ALL_JDKS_FOUND" != x; then
11956    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11957
11958  if test "x$BOOT_JDK_FOUND" = xno; then
11959    # Now execute the test
11960
11961        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11962        if test -d "$BOOT_JDK"; then
11963          BOOT_JDK_FOUND=maybe
11964          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11965$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11966        fi
11967
11968
11969    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11970    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11971      # Do we have a bin/java?
11972      if test ! -x "$BOOT_JDK/bin/java"; then
11973        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11975        BOOT_JDK_FOUND=no
11976      else
11977        # Do we have a bin/javac?
11978        if test ! -x "$BOOT_JDK/bin/javac"; then
11979          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11981          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11982$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11983          BOOT_JDK_FOUND=no
11984        else
11985          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11986          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11989            BOOT_JDK_FOUND=no
11990          else
11991            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11992            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11993
11994            # Extra M4 quote needed to protect [] in grep expression.
11995            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11996            if test "x$FOUND_VERSION_78" = x; then
11997              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11999              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12000$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12001              BOOT_JDK_FOUND=no
12002            else
12003              # We're done! :-)
12004              BOOT_JDK_FOUND=yes
12005
12006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12007
12008  # Input might be given as Windows format, start by converting to
12009  # unix format.
12010  path="$BOOT_JDK"
12011  new_path=`$CYGPATH -u "$path"`
12012
12013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12016  # "foo.exe" is OK but "foo" is an error.
12017  #
12018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12019  # It is also a way to make sure we got the proper file name for the real test later on.
12020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12021  if test "x$test_shortpath" = x; then
12022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12024    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12025  fi
12026
12027  # Call helper function which possibly converts this using DOS-style short mode.
12028  # If so, the updated path is stored in $new_path.
12029
12030  input_path="$new_path"
12031  # Check if we need to convert this using DOS-style short mode. If the path
12032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12033  # take no chances and rewrite it.
12034  # Note: m4 eats our [], so we need to use [ and ] instead.
12035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12036  if test "x$has_forbidden_chars" != x; then
12037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12041      # Going to short mode and back again did indeed matter. Since short mode is
12042      # case insensitive, let's make it lowercase to improve readability.
12043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12044      # Now convert it back to Unix-stile (cygpath)
12045      input_path=`$CYGPATH -u "$shortmode_path"`
12046      new_path="$input_path"
12047    fi
12048  fi
12049
12050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12051  if test "x$test_cygdrive_prefix" = x; then
12052    # As a simple fix, exclude /usr/bin since it's not a real path.
12053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12055      # a path prefixed by /cygdrive for fixpath to work.
12056      new_path="$CYGWIN_ROOT_PATH$input_path"
12057    fi
12058  fi
12059
12060
12061  if test "x$path" != "x$new_path"; then
12062    BOOT_JDK="$new_path"
12063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12064$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12065  fi
12066
12067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12068
12069  path="$BOOT_JDK"
12070  has_colon=`$ECHO $path | $GREP ^.:`
12071  new_path="$path"
12072  if test "x$has_colon" = x; then
12073    # Not in mixed or Windows style, start by that.
12074    new_path=`cmd //c echo $path`
12075  fi
12076
12077
12078  input_path="$new_path"
12079  # Check if we need to convert this using DOS-style short mode. If the path
12080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12081  # take no chances and rewrite it.
12082  # Note: m4 eats our [], so we need to use [ and ] instead.
12083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12084  if test "x$has_forbidden_chars" != x; then
12085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12087  fi
12088
12089
12090  windows_path="$new_path"
12091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12092    unix_path=`$CYGPATH -u "$windows_path"`
12093    new_path="$unix_path"
12094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12096    new_path="$unix_path"
12097  fi
12098
12099  if test "x$path" != "x$new_path"; then
12100    BOOT_JDK="$new_path"
12101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12102$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12103  fi
12104
12105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12107
12108  else
12109    # We're on a posix platform. Hooray! :)
12110    path="$BOOT_JDK"
12111
12112    if test ! -f "$path" && test ! -d "$path"; then
12113      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12114    fi
12115
12116    has_space=`$ECHO "$path" | $GREP " "`
12117    if test "x$has_space" != x; then
12118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12121    fi
12122  fi
12123
12124              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12125$as_echo_n "checking for Boot JDK... " >&6; }
12126              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12127$as_echo "$BOOT_JDK" >&6; }
12128              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12129$as_echo_n "checking Boot JDK version... " >&6; }
12130              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12131              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12132$as_echo "$BOOT_JDK_VERSION" >&6; }
12133            fi # end check jdk version
12134          fi # end check rt.jar
12135        fi # end check javac
12136      fi # end check java
12137    fi # end check boot jdk found
12138  fi
12139
12140    done
12141  fi
12142
12143  fi
12144
12145
12146    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12147    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12148      # Do we have a bin/java?
12149      if test ! -x "$BOOT_JDK/bin/java"; then
12150        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12152        BOOT_JDK_FOUND=no
12153      else
12154        # Do we have a bin/javac?
12155        if test ! -x "$BOOT_JDK/bin/javac"; then
12156          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12158          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12159$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12160          BOOT_JDK_FOUND=no
12161        else
12162          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12163          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12164            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12166            BOOT_JDK_FOUND=no
12167          else
12168            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12170
12171            # Extra M4 quote needed to protect [] in grep expression.
12172            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12173            if test "x$FOUND_VERSION_78" = x; then
12174              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12176              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12177$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12178              BOOT_JDK_FOUND=no
12179            else
12180              # We're done! :-)
12181              BOOT_JDK_FOUND=yes
12182
12183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12184
12185  # Input might be given as Windows format, start by converting to
12186  # unix format.
12187  path="$BOOT_JDK"
12188  new_path=`$CYGPATH -u "$path"`
12189
12190  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12191  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12192  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12193  # "foo.exe" is OK but "foo" is an error.
12194  #
12195  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12196  # It is also a way to make sure we got the proper file name for the real test later on.
12197  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12198  if test "x$test_shortpath" = x; then
12199    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12200$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12201    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12202  fi
12203
12204  # Call helper function which possibly converts this using DOS-style short mode.
12205  # If so, the updated path is stored in $new_path.
12206
12207  input_path="$new_path"
12208  # Check if we need to convert this using DOS-style short mode. If the path
12209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12210  # take no chances and rewrite it.
12211  # Note: m4 eats our [], so we need to use [ and ] instead.
12212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12213  if test "x$has_forbidden_chars" != x; then
12214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12215    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12216    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12217    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12218      # Going to short mode and back again did indeed matter. Since short mode is
12219      # case insensitive, let's make it lowercase to improve readability.
12220      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12221      # Now convert it back to Unix-stile (cygpath)
12222      input_path=`$CYGPATH -u "$shortmode_path"`
12223      new_path="$input_path"
12224    fi
12225  fi
12226
12227  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12228  if test "x$test_cygdrive_prefix" = x; then
12229    # As a simple fix, exclude /usr/bin since it's not a real path.
12230    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12231      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12232      # a path prefixed by /cygdrive for fixpath to work.
12233      new_path="$CYGWIN_ROOT_PATH$input_path"
12234    fi
12235  fi
12236
12237
12238  if test "x$path" != "x$new_path"; then
12239    BOOT_JDK="$new_path"
12240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12241$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12242  fi
12243
12244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12245
12246  path="$BOOT_JDK"
12247  has_colon=`$ECHO $path | $GREP ^.:`
12248  new_path="$path"
12249  if test "x$has_colon" = x; then
12250    # Not in mixed or Windows style, start by that.
12251    new_path=`cmd //c echo $path`
12252  fi
12253
12254
12255  input_path="$new_path"
12256  # Check if we need to convert this using DOS-style short mode. If the path
12257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12258  # take no chances and rewrite it.
12259  # Note: m4 eats our [], so we need to use [ and ] instead.
12260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12261  if test "x$has_forbidden_chars" != x; then
12262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12263    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12264  fi
12265
12266
12267  windows_path="$new_path"
12268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12269    unix_path=`$CYGPATH -u "$windows_path"`
12270    new_path="$unix_path"
12271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12273    new_path="$unix_path"
12274  fi
12275
12276  if test "x$path" != "x$new_path"; then
12277    BOOT_JDK="$new_path"
12278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12280  fi
12281
12282  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12283  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12284
12285  else
12286    # We're on a posix platform. Hooray! :)
12287    path="$BOOT_JDK"
12288
12289    if test ! -f "$path" && test ! -d "$path"; then
12290      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12291    fi
12292
12293    has_space=`$ECHO "$path" | $GREP " "`
12294    if test "x$has_space" != x; then
12295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12298    fi
12299  fi
12300
12301              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12302$as_echo_n "checking for Boot JDK... " >&6; }
12303              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12304$as_echo "$BOOT_JDK" >&6; }
12305              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12306$as_echo_n "checking Boot JDK version... " >&6; }
12307              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12308              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12309$as_echo "$BOOT_JDK_VERSION" >&6; }
12310            fi # end check jdk version
12311          fi # end check rt.jar
12312        fi # end check javac
12313      fi # end check java
12314    fi # end check boot jdk found
12315  fi
12316
12317
12318  if test "x$BOOT_JDK_FOUND" = xno; then
12319    # Now execute the test
12320
12321  if test "x$PROGRAMW6432" != x; then
12322    VIRTUAL_DIR="$PROGRAMW6432/Java"
12323
12324  windows_path="$VIRTUAL_DIR"
12325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12326    unix_path=`$CYGPATH -u "$windows_path"`
12327    VIRTUAL_DIR="$unix_path"
12328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12330    VIRTUAL_DIR="$unix_path"
12331  fi
12332
12333
12334  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12335  BOOT_JDK_SUFFIX=""
12336  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12337  if test "x$ALL_JDKS_FOUND" != x; then
12338    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12339
12340  if test "x$BOOT_JDK_FOUND" = xno; then
12341    # Now execute the test
12342
12343        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12344        if test -d "$BOOT_JDK"; then
12345          BOOT_JDK_FOUND=maybe
12346          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12347$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12348        fi
12349
12350
12351    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12352    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12353      # Do we have a bin/java?
12354      if test ! -x "$BOOT_JDK/bin/java"; then
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12357        BOOT_JDK_FOUND=no
12358      else
12359        # Do we have a bin/javac?
12360        if test ! -x "$BOOT_JDK/bin/javac"; then
12361          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12363          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12364$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12365          BOOT_JDK_FOUND=no
12366        else
12367          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12368          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12369            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12371            BOOT_JDK_FOUND=no
12372          else
12373            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12374            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12375
12376            # Extra M4 quote needed to protect [] in grep expression.
12377            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12378            if test "x$FOUND_VERSION_78" = x; then
12379              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12381              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12382$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12383              BOOT_JDK_FOUND=no
12384            else
12385              # We're done! :-)
12386              BOOT_JDK_FOUND=yes
12387
12388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12389
12390  # Input might be given as Windows format, start by converting to
12391  # unix format.
12392  path="$BOOT_JDK"
12393  new_path=`$CYGPATH -u "$path"`
12394
12395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12398  # "foo.exe" is OK but "foo" is an error.
12399  #
12400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12401  # It is also a way to make sure we got the proper file name for the real test later on.
12402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12403  if test "x$test_shortpath" = x; then
12404    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12406    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12407  fi
12408
12409  # Call helper function which possibly converts this using DOS-style short mode.
12410  # If so, the updated path is stored in $new_path.
12411
12412  input_path="$new_path"
12413  # Check if we need to convert this using DOS-style short mode. If the path
12414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12415  # take no chances and rewrite it.
12416  # Note: m4 eats our [], so we need to use [ and ] instead.
12417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12418  if test "x$has_forbidden_chars" != x; then
12419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12420    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12421    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12422    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12423      # Going to short mode and back again did indeed matter. Since short mode is
12424      # case insensitive, let's make it lowercase to improve readability.
12425      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12426      # Now convert it back to Unix-stile (cygpath)
12427      input_path=`$CYGPATH -u "$shortmode_path"`
12428      new_path="$input_path"
12429    fi
12430  fi
12431
12432  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12433  if test "x$test_cygdrive_prefix" = x; then
12434    # As a simple fix, exclude /usr/bin since it's not a real path.
12435    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12436      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12437      # a path prefixed by /cygdrive for fixpath to work.
12438      new_path="$CYGWIN_ROOT_PATH$input_path"
12439    fi
12440  fi
12441
12442
12443  if test "x$path" != "x$new_path"; then
12444    BOOT_JDK="$new_path"
12445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12446$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12447  fi
12448
12449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12450
12451  path="$BOOT_JDK"
12452  has_colon=`$ECHO $path | $GREP ^.:`
12453  new_path="$path"
12454  if test "x$has_colon" = x; then
12455    # Not in mixed or Windows style, start by that.
12456    new_path=`cmd //c echo $path`
12457  fi
12458
12459
12460  input_path="$new_path"
12461  # Check if we need to convert this using DOS-style short mode. If the path
12462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12463  # take no chances and rewrite it.
12464  # Note: m4 eats our [], so we need to use [ and ] instead.
12465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12466  if test "x$has_forbidden_chars" != x; then
12467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12468    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12469  fi
12470
12471
12472  windows_path="$new_path"
12473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12474    unix_path=`$CYGPATH -u "$windows_path"`
12475    new_path="$unix_path"
12476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12478    new_path="$unix_path"
12479  fi
12480
12481  if test "x$path" != "x$new_path"; then
12482    BOOT_JDK="$new_path"
12483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12485  fi
12486
12487  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12488  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12489
12490  else
12491    # We're on a posix platform. Hooray! :)
12492    path="$BOOT_JDK"
12493
12494    if test ! -f "$path" && test ! -d "$path"; then
12495      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12496    fi
12497
12498    has_space=`$ECHO "$path" | $GREP " "`
12499    if test "x$has_space" != x; then
12500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12502      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12503    fi
12504  fi
12505
12506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12507$as_echo_n "checking for Boot JDK... " >&6; }
12508              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12509$as_echo "$BOOT_JDK" >&6; }
12510              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12511$as_echo_n "checking Boot JDK version... " >&6; }
12512              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12513              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12514$as_echo "$BOOT_JDK_VERSION" >&6; }
12515            fi # end check jdk version
12516          fi # end check rt.jar
12517        fi # end check javac
12518      fi # end check java
12519    fi # end check boot jdk found
12520  fi
12521
12522    done
12523  fi
12524
12525  fi
12526
12527
12528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12530      # Do we have a bin/java?
12531      if test ! -x "$BOOT_JDK/bin/java"; then
12532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12534        BOOT_JDK_FOUND=no
12535      else
12536        # Do we have a bin/javac?
12537        if test ! -x "$BOOT_JDK/bin/javac"; then
12538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12542          BOOT_JDK_FOUND=no
12543        else
12544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12548            BOOT_JDK_FOUND=no
12549          else
12550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12552
12553            # Extra M4 quote needed to protect [] in grep expression.
12554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12555            if test "x$FOUND_VERSION_78" = x; then
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12560              BOOT_JDK_FOUND=no
12561            else
12562              # We're done! :-)
12563              BOOT_JDK_FOUND=yes
12564
12565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12566
12567  # Input might be given as Windows format, start by converting to
12568  # unix format.
12569  path="$BOOT_JDK"
12570  new_path=`$CYGPATH -u "$path"`
12571
12572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12575  # "foo.exe" is OK but "foo" is an error.
12576  #
12577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12578  # It is also a way to make sure we got the proper file name for the real test later on.
12579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12580  if test "x$test_shortpath" = x; then
12581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12584  fi
12585
12586  # Call helper function which possibly converts this using DOS-style short mode.
12587  # If so, the updated path is stored in $new_path.
12588
12589  input_path="$new_path"
12590  # Check if we need to convert this using DOS-style short mode. If the path
12591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12592  # take no chances and rewrite it.
12593  # Note: m4 eats our [], so we need to use [ and ] instead.
12594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12595  if test "x$has_forbidden_chars" != x; then
12596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12600      # Going to short mode and back again did indeed matter. Since short mode is
12601      # case insensitive, let's make it lowercase to improve readability.
12602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12603      # Now convert it back to Unix-stile (cygpath)
12604      input_path=`$CYGPATH -u "$shortmode_path"`
12605      new_path="$input_path"
12606    fi
12607  fi
12608
12609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12610  if test "x$test_cygdrive_prefix" = x; then
12611    # As a simple fix, exclude /usr/bin since it's not a real path.
12612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12614      # a path prefixed by /cygdrive for fixpath to work.
12615      new_path="$CYGWIN_ROOT_PATH$input_path"
12616    fi
12617  fi
12618
12619
12620  if test "x$path" != "x$new_path"; then
12621    BOOT_JDK="$new_path"
12622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12624  fi
12625
12626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12627
12628  path="$BOOT_JDK"
12629  has_colon=`$ECHO $path | $GREP ^.:`
12630  new_path="$path"
12631  if test "x$has_colon" = x; then
12632    # Not in mixed or Windows style, start by that.
12633    new_path=`cmd //c echo $path`
12634  fi
12635
12636
12637  input_path="$new_path"
12638  # Check if we need to convert this using DOS-style short mode. If the path
12639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12640  # take no chances and rewrite it.
12641  # Note: m4 eats our [], so we need to use [ and ] instead.
12642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12643  if test "x$has_forbidden_chars" != x; then
12644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12646  fi
12647
12648
12649  windows_path="$new_path"
12650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12651    unix_path=`$CYGPATH -u "$windows_path"`
12652    new_path="$unix_path"
12653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12655    new_path="$unix_path"
12656  fi
12657
12658  if test "x$path" != "x$new_path"; then
12659    BOOT_JDK="$new_path"
12660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12662  fi
12663
12664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12666
12667  else
12668    # We're on a posix platform. Hooray! :)
12669    path="$BOOT_JDK"
12670
12671    if test ! -f "$path" && test ! -d "$path"; then
12672      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12673    fi
12674
12675    has_space=`$ECHO "$path" | $GREP " "`
12676    if test "x$has_space" != x; then
12677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12679      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12680    fi
12681  fi
12682
12683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12684$as_echo_n "checking for Boot JDK... " >&6; }
12685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12686$as_echo "$BOOT_JDK" >&6; }
12687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12688$as_echo_n "checking Boot JDK version... " >&6; }
12689              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12691$as_echo "$BOOT_JDK_VERSION" >&6; }
12692            fi # end check jdk version
12693          fi # end check rt.jar
12694        fi # end check javac
12695      fi # end check java
12696    fi # end check boot jdk found
12697  fi
12698
12699
12700  if test "x$BOOT_JDK_FOUND" = xno; then
12701    # Now execute the test
12702
12703  if test "x$PROGRAMFILES" != x; then
12704    VIRTUAL_DIR="$PROGRAMFILES/Java"
12705
12706  windows_path="$VIRTUAL_DIR"
12707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12708    unix_path=`$CYGPATH -u "$windows_path"`
12709    VIRTUAL_DIR="$unix_path"
12710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12712    VIRTUAL_DIR="$unix_path"
12713  fi
12714
12715
12716  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12717  BOOT_JDK_SUFFIX=""
12718  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12719  if test "x$ALL_JDKS_FOUND" != x; then
12720    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12721
12722  if test "x$BOOT_JDK_FOUND" = xno; then
12723    # Now execute the test
12724
12725        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12726        if test -d "$BOOT_JDK"; then
12727          BOOT_JDK_FOUND=maybe
12728          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12729$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12730        fi
12731
12732
12733    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12734    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12735      # Do we have a bin/java?
12736      if test ! -x "$BOOT_JDK/bin/java"; then
12737        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12739        BOOT_JDK_FOUND=no
12740      else
12741        # Do we have a bin/javac?
12742        if test ! -x "$BOOT_JDK/bin/javac"; then
12743          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12746$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12747          BOOT_JDK_FOUND=no
12748        else
12749          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12750          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12753            BOOT_JDK_FOUND=no
12754          else
12755            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12757
12758            # Extra M4 quote needed to protect [] in grep expression.
12759            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12760            if test "x$FOUND_VERSION_78" = x; then
12761              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12763              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12764$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12765              BOOT_JDK_FOUND=no
12766            else
12767              # We're done! :-)
12768              BOOT_JDK_FOUND=yes
12769
12770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12771
12772  # Input might be given as Windows format, start by converting to
12773  # unix format.
12774  path="$BOOT_JDK"
12775  new_path=`$CYGPATH -u "$path"`
12776
12777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12780  # "foo.exe" is OK but "foo" is an error.
12781  #
12782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12783  # It is also a way to make sure we got the proper file name for the real test later on.
12784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12785  if test "x$test_shortpath" = x; then
12786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12787$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12788    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12789  fi
12790
12791  # Call helper function which possibly converts this using DOS-style short mode.
12792  # If so, the updated path is stored in $new_path.
12793
12794  input_path="$new_path"
12795  # Check if we need to convert this using DOS-style short mode. If the path
12796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12797  # take no chances and rewrite it.
12798  # Note: m4 eats our [], so we need to use [ and ] instead.
12799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12800  if test "x$has_forbidden_chars" != x; then
12801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12805      # Going to short mode and back again did indeed matter. Since short mode is
12806      # case insensitive, let's make it lowercase to improve readability.
12807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12808      # Now convert it back to Unix-stile (cygpath)
12809      input_path=`$CYGPATH -u "$shortmode_path"`
12810      new_path="$input_path"
12811    fi
12812  fi
12813
12814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12815  if test "x$test_cygdrive_prefix" = x; then
12816    # As a simple fix, exclude /usr/bin since it's not a real path.
12817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12819      # a path prefixed by /cygdrive for fixpath to work.
12820      new_path="$CYGWIN_ROOT_PATH$input_path"
12821    fi
12822  fi
12823
12824
12825  if test "x$path" != "x$new_path"; then
12826    BOOT_JDK="$new_path"
12827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12828$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12829  fi
12830
12831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12832
12833  path="$BOOT_JDK"
12834  has_colon=`$ECHO $path | $GREP ^.:`
12835  new_path="$path"
12836  if test "x$has_colon" = x; then
12837    # Not in mixed or Windows style, start by that.
12838    new_path=`cmd //c echo $path`
12839  fi
12840
12841
12842  input_path="$new_path"
12843  # Check if we need to convert this using DOS-style short mode. If the path
12844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12845  # take no chances and rewrite it.
12846  # Note: m4 eats our [], so we need to use [ and ] instead.
12847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12848  if test "x$has_forbidden_chars" != x; then
12849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12851  fi
12852
12853
12854  windows_path="$new_path"
12855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12856    unix_path=`$CYGPATH -u "$windows_path"`
12857    new_path="$unix_path"
12858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12860    new_path="$unix_path"
12861  fi
12862
12863  if test "x$path" != "x$new_path"; then
12864    BOOT_JDK="$new_path"
12865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12867  fi
12868
12869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12871
12872  else
12873    # We're on a posix platform. Hooray! :)
12874    path="$BOOT_JDK"
12875
12876    if test ! -f "$path" && test ! -d "$path"; then
12877      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12878    fi
12879
12880    has_space=`$ECHO "$path" | $GREP " "`
12881    if test "x$has_space" != x; then
12882      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12884      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12885    fi
12886  fi
12887
12888              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12889$as_echo_n "checking for Boot JDK... " >&6; }
12890              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12891$as_echo "$BOOT_JDK" >&6; }
12892              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12893$as_echo_n "checking Boot JDK version... " >&6; }
12894              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12895              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12896$as_echo "$BOOT_JDK_VERSION" >&6; }
12897            fi # end check jdk version
12898          fi # end check rt.jar
12899        fi # end check javac
12900      fi # end check java
12901    fi # end check boot jdk found
12902  fi
12903
12904    done
12905  fi
12906
12907  fi
12908
12909
12910    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12911    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12912      # Do we have a bin/java?
12913      if test ! -x "$BOOT_JDK/bin/java"; then
12914        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12916        BOOT_JDK_FOUND=no
12917      else
12918        # Do we have a bin/javac?
12919        if test ! -x "$BOOT_JDK/bin/javac"; then
12920          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12921$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12922          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12923$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12924          BOOT_JDK_FOUND=no
12925        else
12926          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12927          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12928            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12930            BOOT_JDK_FOUND=no
12931          else
12932            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12934
12935            # Extra M4 quote needed to protect [] in grep expression.
12936            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12937            if test "x$FOUND_VERSION_78" = x; then
12938              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12939$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12940              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12941$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12942              BOOT_JDK_FOUND=no
12943            else
12944              # We're done! :-)
12945              BOOT_JDK_FOUND=yes
12946
12947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12948
12949  # Input might be given as Windows format, start by converting to
12950  # unix format.
12951  path="$BOOT_JDK"
12952  new_path=`$CYGPATH -u "$path"`
12953
12954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12957  # "foo.exe" is OK but "foo" is an error.
12958  #
12959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12960  # It is also a way to make sure we got the proper file name for the real test later on.
12961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12962  if test "x$test_shortpath" = x; then
12963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12964$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12965    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12966  fi
12967
12968  # Call helper function which possibly converts this using DOS-style short mode.
12969  # If so, the updated path is stored in $new_path.
12970
12971  input_path="$new_path"
12972  # Check if we need to convert this using DOS-style short mode. If the path
12973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12974  # take no chances and rewrite it.
12975  # Note: m4 eats our [], so we need to use [ and ] instead.
12976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12977  if test "x$has_forbidden_chars" != x; then
12978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12982      # Going to short mode and back again did indeed matter. Since short mode is
12983      # case insensitive, let's make it lowercase to improve readability.
12984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12985      # Now convert it back to Unix-stile (cygpath)
12986      input_path=`$CYGPATH -u "$shortmode_path"`
12987      new_path="$input_path"
12988    fi
12989  fi
12990
12991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12992  if test "x$test_cygdrive_prefix" = x; then
12993    # As a simple fix, exclude /usr/bin since it's not a real path.
12994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12996      # a path prefixed by /cygdrive for fixpath to work.
12997      new_path="$CYGWIN_ROOT_PATH$input_path"
12998    fi
12999  fi
13000
13001
13002  if test "x$path" != "x$new_path"; then
13003    BOOT_JDK="$new_path"
13004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13005$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13006  fi
13007
13008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13009
13010  path="$BOOT_JDK"
13011  has_colon=`$ECHO $path | $GREP ^.:`
13012  new_path="$path"
13013  if test "x$has_colon" = x; then
13014    # Not in mixed or Windows style, start by that.
13015    new_path=`cmd //c echo $path`
13016  fi
13017
13018
13019  input_path="$new_path"
13020  # Check if we need to convert this using DOS-style short mode. If the path
13021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13022  # take no chances and rewrite it.
13023  # Note: m4 eats our [], so we need to use [ and ] instead.
13024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13025  if test "x$has_forbidden_chars" != x; then
13026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13028  fi
13029
13030
13031  windows_path="$new_path"
13032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13033    unix_path=`$CYGPATH -u "$windows_path"`
13034    new_path="$unix_path"
13035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13037    new_path="$unix_path"
13038  fi
13039
13040  if test "x$path" != "x$new_path"; then
13041    BOOT_JDK="$new_path"
13042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13044  fi
13045
13046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13048
13049  else
13050    # We're on a posix platform. Hooray! :)
13051    path="$BOOT_JDK"
13052
13053    if test ! -f "$path" && test ! -d "$path"; then
13054      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13055    fi
13056
13057    has_space=`$ECHO "$path" | $GREP " "`
13058    if test "x$has_space" != x; then
13059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13061      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13062    fi
13063  fi
13064
13065              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13066$as_echo_n "checking for Boot JDK... " >&6; }
13067              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13068$as_echo "$BOOT_JDK" >&6; }
13069              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13070$as_echo_n "checking Boot JDK version... " >&6; }
13071              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13072              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13073$as_echo "$BOOT_JDK_VERSION" >&6; }
13074            fi # end check jdk version
13075          fi # end check rt.jar
13076        fi # end check javac
13077      fi # end check java
13078    fi # end check boot jdk found
13079  fi
13080
13081
13082  if test "x$BOOT_JDK_FOUND" = xno; then
13083    # Now execute the test
13084
13085  if test "x$ProgramFiles" != x; then
13086    VIRTUAL_DIR="$ProgramFiles/Java"
13087
13088  windows_path="$VIRTUAL_DIR"
13089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13090    unix_path=`$CYGPATH -u "$windows_path"`
13091    VIRTUAL_DIR="$unix_path"
13092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13094    VIRTUAL_DIR="$unix_path"
13095  fi
13096
13097
13098  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13099  BOOT_JDK_SUFFIX=""
13100  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13101  if test "x$ALL_JDKS_FOUND" != x; then
13102    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13103
13104  if test "x$BOOT_JDK_FOUND" = xno; then
13105    # Now execute the test
13106
13107        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13108        if test -d "$BOOT_JDK"; then
13109          BOOT_JDK_FOUND=maybe
13110          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13111$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13112        fi
13113
13114
13115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13117      # Do we have a bin/java?
13118      if test ! -x "$BOOT_JDK/bin/java"; then
13119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13121        BOOT_JDK_FOUND=no
13122      else
13123        # Do we have a bin/javac?
13124        if test ! -x "$BOOT_JDK/bin/javac"; then
13125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13129          BOOT_JDK_FOUND=no
13130        else
13131          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13132          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13133            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13135            BOOT_JDK_FOUND=no
13136          else
13137            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13138            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13139
13140            # Extra M4 quote needed to protect [] in grep expression.
13141            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13142            if test "x$FOUND_VERSION_78" = x; then
13143              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13145              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13146$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13147              BOOT_JDK_FOUND=no
13148            else
13149              # We're done! :-)
13150              BOOT_JDK_FOUND=yes
13151
13152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13153
13154  # Input might be given as Windows format, start by converting to
13155  # unix format.
13156  path="$BOOT_JDK"
13157  new_path=`$CYGPATH -u "$path"`
13158
13159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13162  # "foo.exe" is OK but "foo" is an error.
13163  #
13164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13165  # It is also a way to make sure we got the proper file name for the real test later on.
13166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13167  if test "x$test_shortpath" = x; then
13168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13171  fi
13172
13173  # Call helper function which possibly converts this using DOS-style short mode.
13174  # If so, the updated path is stored in $new_path.
13175
13176  input_path="$new_path"
13177  # Check if we need to convert this using DOS-style short mode. If the path
13178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13179  # take no chances and rewrite it.
13180  # Note: m4 eats our [], so we need to use [ and ] instead.
13181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13182  if test "x$has_forbidden_chars" != x; then
13183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13187      # Going to short mode and back again did indeed matter. Since short mode is
13188      # case insensitive, let's make it lowercase to improve readability.
13189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13190      # Now convert it back to Unix-stile (cygpath)
13191      input_path=`$CYGPATH -u "$shortmode_path"`
13192      new_path="$input_path"
13193    fi
13194  fi
13195
13196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13197  if test "x$test_cygdrive_prefix" = x; then
13198    # As a simple fix, exclude /usr/bin since it's not a real path.
13199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13201      # a path prefixed by /cygdrive for fixpath to work.
13202      new_path="$CYGWIN_ROOT_PATH$input_path"
13203    fi
13204  fi
13205
13206
13207  if test "x$path" != "x$new_path"; then
13208    BOOT_JDK="$new_path"
13209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13211  fi
13212
13213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13214
13215  path="$BOOT_JDK"
13216  has_colon=`$ECHO $path | $GREP ^.:`
13217  new_path="$path"
13218  if test "x$has_colon" = x; then
13219    # Not in mixed or Windows style, start by that.
13220    new_path=`cmd //c echo $path`
13221  fi
13222
13223
13224  input_path="$new_path"
13225  # Check if we need to convert this using DOS-style short mode. If the path
13226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13227  # take no chances and rewrite it.
13228  # Note: m4 eats our [], so we need to use [ and ] instead.
13229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13230  if test "x$has_forbidden_chars" != x; then
13231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13233  fi
13234
13235
13236  windows_path="$new_path"
13237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13238    unix_path=`$CYGPATH -u "$windows_path"`
13239    new_path="$unix_path"
13240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13242    new_path="$unix_path"
13243  fi
13244
13245  if test "x$path" != "x$new_path"; then
13246    BOOT_JDK="$new_path"
13247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13249  fi
13250
13251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13253
13254  else
13255    # We're on a posix platform. Hooray! :)
13256    path="$BOOT_JDK"
13257
13258    if test ! -f "$path" && test ! -d "$path"; then
13259      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13260    fi
13261
13262    has_space=`$ECHO "$path" | $GREP " "`
13263    if test "x$has_space" != x; then
13264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13266      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13267    fi
13268  fi
13269
13270              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13271$as_echo_n "checking for Boot JDK... " >&6; }
13272              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13273$as_echo "$BOOT_JDK" >&6; }
13274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13275$as_echo_n "checking Boot JDK version... " >&6; }
13276              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13277              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13278$as_echo "$BOOT_JDK_VERSION" >&6; }
13279            fi # end check jdk version
13280          fi # end check rt.jar
13281        fi # end check javac
13282      fi # end check java
13283    fi # end check boot jdk found
13284  fi
13285
13286    done
13287  fi
13288
13289  fi
13290
13291
13292    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13293    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13294      # Do we have a bin/java?
13295      if test ! -x "$BOOT_JDK/bin/java"; then
13296        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13298        BOOT_JDK_FOUND=no
13299      else
13300        # Do we have a bin/javac?
13301        if test ! -x "$BOOT_JDK/bin/javac"; then
13302          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13304          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13305$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13306          BOOT_JDK_FOUND=no
13307        else
13308          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13309          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13312            BOOT_JDK_FOUND=no
13313          else
13314            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13315            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13316
13317            # Extra M4 quote needed to protect [] in grep expression.
13318            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13319            if test "x$FOUND_VERSION_78" = x; then
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13321$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13322              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13323$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13324              BOOT_JDK_FOUND=no
13325            else
13326              # We're done! :-)
13327              BOOT_JDK_FOUND=yes
13328
13329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13330
13331  # Input might be given as Windows format, start by converting to
13332  # unix format.
13333  path="$BOOT_JDK"
13334  new_path=`$CYGPATH -u "$path"`
13335
13336  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13337  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13338  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13339  # "foo.exe" is OK but "foo" is an error.
13340  #
13341  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13342  # It is also a way to make sure we got the proper file name for the real test later on.
13343  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13344  if test "x$test_shortpath" = x; then
13345    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13347    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13348  fi
13349
13350  # Call helper function which possibly converts this using DOS-style short mode.
13351  # If so, the updated path is stored in $new_path.
13352
13353  input_path="$new_path"
13354  # Check if we need to convert this using DOS-style short mode. If the path
13355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13356  # take no chances and rewrite it.
13357  # Note: m4 eats our [], so we need to use [ and ] instead.
13358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13359  if test "x$has_forbidden_chars" != x; then
13360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13361    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13362    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13363    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13364      # Going to short mode and back again did indeed matter. Since short mode is
13365      # case insensitive, let's make it lowercase to improve readability.
13366      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13367      # Now convert it back to Unix-stile (cygpath)
13368      input_path=`$CYGPATH -u "$shortmode_path"`
13369      new_path="$input_path"
13370    fi
13371  fi
13372
13373  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13374  if test "x$test_cygdrive_prefix" = x; then
13375    # As a simple fix, exclude /usr/bin since it's not a real path.
13376    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13377      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13378      # a path prefixed by /cygdrive for fixpath to work.
13379      new_path="$CYGWIN_ROOT_PATH$input_path"
13380    fi
13381  fi
13382
13383
13384  if test "x$path" != "x$new_path"; then
13385    BOOT_JDK="$new_path"
13386    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13387$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13388  fi
13389
13390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13391
13392  path="$BOOT_JDK"
13393  has_colon=`$ECHO $path | $GREP ^.:`
13394  new_path="$path"
13395  if test "x$has_colon" = x; then
13396    # Not in mixed or Windows style, start by that.
13397    new_path=`cmd //c echo $path`
13398  fi
13399
13400
13401  input_path="$new_path"
13402  # Check if we need to convert this using DOS-style short mode. If the path
13403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13404  # take no chances and rewrite it.
13405  # Note: m4 eats our [], so we need to use [ and ] instead.
13406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13407  if test "x$has_forbidden_chars" != x; then
13408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13410  fi
13411
13412
13413  windows_path="$new_path"
13414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13415    unix_path=`$CYGPATH -u "$windows_path"`
13416    new_path="$unix_path"
13417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13419    new_path="$unix_path"
13420  fi
13421
13422  if test "x$path" != "x$new_path"; then
13423    BOOT_JDK="$new_path"
13424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13426  fi
13427
13428  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13429  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13430
13431  else
13432    # We're on a posix platform. Hooray! :)
13433    path="$BOOT_JDK"
13434
13435    if test ! -f "$path" && test ! -d "$path"; then
13436      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13437    fi
13438
13439    has_space=`$ECHO "$path" | $GREP " "`
13440    if test "x$has_space" != x; then
13441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13443      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13444    fi
13445  fi
13446
13447              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13448$as_echo_n "checking for Boot JDK... " >&6; }
13449              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13450$as_echo "$BOOT_JDK" >&6; }
13451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13452$as_echo_n "checking Boot JDK version... " >&6; }
13453              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13454              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13455$as_echo "$BOOT_JDK_VERSION" >&6; }
13456            fi # end check jdk version
13457          fi # end check rt.jar
13458        fi # end check javac
13459      fi # end check java
13460    fi # end check boot jdk found
13461  fi
13462
13463
13464  if test "x$BOOT_JDK_FOUND" = xno; then
13465    # Now execute the test
13466
13467  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13468  BOOT_JDK_SUFFIX=""
13469  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13470  if test "x$ALL_JDKS_FOUND" != x; then
13471    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13472
13473  if test "x$BOOT_JDK_FOUND" = xno; then
13474    # Now execute the test
13475
13476        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13477        if test -d "$BOOT_JDK"; then
13478          BOOT_JDK_FOUND=maybe
13479          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13480$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13481        fi
13482
13483
13484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13486      # Do we have a bin/java?
13487      if test ! -x "$BOOT_JDK/bin/java"; then
13488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13490        BOOT_JDK_FOUND=no
13491      else
13492        # Do we have a bin/javac?
13493        if test ! -x "$BOOT_JDK/bin/javac"; then
13494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13498          BOOT_JDK_FOUND=no
13499        else
13500          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13501          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13502            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13504            BOOT_JDK_FOUND=no
13505          else
13506            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13507            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13508
13509            # Extra M4 quote needed to protect [] in grep expression.
13510            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13511            if test "x$FOUND_VERSION_78" = x; then
13512              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13514              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13515$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13516              BOOT_JDK_FOUND=no
13517            else
13518              # We're done! :-)
13519              BOOT_JDK_FOUND=yes
13520
13521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13522
13523  # Input might be given as Windows format, start by converting to
13524  # unix format.
13525  path="$BOOT_JDK"
13526  new_path=`$CYGPATH -u "$path"`
13527
13528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13531  # "foo.exe" is OK but "foo" is an error.
13532  #
13533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13534  # It is also a way to make sure we got the proper file name for the real test later on.
13535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13536  if test "x$test_shortpath" = x; then
13537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13538$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13539    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13540  fi
13541
13542  # Call helper function which possibly converts this using DOS-style short mode.
13543  # If so, the updated path is stored in $new_path.
13544
13545  input_path="$new_path"
13546  # Check if we need to convert this using DOS-style short mode. If the path
13547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13548  # take no chances and rewrite it.
13549  # Note: m4 eats our [], so we need to use [ and ] instead.
13550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13551  if test "x$has_forbidden_chars" != x; then
13552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13556      # Going to short mode and back again did indeed matter. Since short mode is
13557      # case insensitive, let's make it lowercase to improve readability.
13558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13559      # Now convert it back to Unix-stile (cygpath)
13560      input_path=`$CYGPATH -u "$shortmode_path"`
13561      new_path="$input_path"
13562    fi
13563  fi
13564
13565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13566  if test "x$test_cygdrive_prefix" = x; then
13567    # As a simple fix, exclude /usr/bin since it's not a real path.
13568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13570      # a path prefixed by /cygdrive for fixpath to work.
13571      new_path="$CYGWIN_ROOT_PATH$input_path"
13572    fi
13573  fi
13574
13575
13576  if test "x$path" != "x$new_path"; then
13577    BOOT_JDK="$new_path"
13578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13580  fi
13581
13582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13583
13584  path="$BOOT_JDK"
13585  has_colon=`$ECHO $path | $GREP ^.:`
13586  new_path="$path"
13587  if test "x$has_colon" = x; then
13588    # Not in mixed or Windows style, start by that.
13589    new_path=`cmd //c echo $path`
13590  fi
13591
13592
13593  input_path="$new_path"
13594  # Check if we need to convert this using DOS-style short mode. If the path
13595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13596  # take no chances and rewrite it.
13597  # Note: m4 eats our [], so we need to use [ and ] instead.
13598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13599  if test "x$has_forbidden_chars" != x; then
13600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13602  fi
13603
13604
13605  windows_path="$new_path"
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607    unix_path=`$CYGPATH -u "$windows_path"`
13608    new_path="$unix_path"
13609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13611    new_path="$unix_path"
13612  fi
13613
13614  if test "x$path" != "x$new_path"; then
13615    BOOT_JDK="$new_path"
13616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13617$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13618  fi
13619
13620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13622
13623  else
13624    # We're on a posix platform. Hooray! :)
13625    path="$BOOT_JDK"
13626
13627    if test ! -f "$path" && test ! -d "$path"; then
13628      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13629    fi
13630
13631    has_space=`$ECHO "$path" | $GREP " "`
13632    if test "x$has_space" != x; then
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13634$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13636    fi
13637  fi
13638
13639              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13640$as_echo_n "checking for Boot JDK... " >&6; }
13641              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13642$as_echo "$BOOT_JDK" >&6; }
13643              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13644$as_echo_n "checking Boot JDK version... " >&6; }
13645              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13647$as_echo "$BOOT_JDK_VERSION" >&6; }
13648            fi # end check jdk version
13649          fi # end check rt.jar
13650        fi # end check javac
13651      fi # end check java
13652    fi # end check boot jdk found
13653  fi
13654
13655    done
13656  fi
13657
13658
13659    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13660    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13661      # Do we have a bin/java?
13662      if test ! -x "$BOOT_JDK/bin/java"; then
13663        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13665        BOOT_JDK_FOUND=no
13666      else
13667        # Do we have a bin/javac?
13668        if test ! -x "$BOOT_JDK/bin/javac"; then
13669          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13671          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13672$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13673          BOOT_JDK_FOUND=no
13674        else
13675          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13676          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13677            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13679            BOOT_JDK_FOUND=no
13680          else
13681            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13682            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13683
13684            # Extra M4 quote needed to protect [] in grep expression.
13685            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13686            if test "x$FOUND_VERSION_78" = x; then
13687              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13689              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13690$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13691              BOOT_JDK_FOUND=no
13692            else
13693              # We're done! :-)
13694              BOOT_JDK_FOUND=yes
13695
13696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13697
13698  # Input might be given as Windows format, start by converting to
13699  # unix format.
13700  path="$BOOT_JDK"
13701  new_path=`$CYGPATH -u "$path"`
13702
13703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13706  # "foo.exe" is OK but "foo" is an error.
13707  #
13708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13709  # It is also a way to make sure we got the proper file name for the real test later on.
13710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13711  if test "x$test_shortpath" = x; then
13712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13714    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13715  fi
13716
13717  # Call helper function which possibly converts this using DOS-style short mode.
13718  # If so, the updated path is stored in $new_path.
13719
13720  input_path="$new_path"
13721  # Check if we need to convert this using DOS-style short mode. If the path
13722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13723  # take no chances and rewrite it.
13724  # Note: m4 eats our [], so we need to use [ and ] instead.
13725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13726  if test "x$has_forbidden_chars" != x; then
13727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13731      # Going to short mode and back again did indeed matter. Since short mode is
13732      # case insensitive, let's make it lowercase to improve readability.
13733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13734      # Now convert it back to Unix-stile (cygpath)
13735      input_path=`$CYGPATH -u "$shortmode_path"`
13736      new_path="$input_path"
13737    fi
13738  fi
13739
13740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13741  if test "x$test_cygdrive_prefix" = x; then
13742    # As a simple fix, exclude /usr/bin since it's not a real path.
13743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13745      # a path prefixed by /cygdrive for fixpath to work.
13746      new_path="$CYGWIN_ROOT_PATH$input_path"
13747    fi
13748  fi
13749
13750
13751  if test "x$path" != "x$new_path"; then
13752    BOOT_JDK="$new_path"
13753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13755  fi
13756
13757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13758
13759  path="$BOOT_JDK"
13760  has_colon=`$ECHO $path | $GREP ^.:`
13761  new_path="$path"
13762  if test "x$has_colon" = x; then
13763    # Not in mixed or Windows style, start by that.
13764    new_path=`cmd //c echo $path`
13765  fi
13766
13767
13768  input_path="$new_path"
13769  # Check if we need to convert this using DOS-style short mode. If the path
13770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13771  # take no chances and rewrite it.
13772  # Note: m4 eats our [], so we need to use [ and ] instead.
13773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13774  if test "x$has_forbidden_chars" != x; then
13775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13777  fi
13778
13779
13780  windows_path="$new_path"
13781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13782    unix_path=`$CYGPATH -u "$windows_path"`
13783    new_path="$unix_path"
13784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13786    new_path="$unix_path"
13787  fi
13788
13789  if test "x$path" != "x$new_path"; then
13790    BOOT_JDK="$new_path"
13791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13792$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13793  fi
13794
13795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13797
13798  else
13799    # We're on a posix platform. Hooray! :)
13800    path="$BOOT_JDK"
13801
13802    if test ! -f "$path" && test ! -d "$path"; then
13803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13804    fi
13805
13806    has_space=`$ECHO "$path" | $GREP " "`
13807    if test "x$has_space" != x; then
13808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13810      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13811    fi
13812  fi
13813
13814              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13815$as_echo_n "checking for Boot JDK... " >&6; }
13816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13817$as_echo "$BOOT_JDK" >&6; }
13818              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13819$as_echo_n "checking Boot JDK version... " >&6; }
13820              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13821              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13822$as_echo "$BOOT_JDK_VERSION" >&6; }
13823            fi # end check jdk version
13824          fi # end check rt.jar
13825        fi # end check javac
13826      fi # end check java
13827    fi # end check boot jdk found
13828  fi
13829
13830  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13831
13832  if test "x$BOOT_JDK_FOUND" = xno; then
13833    # Now execute the test
13834
13835  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13836  BOOT_JDK_SUFFIX="/Contents/Home"
13837  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13838  if test "x$ALL_JDKS_FOUND" != x; then
13839    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13840
13841  if test "x$BOOT_JDK_FOUND" = xno; then
13842    # Now execute the test
13843
13844        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13845        if test -d "$BOOT_JDK"; then
13846          BOOT_JDK_FOUND=maybe
13847          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13848$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13849        fi
13850
13851
13852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13854      # Do we have a bin/java?
13855      if test ! -x "$BOOT_JDK/bin/java"; then
13856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13858        BOOT_JDK_FOUND=no
13859      else
13860        # Do we have a bin/javac?
13861        if test ! -x "$BOOT_JDK/bin/javac"; then
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13866          BOOT_JDK_FOUND=no
13867        else
13868          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13869          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13870            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13871$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13872            BOOT_JDK_FOUND=no
13873          else
13874            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13876
13877            # Extra M4 quote needed to protect [] in grep expression.
13878            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13879            if test "x$FOUND_VERSION_78" = x; then
13880              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13882              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13883$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13884              BOOT_JDK_FOUND=no
13885            else
13886              # We're done! :-)
13887              BOOT_JDK_FOUND=yes
13888
13889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13890
13891  # Input might be given as Windows format, start by converting to
13892  # unix format.
13893  path="$BOOT_JDK"
13894  new_path=`$CYGPATH -u "$path"`
13895
13896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13899  # "foo.exe" is OK but "foo" is an error.
13900  #
13901  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13902  # It is also a way to make sure we got the proper file name for the real test later on.
13903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13904  if test "x$test_shortpath" = x; then
13905    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13907    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13908  fi
13909
13910  # Call helper function which possibly converts this using DOS-style short mode.
13911  # If so, the updated path is stored in $new_path.
13912
13913  input_path="$new_path"
13914  # Check if we need to convert this using DOS-style short mode. If the path
13915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13916  # take no chances and rewrite it.
13917  # Note: m4 eats our [], so we need to use [ and ] instead.
13918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13919  if test "x$has_forbidden_chars" != x; then
13920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13921    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13922    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13923    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13924      # Going to short mode and back again did indeed matter. Since short mode is
13925      # case insensitive, let's make it lowercase to improve readability.
13926      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13927      # Now convert it back to Unix-stile (cygpath)
13928      input_path=`$CYGPATH -u "$shortmode_path"`
13929      new_path="$input_path"
13930    fi
13931  fi
13932
13933  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13934  if test "x$test_cygdrive_prefix" = x; then
13935    # As a simple fix, exclude /usr/bin since it's not a real path.
13936    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13937      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13938      # a path prefixed by /cygdrive for fixpath to work.
13939      new_path="$CYGWIN_ROOT_PATH$input_path"
13940    fi
13941  fi
13942
13943
13944  if test "x$path" != "x$new_path"; then
13945    BOOT_JDK="$new_path"
13946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13948  fi
13949
13950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13951
13952  path="$BOOT_JDK"
13953  has_colon=`$ECHO $path | $GREP ^.:`
13954  new_path="$path"
13955  if test "x$has_colon" = x; then
13956    # Not in mixed or Windows style, start by that.
13957    new_path=`cmd //c echo $path`
13958  fi
13959
13960
13961  input_path="$new_path"
13962  # Check if we need to convert this using DOS-style short mode. If the path
13963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13964  # take no chances and rewrite it.
13965  # Note: m4 eats our [], so we need to use [ and ] instead.
13966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13967  if test "x$has_forbidden_chars" != x; then
13968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13969    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13970  fi
13971
13972
13973  windows_path="$new_path"
13974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13975    unix_path=`$CYGPATH -u "$windows_path"`
13976    new_path="$unix_path"
13977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13979    new_path="$unix_path"
13980  fi
13981
13982  if test "x$path" != "x$new_path"; then
13983    BOOT_JDK="$new_path"
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13986  fi
13987
13988  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13989  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13990
13991  else
13992    # We're on a posix platform. Hooray! :)
13993    path="$BOOT_JDK"
13994
13995    if test ! -f "$path" && test ! -d "$path"; then
13996      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13997    fi
13998
13999    has_space=`$ECHO "$path" | $GREP " "`
14000    if test "x$has_space" != x; then
14001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14003      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14004    fi
14005  fi
14006
14007              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14008$as_echo_n "checking for Boot JDK... " >&6; }
14009              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14010$as_echo "$BOOT_JDK" >&6; }
14011              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14012$as_echo_n "checking Boot JDK version... " >&6; }
14013              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14014              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14015$as_echo "$BOOT_JDK_VERSION" >&6; }
14016            fi # end check jdk version
14017          fi # end check rt.jar
14018        fi # end check javac
14019      fi # end check java
14020    fi # end check boot jdk found
14021  fi
14022
14023    done
14024  fi
14025
14026
14027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14029      # Do we have a bin/java?
14030      if test ! -x "$BOOT_JDK/bin/java"; then
14031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14033        BOOT_JDK_FOUND=no
14034      else
14035        # Do we have a bin/javac?
14036        if test ! -x "$BOOT_JDK/bin/javac"; then
14037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14041          BOOT_JDK_FOUND=no
14042        else
14043          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14044          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14045            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14047            BOOT_JDK_FOUND=no
14048          else
14049            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14050            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14051
14052            # Extra M4 quote needed to protect [] in grep expression.
14053            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14054            if test "x$FOUND_VERSION_78" = x; then
14055              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14057              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14058$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14059              BOOT_JDK_FOUND=no
14060            else
14061              # We're done! :-)
14062              BOOT_JDK_FOUND=yes
14063
14064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14065
14066  # Input might be given as Windows format, start by converting to
14067  # unix format.
14068  path="$BOOT_JDK"
14069  new_path=`$CYGPATH -u "$path"`
14070
14071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14074  # "foo.exe" is OK but "foo" is an error.
14075  #
14076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14077  # It is also a way to make sure we got the proper file name for the real test later on.
14078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14079  if test "x$test_shortpath" = x; then
14080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14083  fi
14084
14085  # Call helper function which possibly converts this using DOS-style short mode.
14086  # If so, the updated path is stored in $new_path.
14087
14088  input_path="$new_path"
14089  # Check if we need to convert this using DOS-style short mode. If the path
14090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14091  # take no chances and rewrite it.
14092  # Note: m4 eats our [], so we need to use [ and ] instead.
14093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14094  if test "x$has_forbidden_chars" != x; then
14095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14099      # Going to short mode and back again did indeed matter. Since short mode is
14100      # case insensitive, let's make it lowercase to improve readability.
14101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14102      # Now convert it back to Unix-stile (cygpath)
14103      input_path=`$CYGPATH -u "$shortmode_path"`
14104      new_path="$input_path"
14105    fi
14106  fi
14107
14108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14109  if test "x$test_cygdrive_prefix" = x; then
14110    # As a simple fix, exclude /usr/bin since it's not a real path.
14111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14113      # a path prefixed by /cygdrive for fixpath to work.
14114      new_path="$CYGWIN_ROOT_PATH$input_path"
14115    fi
14116  fi
14117
14118
14119  if test "x$path" != "x$new_path"; then
14120    BOOT_JDK="$new_path"
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14123  fi
14124
14125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14126
14127  path="$BOOT_JDK"
14128  has_colon=`$ECHO $path | $GREP ^.:`
14129  new_path="$path"
14130  if test "x$has_colon" = x; then
14131    # Not in mixed or Windows style, start by that.
14132    new_path=`cmd //c echo $path`
14133  fi
14134
14135
14136  input_path="$new_path"
14137  # Check if we need to convert this using DOS-style short mode. If the path
14138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14139  # take no chances and rewrite it.
14140  # Note: m4 eats our [], so we need to use [ and ] instead.
14141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14142  if test "x$has_forbidden_chars" != x; then
14143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14145  fi
14146
14147
14148  windows_path="$new_path"
14149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150    unix_path=`$CYGPATH -u "$windows_path"`
14151    new_path="$unix_path"
14152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14154    new_path="$unix_path"
14155  fi
14156
14157  if test "x$path" != "x$new_path"; then
14158    BOOT_JDK="$new_path"
14159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14161  fi
14162
14163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14165
14166  else
14167    # We're on a posix platform. Hooray! :)
14168    path="$BOOT_JDK"
14169
14170    if test ! -f "$path" && test ! -d "$path"; then
14171      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14172    fi
14173
14174    has_space=`$ECHO "$path" | $GREP " "`
14175    if test "x$has_space" != x; then
14176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14178      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14179    fi
14180  fi
14181
14182              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14183$as_echo_n "checking for Boot JDK... " >&6; }
14184              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14185$as_echo "$BOOT_JDK" >&6; }
14186              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14187$as_echo_n "checking Boot JDK version... " >&6; }
14188              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14189              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14190$as_echo "$BOOT_JDK_VERSION" >&6; }
14191            fi # end check jdk version
14192          fi # end check rt.jar
14193        fi # end check javac
14194      fi # end check java
14195    fi # end check boot jdk found
14196  fi
14197
14198
14199  if test "x$BOOT_JDK_FOUND" = xno; then
14200    # Now execute the test
14201
14202  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14203  BOOT_JDK_SUFFIX="/Contents/Home"
14204  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14205  if test "x$ALL_JDKS_FOUND" != x; then
14206    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14207
14208  if test "x$BOOT_JDK_FOUND" = xno; then
14209    # Now execute the test
14210
14211        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14212        if test -d "$BOOT_JDK"; then
14213          BOOT_JDK_FOUND=maybe
14214          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14215$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14216        fi
14217
14218
14219    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14220    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14221      # Do we have a bin/java?
14222      if test ! -x "$BOOT_JDK/bin/java"; then
14223        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14225        BOOT_JDK_FOUND=no
14226      else
14227        # Do we have a bin/javac?
14228        if test ! -x "$BOOT_JDK/bin/javac"; then
14229          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14231          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14232$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14233          BOOT_JDK_FOUND=no
14234        else
14235          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14236          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14239            BOOT_JDK_FOUND=no
14240          else
14241            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14242            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14243
14244            # Extra M4 quote needed to protect [] in grep expression.
14245            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14246            if test "x$FOUND_VERSION_78" = x; then
14247              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14249              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14250$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14251              BOOT_JDK_FOUND=no
14252            else
14253              # We're done! :-)
14254              BOOT_JDK_FOUND=yes
14255
14256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14257
14258  # Input might be given as Windows format, start by converting to
14259  # unix format.
14260  path="$BOOT_JDK"
14261  new_path=`$CYGPATH -u "$path"`
14262
14263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14266  # "foo.exe" is OK but "foo" is an error.
14267  #
14268  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14269  # It is also a way to make sure we got the proper file name for the real test later on.
14270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14271  if test "x$test_shortpath" = x; then
14272    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14273$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14274    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14275  fi
14276
14277  # Call helper function which possibly converts this using DOS-style short mode.
14278  # If so, the updated path is stored in $new_path.
14279
14280  input_path="$new_path"
14281  # Check if we need to convert this using DOS-style short mode. If the path
14282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14283  # take no chances and rewrite it.
14284  # Note: m4 eats our [], so we need to use [ and ] instead.
14285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14286  if test "x$has_forbidden_chars" != x; then
14287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14288    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14289    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14290    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14291      # Going to short mode and back again did indeed matter. Since short mode is
14292      # case insensitive, let's make it lowercase to improve readability.
14293      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14294      # Now convert it back to Unix-stile (cygpath)
14295      input_path=`$CYGPATH -u "$shortmode_path"`
14296      new_path="$input_path"
14297    fi
14298  fi
14299
14300  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14301  if test "x$test_cygdrive_prefix" = x; then
14302    # As a simple fix, exclude /usr/bin since it's not a real path.
14303    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14304      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14305      # a path prefixed by /cygdrive for fixpath to work.
14306      new_path="$CYGWIN_ROOT_PATH$input_path"
14307    fi
14308  fi
14309
14310
14311  if test "x$path" != "x$new_path"; then
14312    BOOT_JDK="$new_path"
14313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14315  fi
14316
14317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14318
14319  path="$BOOT_JDK"
14320  has_colon=`$ECHO $path | $GREP ^.:`
14321  new_path="$path"
14322  if test "x$has_colon" = x; then
14323    # Not in mixed or Windows style, start by that.
14324    new_path=`cmd //c echo $path`
14325  fi
14326
14327
14328  input_path="$new_path"
14329  # Check if we need to convert this using DOS-style short mode. If the path
14330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14331  # take no chances and rewrite it.
14332  # Note: m4 eats our [], so we need to use [ and ] instead.
14333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14334  if test "x$has_forbidden_chars" != x; then
14335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14337  fi
14338
14339
14340  windows_path="$new_path"
14341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14342    unix_path=`$CYGPATH -u "$windows_path"`
14343    new_path="$unix_path"
14344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14346    new_path="$unix_path"
14347  fi
14348
14349  if test "x$path" != "x$new_path"; then
14350    BOOT_JDK="$new_path"
14351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14353  fi
14354
14355  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14356  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14357
14358  else
14359    # We're on a posix platform. Hooray! :)
14360    path="$BOOT_JDK"
14361
14362    if test ! -f "$path" && test ! -d "$path"; then
14363      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14364    fi
14365
14366    has_space=`$ECHO "$path" | $GREP " "`
14367    if test "x$has_space" != x; then
14368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14371    fi
14372  fi
14373
14374              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14375$as_echo_n "checking for Boot JDK... " >&6; }
14376              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14377$as_echo "$BOOT_JDK" >&6; }
14378              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14379$as_echo_n "checking Boot JDK version... " >&6; }
14380              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14381              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14382$as_echo "$BOOT_JDK_VERSION" >&6; }
14383            fi # end check jdk version
14384          fi # end check rt.jar
14385        fi # end check javac
14386      fi # end check java
14387    fi # end check boot jdk found
14388  fi
14389
14390    done
14391  fi
14392
14393
14394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14396      # Do we have a bin/java?
14397      if test ! -x "$BOOT_JDK/bin/java"; then
14398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14400        BOOT_JDK_FOUND=no
14401      else
14402        # Do we have a bin/javac?
14403        if test ! -x "$BOOT_JDK/bin/javac"; then
14404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14408          BOOT_JDK_FOUND=no
14409        else
14410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14414            BOOT_JDK_FOUND=no
14415          else
14416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14418
14419            # Extra M4 quote needed to protect [] in grep expression.
14420            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14421            if test "x$FOUND_VERSION_78" = x; then
14422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14425$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14426              BOOT_JDK_FOUND=no
14427            else
14428              # We're done! :-)
14429              BOOT_JDK_FOUND=yes
14430
14431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14432
14433  # Input might be given as Windows format, start by converting to
14434  # unix format.
14435  path="$BOOT_JDK"
14436  new_path=`$CYGPATH -u "$path"`
14437
14438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14441  # "foo.exe" is OK but "foo" is an error.
14442  #
14443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14444  # It is also a way to make sure we got the proper file name for the real test later on.
14445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14446  if test "x$test_shortpath" = x; then
14447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14450  fi
14451
14452  # Call helper function which possibly converts this using DOS-style short mode.
14453  # If so, the updated path is stored in $new_path.
14454
14455  input_path="$new_path"
14456  # Check if we need to convert this using DOS-style short mode. If the path
14457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14458  # take no chances and rewrite it.
14459  # Note: m4 eats our [], so we need to use [ and ] instead.
14460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14461  if test "x$has_forbidden_chars" != x; then
14462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14466      # Going to short mode and back again did indeed matter. Since short mode is
14467      # case insensitive, let's make it lowercase to improve readability.
14468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14469      # Now convert it back to Unix-stile (cygpath)
14470      input_path=`$CYGPATH -u "$shortmode_path"`
14471      new_path="$input_path"
14472    fi
14473  fi
14474
14475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14476  if test "x$test_cygdrive_prefix" = x; then
14477    # As a simple fix, exclude /usr/bin since it's not a real path.
14478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14480      # a path prefixed by /cygdrive for fixpath to work.
14481      new_path="$CYGWIN_ROOT_PATH$input_path"
14482    fi
14483  fi
14484
14485
14486  if test "x$path" != "x$new_path"; then
14487    BOOT_JDK="$new_path"
14488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14490  fi
14491
14492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14493
14494  path="$BOOT_JDK"
14495  has_colon=`$ECHO $path | $GREP ^.:`
14496  new_path="$path"
14497  if test "x$has_colon" = x; then
14498    # Not in mixed or Windows style, start by that.
14499    new_path=`cmd //c echo $path`
14500  fi
14501
14502
14503  input_path="$new_path"
14504  # Check if we need to convert this using DOS-style short mode. If the path
14505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14506  # take no chances and rewrite it.
14507  # Note: m4 eats our [], so we need to use [ and ] instead.
14508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14509  if test "x$has_forbidden_chars" != x; then
14510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14512  fi
14513
14514
14515  windows_path="$new_path"
14516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14517    unix_path=`$CYGPATH -u "$windows_path"`
14518    new_path="$unix_path"
14519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14521    new_path="$unix_path"
14522  fi
14523
14524  if test "x$path" != "x$new_path"; then
14525    BOOT_JDK="$new_path"
14526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14528  fi
14529
14530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14532
14533  else
14534    # We're on a posix platform. Hooray! :)
14535    path="$BOOT_JDK"
14536
14537    if test ! -f "$path" && test ! -d "$path"; then
14538      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14539    fi
14540
14541    has_space=`$ECHO "$path" | $GREP " "`
14542    if test "x$has_space" != x; then
14543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14546    fi
14547  fi
14548
14549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14550$as_echo_n "checking for Boot JDK... " >&6; }
14551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14552$as_echo "$BOOT_JDK" >&6; }
14553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14554$as_echo_n "checking Boot JDK version... " >&6; }
14555              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14557$as_echo "$BOOT_JDK_VERSION" >&6; }
14558            fi # end check jdk version
14559          fi # end check rt.jar
14560        fi # end check javac
14561      fi # end check java
14562    fi # end check boot jdk found
14563  fi
14564
14565  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14566
14567  if test "x$BOOT_JDK_FOUND" = xno; then
14568    # Now execute the test
14569
14570  BOOT_JDK_PREFIX="/usr/lib/jvm"
14571  BOOT_JDK_SUFFIX=""
14572  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14573  if test "x$ALL_JDKS_FOUND" != x; then
14574    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14575
14576  if test "x$BOOT_JDK_FOUND" = xno; then
14577    # Now execute the test
14578
14579        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14580        if test -d "$BOOT_JDK"; then
14581          BOOT_JDK_FOUND=maybe
14582          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14583$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14584        fi
14585
14586
14587    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14588    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14589      # Do we have a bin/java?
14590      if test ! -x "$BOOT_JDK/bin/java"; then
14591        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14593        BOOT_JDK_FOUND=no
14594      else
14595        # Do we have a bin/javac?
14596        if test ! -x "$BOOT_JDK/bin/javac"; then
14597          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14599          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14600$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14601          BOOT_JDK_FOUND=no
14602        else
14603          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14604          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14605            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14607            BOOT_JDK_FOUND=no
14608          else
14609            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14610            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14611
14612            # Extra M4 quote needed to protect [] in grep expression.
14613            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14614            if test "x$FOUND_VERSION_78" = x; then
14615              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14617              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14618$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14619              BOOT_JDK_FOUND=no
14620            else
14621              # We're done! :-)
14622              BOOT_JDK_FOUND=yes
14623
14624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14625
14626  # Input might be given as Windows format, start by converting to
14627  # unix format.
14628  path="$BOOT_JDK"
14629  new_path=`$CYGPATH -u "$path"`
14630
14631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14634  # "foo.exe" is OK but "foo" is an error.
14635  #
14636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14637  # It is also a way to make sure we got the proper file name for the real test later on.
14638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14639  if test "x$test_shortpath" = x; then
14640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14643  fi
14644
14645  # Call helper function which possibly converts this using DOS-style short mode.
14646  # If so, the updated path is stored in $new_path.
14647
14648  input_path="$new_path"
14649  # Check if we need to convert this using DOS-style short mode. If the path
14650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14651  # take no chances and rewrite it.
14652  # Note: m4 eats our [], so we need to use [ and ] instead.
14653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14654  if test "x$has_forbidden_chars" != x; then
14655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14659      # Going to short mode and back again did indeed matter. Since short mode is
14660      # case insensitive, let's make it lowercase to improve readability.
14661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14662      # Now convert it back to Unix-stile (cygpath)
14663      input_path=`$CYGPATH -u "$shortmode_path"`
14664      new_path="$input_path"
14665    fi
14666  fi
14667
14668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14669  if test "x$test_cygdrive_prefix" = x; then
14670    # As a simple fix, exclude /usr/bin since it's not a real path.
14671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14673      # a path prefixed by /cygdrive for fixpath to work.
14674      new_path="$CYGWIN_ROOT_PATH$input_path"
14675    fi
14676  fi
14677
14678
14679  if test "x$path" != "x$new_path"; then
14680    BOOT_JDK="$new_path"
14681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14683  fi
14684
14685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14686
14687  path="$BOOT_JDK"
14688  has_colon=`$ECHO $path | $GREP ^.:`
14689  new_path="$path"
14690  if test "x$has_colon" = x; then
14691    # Not in mixed or Windows style, start by that.
14692    new_path=`cmd //c echo $path`
14693  fi
14694
14695
14696  input_path="$new_path"
14697  # Check if we need to convert this using DOS-style short mode. If the path
14698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14699  # take no chances and rewrite it.
14700  # Note: m4 eats our [], so we need to use [ and ] instead.
14701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14702  if test "x$has_forbidden_chars" != x; then
14703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14705  fi
14706
14707
14708  windows_path="$new_path"
14709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14710    unix_path=`$CYGPATH -u "$windows_path"`
14711    new_path="$unix_path"
14712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14714    new_path="$unix_path"
14715  fi
14716
14717  if test "x$path" != "x$new_path"; then
14718    BOOT_JDK="$new_path"
14719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14721  fi
14722
14723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14725
14726  else
14727    # We're on a posix platform. Hooray! :)
14728    path="$BOOT_JDK"
14729
14730    if test ! -f "$path" && test ! -d "$path"; then
14731      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14732    fi
14733
14734    has_space=`$ECHO "$path" | $GREP " "`
14735    if test "x$has_space" != x; then
14736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14738      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14739    fi
14740  fi
14741
14742              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14743$as_echo_n "checking for Boot JDK... " >&6; }
14744              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14745$as_echo "$BOOT_JDK" >&6; }
14746              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14747$as_echo_n "checking Boot JDK version... " >&6; }
14748              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14749              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14750$as_echo "$BOOT_JDK_VERSION" >&6; }
14751            fi # end check jdk version
14752          fi # end check rt.jar
14753        fi # end check javac
14754      fi # end check java
14755    fi # end check boot jdk found
14756  fi
14757
14758    done
14759  fi
14760
14761
14762    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14763    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14764      # Do we have a bin/java?
14765      if test ! -x "$BOOT_JDK/bin/java"; then
14766        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14768        BOOT_JDK_FOUND=no
14769      else
14770        # Do we have a bin/javac?
14771        if test ! -x "$BOOT_JDK/bin/javac"; then
14772          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14773$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14774          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14775$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14776          BOOT_JDK_FOUND=no
14777        else
14778          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14779          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14782            BOOT_JDK_FOUND=no
14783          else
14784            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14786
14787            # Extra M4 quote needed to protect [] in grep expression.
14788            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14789            if test "x$FOUND_VERSION_78" = x; then
14790              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14792              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14793$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14794              BOOT_JDK_FOUND=no
14795            else
14796              # We're done! :-)
14797              BOOT_JDK_FOUND=yes
14798
14799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14800
14801  # Input might be given as Windows format, start by converting to
14802  # unix format.
14803  path="$BOOT_JDK"
14804  new_path=`$CYGPATH -u "$path"`
14805
14806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14809  # "foo.exe" is OK but "foo" is an error.
14810  #
14811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14812  # It is also a way to make sure we got the proper file name for the real test later on.
14813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14814  if test "x$test_shortpath" = x; then
14815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14818  fi
14819
14820  # Call helper function which possibly converts this using DOS-style short mode.
14821  # If so, the updated path is stored in $new_path.
14822
14823  input_path="$new_path"
14824  # Check if we need to convert this using DOS-style short mode. If the path
14825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14826  # take no chances and rewrite it.
14827  # Note: m4 eats our [], so we need to use [ and ] instead.
14828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14829  if test "x$has_forbidden_chars" != x; then
14830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14834      # Going to short mode and back again did indeed matter. Since short mode is
14835      # case insensitive, let's make it lowercase to improve readability.
14836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14837      # Now convert it back to Unix-stile (cygpath)
14838      input_path=`$CYGPATH -u "$shortmode_path"`
14839      new_path="$input_path"
14840    fi
14841  fi
14842
14843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14844  if test "x$test_cygdrive_prefix" = x; then
14845    # As a simple fix, exclude /usr/bin since it's not a real path.
14846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14848      # a path prefixed by /cygdrive for fixpath to work.
14849      new_path="$CYGWIN_ROOT_PATH$input_path"
14850    fi
14851  fi
14852
14853
14854  if test "x$path" != "x$new_path"; then
14855    BOOT_JDK="$new_path"
14856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14858  fi
14859
14860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14861
14862  path="$BOOT_JDK"
14863  has_colon=`$ECHO $path | $GREP ^.:`
14864  new_path="$path"
14865  if test "x$has_colon" = x; then
14866    # Not in mixed or Windows style, start by that.
14867    new_path=`cmd //c echo $path`
14868  fi
14869
14870
14871  input_path="$new_path"
14872  # Check if we need to convert this using DOS-style short mode. If the path
14873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14874  # take no chances and rewrite it.
14875  # Note: m4 eats our [], so we need to use [ and ] instead.
14876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14877  if test "x$has_forbidden_chars" != x; then
14878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14880  fi
14881
14882
14883  windows_path="$new_path"
14884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14885    unix_path=`$CYGPATH -u "$windows_path"`
14886    new_path="$unix_path"
14887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14889    new_path="$unix_path"
14890  fi
14891
14892  if test "x$path" != "x$new_path"; then
14893    BOOT_JDK="$new_path"
14894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14896  fi
14897
14898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14900
14901  else
14902    # We're on a posix platform. Hooray! :)
14903    path="$BOOT_JDK"
14904
14905    if test ! -f "$path" && test ! -d "$path"; then
14906      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14907    fi
14908
14909    has_space=`$ECHO "$path" | $GREP " "`
14910    if test "x$has_space" != x; then
14911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14912$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14913      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14914    fi
14915  fi
14916
14917              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14918$as_echo_n "checking for Boot JDK... " >&6; }
14919              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14920$as_echo "$BOOT_JDK" >&6; }
14921              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14922$as_echo_n "checking Boot JDK version... " >&6; }
14923              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14924              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14925$as_echo "$BOOT_JDK_VERSION" >&6; }
14926            fi # end check jdk version
14927          fi # end check rt.jar
14928        fi # end check javac
14929      fi # end check java
14930    fi # end check boot jdk found
14931  fi
14932
14933  fi
14934
14935
14936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14938      # Do we have a bin/java?
14939      if test ! -x "$BOOT_JDK/bin/java"; then
14940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14942        BOOT_JDK_FOUND=no
14943      else
14944        # Do we have a bin/javac?
14945        if test ! -x "$BOOT_JDK/bin/javac"; then
14946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14950          BOOT_JDK_FOUND=no
14951        else
14952          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14953          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14956            BOOT_JDK_FOUND=no
14957          else
14958            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14960
14961            # Extra M4 quote needed to protect [] in grep expression.
14962            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14963            if test "x$FOUND_VERSION_78" = x; then
14964              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14966              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14967$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14968              BOOT_JDK_FOUND=no
14969            else
14970              # We're done! :-)
14971              BOOT_JDK_FOUND=yes
14972
14973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14974
14975  # Input might be given as Windows format, start by converting to
14976  # unix format.
14977  path="$BOOT_JDK"
14978  new_path=`$CYGPATH -u "$path"`
14979
14980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14983  # "foo.exe" is OK but "foo" is an error.
14984  #
14985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14986  # It is also a way to make sure we got the proper file name for the real test later on.
14987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14988  if test "x$test_shortpath" = x; then
14989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14992  fi
14993
14994  # Call helper function which possibly converts this using DOS-style short mode.
14995  # If so, the updated path is stored in $new_path.
14996
14997  input_path="$new_path"
14998  # Check if we need to convert this using DOS-style short mode. If the path
14999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15000  # take no chances and rewrite it.
15001  # Note: m4 eats our [], so we need to use [ and ] instead.
15002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15003  if test "x$has_forbidden_chars" != x; then
15004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15008      # Going to short mode and back again did indeed matter. Since short mode is
15009      # case insensitive, let's make it lowercase to improve readability.
15010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15011      # Now convert it back to Unix-stile (cygpath)
15012      input_path=`$CYGPATH -u "$shortmode_path"`
15013      new_path="$input_path"
15014    fi
15015  fi
15016
15017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15018  if test "x$test_cygdrive_prefix" = x; then
15019    # As a simple fix, exclude /usr/bin since it's not a real path.
15020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15022      # a path prefixed by /cygdrive for fixpath to work.
15023      new_path="$CYGWIN_ROOT_PATH$input_path"
15024    fi
15025  fi
15026
15027
15028  if test "x$path" != "x$new_path"; then
15029    BOOT_JDK="$new_path"
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15032  fi
15033
15034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15035
15036  path="$BOOT_JDK"
15037  has_colon=`$ECHO $path | $GREP ^.:`
15038  new_path="$path"
15039  if test "x$has_colon" = x; then
15040    # Not in mixed or Windows style, start by that.
15041    new_path=`cmd //c echo $path`
15042  fi
15043
15044
15045  input_path="$new_path"
15046  # Check if we need to convert this using DOS-style short mode. If the path
15047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15048  # take no chances and rewrite it.
15049  # Note: m4 eats our [], so we need to use [ and ] instead.
15050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15051  if test "x$has_forbidden_chars" != x; then
15052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054  fi
15055
15056
15057  windows_path="$new_path"
15058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15059    unix_path=`$CYGPATH -u "$windows_path"`
15060    new_path="$unix_path"
15061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15063    new_path="$unix_path"
15064  fi
15065
15066  if test "x$path" != "x$new_path"; then
15067    BOOT_JDK="$new_path"
15068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15070  fi
15071
15072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15074
15075  else
15076    # We're on a posix platform. Hooray! :)
15077    path="$BOOT_JDK"
15078
15079    if test ! -f "$path" && test ! -d "$path"; then
15080      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15081    fi
15082
15083    has_space=`$ECHO "$path" | $GREP " "`
15084    if test "x$has_space" != x; then
15085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15088    fi
15089  fi
15090
15091              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15092$as_echo_n "checking for Boot JDK... " >&6; }
15093              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15094$as_echo "$BOOT_JDK" >&6; }
15095              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15096$as_echo_n "checking Boot JDK version... " >&6; }
15097              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15099$as_echo "$BOOT_JDK_VERSION" >&6; }
15100            fi # end check jdk version
15101          fi # end check rt.jar
15102        fi # end check javac
15103      fi # end check java
15104    fi # end check boot jdk found
15105  fi
15106
15107
15108# If we haven't found anything yet, we've truly lost. Give up.
15109if test "x$BOOT_JDK_FOUND" = xno; then
15110
15111    # Print a helpful message on how to acquire the necessary build dependency.
15112    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15113    MISSING_DEPENDENCY=openjdk
15114    PKGHANDLER_COMMAND=
15115
15116    case $PKGHANDLER in
15117	apt-get)
15118                apt_help     $MISSING_DEPENDENCY ;;
15119    yum)
15120                yum_help     $MISSING_DEPENDENCY ;;
15121	port)
15122                port_help    $MISSING_DEPENDENCY ;;
15123	pkgutil)
15124                pkgutil_help $MISSING_DEPENDENCY ;;
15125	pkgadd)
15126                pkgadd_help  $MISSING_DEPENDENCY ;;
15127    * )
15128      break ;;
15129    esac
15130
15131    if test "x$PKGHANDLER_COMMAND" != x; then
15132        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15133    fi
15134
15135  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15136$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15137  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15138$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15139  as_fn_error $? "Cannot continue" "$LINENO" 5
15140fi
15141
15142# Setup proper paths for what we found
15143BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15144if test ! -f "$BOOT_RTJAR"; then
15145    # On MacOSX it is called classes.jar
15146    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15147    if test -f "$BOOT_RTJAR"; then
15148      # Remove the ..
15149      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15150    fi
15151fi
15152BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15153BOOT_JDK="$BOOT_JDK"
15154
15155
15156
15157
15158# Setup tools from the Boot JDK.
15159
15160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15161$as_echo_n "checking for java in Boot JDK... " >&6; }
15162  JAVA=$BOOT_JDK/bin/java
15163  if test ! -x $JAVA; then
15164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15165$as_echo "not found" >&6; }
15166      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15167$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15168      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15169  fi
15170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15171$as_echo "ok" >&6; }
15172
15173
15174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15175$as_echo_n "checking for javac in Boot JDK... " >&6; }
15176  JAVAC=$BOOT_JDK/bin/javac
15177  if test ! -x $JAVAC; then
15178      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15179$as_echo "not found" >&6; }
15180      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15181$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15182      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15183  fi
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15185$as_echo "ok" >&6; }
15186
15187
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15189$as_echo_n "checking for javah in Boot JDK... " >&6; }
15190  JAVAH=$BOOT_JDK/bin/javah
15191  if test ! -x $JAVAH; then
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15193$as_echo "not found" >&6; }
15194      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15195$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15196      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15197  fi
15198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15199$as_echo "ok" >&6; }
15200
15201
15202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15203$as_echo_n "checking for javap in Boot JDK... " >&6; }
15204  JAVAP=$BOOT_JDK/bin/javap
15205  if test ! -x $JAVAP; then
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15207$as_echo "not found" >&6; }
15208      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15209$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15210      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15211  fi
15212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15213$as_echo "ok" >&6; }
15214
15215
15216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15217$as_echo_n "checking for jar in Boot JDK... " >&6; }
15218  JAR=$BOOT_JDK/bin/jar
15219  if test ! -x $JAR; then
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15221$as_echo "not found" >&6; }
15222      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15223$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15224      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15225  fi
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15227$as_echo "ok" >&6; }
15228
15229
15230  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15231$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15232  RMIC=$BOOT_JDK/bin/rmic
15233  if test ! -x $RMIC; then
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15235$as_echo "not found" >&6; }
15236      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15237$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15238      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15239  fi
15240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15241$as_echo "ok" >&6; }
15242
15243
15244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15245$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15246  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15247  if test ! -x $NATIVE2ASCII; then
15248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15249$as_echo "not found" >&6; }
15250      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15251$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15252      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15253  fi
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15255$as_echo "ok" >&6; }
15256
15257
15258# Finally, set some other options...
15259
15260# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15261BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15262
15263
15264
15265
15266##############################################################################
15267#
15268# Specify options for anything that is run with the Boot JDK.
15269#
15270
15271# Check whether --with-boot-jdk-jvmargs was given.
15272if test "${with_boot_jdk_jvmargs+set}" = set; then :
15273  withval=$with_boot_jdk_jvmargs;
15274fi
15275
15276
15277if test "x$with_boot_jdk_jvmargs" = x; then
15278    # Not all JVM:s accept the same arguments on the command line.
15279    # OpenJDK specific increase in thread stack for JDK build,
15280    # well more specifically, when running javac.
15281    if test "x$BUILD_NUM_BITS" = x32; then
15282       STACK_SIZE=768
15283    else
15284       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15285       # since 64-bit pointers are pushed on the stach. Apparently, we need
15286       # to increase the stack space when javacing the JDK....
15287       STACK_SIZE=1536
15288    fi
15289
15290    # Minimum amount of heap memory.
15291
15292    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15293    # If so, then append -Xms64M to boot_jdk_jvmargs
15294    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15295    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15296    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15297        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15298    fi
15299
15300    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15301        # Why does macosx need more heap? Its the huge JDK batch.
15302
15303    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15304    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15305    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15306    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15307    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15308        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15309    fi
15310
15311    else
15312
15313    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15314    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15315    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15316    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15317    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15318        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15319    fi
15320
15321    fi
15322    # When is adding -client something that speeds up the JVM?
15323    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15324
15325    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15326    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15327    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15328    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15329    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15330        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15331    fi
15332
15333
15334    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15335    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15336    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15337    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15338    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15339        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15340    fi
15341
15342
15343    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15344    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15345    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15346    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15347    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15348        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15349    fi
15350
15351    # Disable special log output when a debug build is used as Boot JDK...
15352
15353    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15354    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15355    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15356    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15357    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15358        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15359    fi
15360
15361fi
15362
15363BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15364
15365
15366
15367###############################################################################
15368#
15369# Configure the sources to use. We can add or override individual directories.
15370#
15371###############################################################################
15372
15373
15374
15375# Where are the sources. Any of these can be overridden
15376# using --with-override-corba and the likes.
15377LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15378CORBA_TOPDIR="$SRC_ROOT/corba"
15379JAXP_TOPDIR="$SRC_ROOT/jaxp"
15380JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15381HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15382JDK_TOPDIR="$SRC_ROOT/jdk"
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392###############################################################################
15393#
15394# Pickup additional source for a component from outside of the source root
15395# or override source for a component.
15396#
15397
15398# Check whether --with-add-source-root was given.
15399if test "${with_add_source_root+set}" = set; then :
15400  withval=$with_add_source_root;
15401fi
15402
15403
15404
15405# Check whether --with-override-source-root was given.
15406if test "${with_override_source_root+set}" = set; then :
15407  withval=$with_override_source_root;
15408fi
15409
15410
15411
15412# Check whether --with-adds-and-overrides was given.
15413if test "${with_adds_and_overrides+set}" = set; then :
15414  withval=$with_adds_and_overrides;
15415fi
15416
15417
15418if test "x$with_adds_and_overrides" != x; then
15419    with_add_source_root="$with_adds_and_overrides/adds"
15420    with_override_source_root="$with_adds_and_overrides/overrides"
15421fi
15422
15423if test "x$with_add_source_root" != x; then
15424    if ! test -d $with_add_source_root; then
15425       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15426    fi
15427    CURDIR="$PWD"
15428    cd "$with_add_source_root"
15429    ADD_SRC_ROOT="`pwd`"
15430    cd "$CURDIR"
15431    # Verify that the addon source root does not have any root makefiles.
15432    # If it does, then it is usually an error, prevent this.
15433    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15434       test -f $with_add_source_root/langtools/make/Makefile; then
15435        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
15436    fi
15437    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15438       test -f $with_add_source_root/corba/make/Makefile; then
15439        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
15440    fi
15441    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15442       test -f $with_add_source_root/jaxp/make/Makefile; then
15443        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
15444    fi
15445    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15446       test -f $with_add_source_root/jaxws/make/Makefile; then
15447        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
15448    fi
15449    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15450       test -f $with_add_source_root/hotspot/make/Makefile; then
15451        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
15452    fi
15453    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15454       test -f $with_add_source_root/jdk/make/Makefile; then
15455        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
15456    fi
15457fi
15458
15459
15460if test "x$with_override_source_root" != x; then
15461    if ! test -d $with_override_source_root; then
15462       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15463    fi
15464    CURDIR="$PWD"
15465    cd "$with_override_source_root"
15466    OVERRIDE_SRC_ROOT="`pwd`"
15467    cd "$CURDIR"
15468    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15469       test -f $with_override_source_root/langtools/make/Makefile; then
15470        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
15471    fi
15472    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15473       test -f $with_override_source_root/corba/make/Makefile; then
15474        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
15475    fi
15476    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15477       test -f $with_override_source_root/jaxp/make/Makefile; then
15478        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
15479    fi
15480    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15481       test -f $with_override_source_root/jaxws/make/Makefile; then
15482        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
15483    fi
15484    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15485       test -f $with_override_source_root/hotspot/make/Makefile; then
15486        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
15487    fi
15488    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15489       test -f $with_override_source_root/jdk/make/Makefile; then
15490        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
15491    fi
15492fi
15493
15494
15495###############################################################################
15496#
15497# Override a repo completely, this is used for example when you have 3 small
15498# development sandboxes of the langtools sources and want to avoid having 3 full
15499# OpenJDK sources checked out on disk.
15500#
15501# Assuming that the 3 langtools sandboxes are located here:
15502# /home/fredrik/sandbox1/langtools
15503# /home/fredrik/sandbox2/langtools
15504# /home/fredrik/sandbox3/langtools
15505#
15506# From the source root you create build subdirs manually:
15507#     mkdir -p build1 build2 build3
15508# in each build directory run:
15509#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15510#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15511#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15512#
15513
15514
15515# Check whether --with-override-langtools was given.
15516if test "${with_override_langtools+set}" = set; then :
15517  withval=$with_override_langtools;
15518fi
15519
15520
15521
15522# Check whether --with-override-corba was given.
15523if test "${with_override_corba+set}" = set; then :
15524  withval=$with_override_corba;
15525fi
15526
15527
15528
15529# Check whether --with-override-jaxp was given.
15530if test "${with_override_jaxp+set}" = set; then :
15531  withval=$with_override_jaxp;
15532fi
15533
15534
15535
15536# Check whether --with-override-jaxws was given.
15537if test "${with_override_jaxws+set}" = set; then :
15538  withval=$with_override_jaxws;
15539fi
15540
15541
15542
15543# Check whether --with-override-hotspot was given.
15544if test "${with_override_hotspot+set}" = set; then :
15545  withval=$with_override_hotspot;
15546fi
15547
15548
15549
15550# Check whether --with-override-jdk was given.
15551if test "${with_override_jdk+set}" = set; then :
15552  withval=$with_override_jdk;
15553fi
15554
15555
15556if test "x$with_override_langtools" != x; then
15557    CURDIR="$PWD"
15558    cd "$with_override_langtools"
15559    LANGTOOLS_TOPDIR="`pwd`"
15560    cd "$CURDIR"
15561    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15562        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15563    fi
15564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15565$as_echo_n "checking if langtools should be overridden... " >&6; }
15566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15567$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15568fi
15569if test "x$with_override_corba" != x; then
15570    CURDIR="$PWD"
15571    cd "$with_override_corba"
15572    CORBA_TOPDIR="`pwd`"
15573    cd "$CURDIR"
15574    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15575        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15576    fi
15577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15578$as_echo_n "checking if corba should be overridden... " >&6; }
15579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15580$as_echo "yes with $CORBA_TOPDIR" >&6; }
15581fi
15582if test "x$with_override_jaxp" != x; then
15583    CURDIR="$PWD"
15584    cd "$with_override_jaxp"
15585    JAXP_TOPDIR="`pwd`"
15586    cd "$CURDIR"
15587    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15588        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15589    fi
15590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15591$as_echo_n "checking if jaxp should be overridden... " >&6; }
15592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15593$as_echo "yes with $JAXP_TOPDIR" >&6; }
15594fi
15595if test "x$with_override_jaxws" != x; then
15596    CURDIR="$PWD"
15597    cd "$with_override_jaxws"
15598    JAXWS_TOPDIR="`pwd`"
15599    cd "$CURDIR"
15600    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15601        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15602    fi
15603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15604$as_echo_n "checking if jaxws should be overridden... " >&6; }
15605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15606$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15607fi
15608if test "x$with_override_hotspot" != x; then
15609    CURDIR="$PWD"
15610    cd "$with_override_hotspot"
15611    HOTSPOT_TOPDIR="`pwd`"
15612    cd "$CURDIR"
15613    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15614       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15615        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15616    fi
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15618$as_echo_n "checking if hotspot should be overridden... " >&6; }
15619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15620$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15621fi
15622if test "x$with_override_jdk" != x; then
15623    CURDIR="$PWD"
15624    cd "$with_override_jdk"
15625    JDK_TOPDIR="`pwd`"
15626    cd "$CURDIR"
15627    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15628        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15629    fi
15630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15631$as_echo_n "checking if JDK should be overridden... " >&6; }
15632    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15633$as_echo "yes with $JDK_TOPDIR" >&6; }
15634fi
15635
15636
15637
15638BUILD_OUTPUT="$OUTPUT_ROOT"
15639
15640
15641HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15642BUILD_HOTSPOT=true
15643
15644
15645
15646# Check whether --with-import-hotspot was given.
15647if test "${with_import_hotspot+set}" = set; then :
15648  withval=$with_import_hotspot;
15649fi
15650
15651if test "x$with_import_hotspot" != x; then
15652    CURDIR="$PWD"
15653    cd "$with_import_hotspot"
15654    HOTSPOT_DIST="`pwd`"
15655    cd "$CURDIR"
15656    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15657        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15658    fi
15659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15660$as_echo_n "checking if hotspot should be imported... " >&6; }
15661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15662$as_echo "yes from $HOTSPOT_DIST" >&6; }
15663    BUILD_HOTSPOT=false
15664fi
15665
15666JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15667
15668
15669###############################################################################
15670#
15671# Setup the toolchain (compilers etc), i.e. the tools that need to be
15672# cross-compilation aware.
15673#
15674###############################################################################
15675
15676
15677###############################################################################
15678#
15679# Configure the development tool paths and potential sysroot.
15680#
15681ac_ext=cpp
15682ac_cpp='$CXXCPP $CPPFLAGS'
15683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15686
15687
15688# The option used to specify the target .o,.a or .so file.
15689# When compiling, how to specify the to be created object file.
15690CC_OUT_OPTION='-o$(SPACE)'
15691# When linking, how to specify the to be created executable.
15692EXE_OUT_OPTION='-o$(SPACE)'
15693# When linking, how to specify the to be created dynamically linkable library.
15694LD_OUT_OPTION='-o$(SPACE)'
15695# When archiving, how to specify the to be create static archive for object files.
15696AR_OUT_OPTION='rcs$(SPACE)'
15697
15698
15699
15700
15701
15702# Locate the actual tools
15703
15704if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15705
15706  # Store path to cygwin link.exe to help excluding it when searching for
15707  # VS linker. This must be done before changing the PATH when looking for VS.
15708  # Extract the first word of "link", so it can be a program name with args.
15709set dummy link; ac_word=$2
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15711$as_echo_n "checking for $ac_word... " >&6; }
15712if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15713  $as_echo_n "(cached) " >&6
15714else
15715  case $CYGWIN_LINK in
15716  [\\/]* | ?:[\\/]*)
15717  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15718  ;;
15719  *)
15720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15721for as_dir in $PATH
15722do
15723  IFS=$as_save_IFS
15724  test -z "$as_dir" && as_dir=.
15725    for ac_exec_ext in '' $ac_executable_extensions; do
15726  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15727    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15729    break 2
15730  fi
15731done
15732  done
15733IFS=$as_save_IFS
15734
15735  ;;
15736esac
15737fi
15738CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15739if test -n "$CYGWIN_LINK"; then
15740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15741$as_echo "$CYGWIN_LINK" >&6; }
15742else
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744$as_echo "no" >&6; }
15745fi
15746
15747
15748  if test "x$CYGWIN_LINK" != x; then
15749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15750$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15751    "$CYGWIN_LINK" --version > /dev/null
15752    if test $? -eq 0 ; then
15753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15754$as_echo "yes" >&6; }
15755    else
15756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15757$as_echo "no" >&6; }
15758      # This might be the VS linker. Don't exclude it later on.
15759      CYGWIN_LINK=""
15760    fi
15761  fi
15762
15763  # First-hand choice is to locate and run the vsvars bat file.
15764
15765  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15766    VCVARSFILE="vc/bin/vcvars32.bat"
15767  else
15768    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15769  fi
15770
15771  VS_ENV_CMD=""
15772  VS_ENV_ARGS=""
15773  if test "x$with_toolsdir" != x; then
15774
15775  if test "x$VS_ENV_CMD" = x; then
15776    VS100BASE="$with_toolsdir/../.."
15777    METHOD="--with-tools-dir"
15778
15779  windows_path="$VS100BASE"
15780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15781    unix_path=`$CYGPATH -u "$windows_path"`
15782    VS100BASE="$unix_path"
15783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15785    VS100BASE="$unix_path"
15786  fi
15787
15788    if test -d "$VS100BASE"; then
15789      if test -f "$VS100BASE/$VCVARSFILE"; then
15790        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15791$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15792        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15793      else
15794        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15795$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15796        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15797$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15798      fi
15799    fi
15800  fi
15801
15802  fi
15803
15804  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15805    # Having specified an argument which is incorrect will produce an instant failure;
15806    # we should not go on looking
15807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15808$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15809    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15810$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15811    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15812  fi
15813
15814  if test "x$ProgramW6432" != x; then
15815
15816  if test "x$VS_ENV_CMD" = x; then
15817    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15818    METHOD="well-known name"
15819
15820  windows_path="$WIN_SDK_BASE"
15821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15822    unix_path=`$CYGPATH -u "$windows_path"`
15823    WIN_SDK_BASE="$unix_path"
15824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15826    WIN_SDK_BASE="$unix_path"
15827  fi
15828
15829    if test -d "$WIN_SDK_BASE"; then
15830      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15831        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15832$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15833        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15834        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15835          VS_ENV_ARGS="/x86"
15836        else
15837          VS_ENV_ARGS="/x64"
15838        fi
15839      else
15840        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15841$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15842        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15843$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15844      fi
15845    fi
15846  fi
15847
15848  fi
15849  if test "x$PROGRAMW6432" != x; then
15850
15851  if test "x$VS_ENV_CMD" = x; then
15852    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15853    METHOD="well-known name"
15854
15855  windows_path="$WIN_SDK_BASE"
15856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15857    unix_path=`$CYGPATH -u "$windows_path"`
15858    WIN_SDK_BASE="$unix_path"
15859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15861    WIN_SDK_BASE="$unix_path"
15862  fi
15863
15864    if test -d "$WIN_SDK_BASE"; then
15865      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15867$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15868        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15869        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15870          VS_ENV_ARGS="/x86"
15871        else
15872          VS_ENV_ARGS="/x64"
15873        fi
15874      else
15875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15876$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15878$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15879      fi
15880    fi
15881  fi
15882
15883  fi
15884  if test "x$PROGRAMFILES" != x; then
15885
15886  if test "x$VS_ENV_CMD" = x; then
15887    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15888    METHOD="well-known name"
15889
15890  windows_path="$WIN_SDK_BASE"
15891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15892    unix_path=`$CYGPATH -u "$windows_path"`
15893    WIN_SDK_BASE="$unix_path"
15894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15896    WIN_SDK_BASE="$unix_path"
15897  fi
15898
15899    if test -d "$WIN_SDK_BASE"; then
15900      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15902$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15903        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15904        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15905          VS_ENV_ARGS="/x86"
15906        else
15907          VS_ENV_ARGS="/x64"
15908        fi
15909      else
15910        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15911$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15912        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15913$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15914      fi
15915    fi
15916  fi
15917
15918  fi
15919
15920  if test "x$VS_ENV_CMD" = x; then
15921    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15922    METHOD="well-known name"
15923
15924  windows_path="$WIN_SDK_BASE"
15925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15926    unix_path=`$CYGPATH -u "$windows_path"`
15927    WIN_SDK_BASE="$unix_path"
15928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15930    WIN_SDK_BASE="$unix_path"
15931  fi
15932
15933    if test -d "$WIN_SDK_BASE"; then
15934      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15935        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15936$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15937        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15938        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15939          VS_ENV_ARGS="/x86"
15940        else
15941          VS_ENV_ARGS="/x64"
15942        fi
15943      else
15944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15947$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15948      fi
15949    fi
15950  fi
15951
15952
15953  if test "x$VS_ENV_CMD" = x; then
15954    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15955    METHOD="well-known name"
15956
15957  windows_path="$WIN_SDK_BASE"
15958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15959    unix_path=`$CYGPATH -u "$windows_path"`
15960    WIN_SDK_BASE="$unix_path"
15961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15963    WIN_SDK_BASE="$unix_path"
15964  fi
15965
15966    if test -d "$WIN_SDK_BASE"; then
15967      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15968        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15969$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15970        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15971        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15972          VS_ENV_ARGS="/x86"
15973        else
15974          VS_ENV_ARGS="/x64"
15975        fi
15976      else
15977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15978$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15979        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15980$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15981      fi
15982    fi
15983  fi
15984
15985
15986  if test "x$VS100COMNTOOLS" != x; then
15987
15988  if test "x$VS_ENV_CMD" = x; then
15989    VS100BASE="$VS100COMNTOOLS/../.."
15990    METHOD="VS100COMNTOOLS variable"
15991
15992  windows_path="$VS100BASE"
15993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15994    unix_path=`$CYGPATH -u "$windows_path"`
15995    VS100BASE="$unix_path"
15996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15998    VS100BASE="$unix_path"
15999  fi
16000
16001    if test -d "$VS100BASE"; then
16002      if test -f "$VS100BASE/$VCVARSFILE"; then
16003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16004$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16005        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16006      else
16007        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16008$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16009        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16010$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16011      fi
16012    fi
16013  fi
16014
16015  fi
16016  if test "x$PROGRAMFILES" != x; then
16017
16018  if test "x$VS_ENV_CMD" = x; then
16019    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16020    METHOD="well-known name"
16021
16022  windows_path="$VS100BASE"
16023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16024    unix_path=`$CYGPATH -u "$windows_path"`
16025    VS100BASE="$unix_path"
16026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16028    VS100BASE="$unix_path"
16029  fi
16030
16031    if test -d "$VS100BASE"; then
16032      if test -f "$VS100BASE/$VCVARSFILE"; then
16033        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16034$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16035        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16036      else
16037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16038$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16039        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16040$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16041      fi
16042    fi
16043  fi
16044
16045  fi
16046
16047  if test "x$VS_ENV_CMD" = x; then
16048    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16049    METHOD="well-known name"
16050
16051  windows_path="$VS100BASE"
16052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16053    unix_path=`$CYGPATH -u "$windows_path"`
16054    VS100BASE="$unix_path"
16055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16057    VS100BASE="$unix_path"
16058  fi
16059
16060    if test -d "$VS100BASE"; then
16061      if test -f "$VS100BASE/$VCVARSFILE"; then
16062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16063$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16064        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16065      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16069$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16070      fi
16071    fi
16072  fi
16073
16074
16075  if test "x$VS_ENV_CMD" = x; then
16076    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16077    METHOD="well-known name"
16078
16079  windows_path="$VS100BASE"
16080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16081    unix_path=`$CYGPATH -u "$windows_path"`
16082    VS100BASE="$unix_path"
16083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16085    VS100BASE="$unix_path"
16086  fi
16087
16088    if test -d "$VS100BASE"; then
16089      if test -f "$VS100BASE/$VCVARSFILE"; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16091$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16092        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16093      else
16094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16095$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16097$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16098      fi
16099    fi
16100  fi
16101
16102
16103  if test "x$VS_ENV_CMD" != x; then
16104    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16105
16106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16107
16108  # First separate the path from the arguments. This will split at the first
16109  # space.
16110  complete="$VS_ENV_CMD"
16111  path="${complete%% *}"
16112  tmp="$complete EOL"
16113  arguments="${tmp#* }"
16114
16115  # Input might be given as Windows format, start by converting to
16116  # unix format.
16117  new_path=`$CYGPATH -u "$path"`
16118
16119  # Now try to locate executable using which
16120  new_path=`$WHICH "$new_path" 2> /dev/null`
16121  # bat and cmd files are not always considered executable in cygwin causing which
16122  # to not find them
16123  if test "x$new_path" = x \
16124           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16125           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16126    new_path=`$CYGPATH -u "$path"`
16127  fi
16128  if test "x$new_path" = x; then
16129    # Oops. Which didn't find the executable.
16130    # The splitting of arguments from the executable at a space might have been incorrect,
16131    # since paths with space are more likely in Windows. Give it another try with the whole
16132    # argument.
16133    path="$complete"
16134    arguments="EOL"
16135    new_path=`$CYGPATH -u "$path"`
16136    new_path=`$WHICH "$new_path" 2> /dev/null`
16137    # bat and cmd files are not always considered executable in cygwin causing which
16138    # to not find them
16139    if test "x$new_path" = x \
16140             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16141             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16142      new_path=`$CYGPATH -u "$path"`
16143    fi
16144    if test "x$new_path" = x; then
16145      # It's still not found. Now this is an unrecoverable error.
16146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16147$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16148      has_space=`$ECHO "$complete" | $GREP " "`
16149      if test "x$has_space" != x; then
16150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16152      fi
16153      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16154    fi
16155  fi
16156
16157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16160  # "foo.exe" is OK but "foo" is an error.
16161  #
16162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16163  # It is also a way to make sure we got the proper file name for the real test later on.
16164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16165  if test "x$test_shortpath" = x; then
16166    # Short path failed, file does not exist as specified.
16167    # Try adding .exe or .cmd
16168    if test -f "${new_path}.exe"; then
16169       input_to_shortpath="${new_path}.exe"
16170    elif test -f "${new_path}.cmd"; then
16171       input_to_shortpath="${new_path}.cmd"
16172    else
16173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16174$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16175      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16176$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16177      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16178    fi
16179  else
16180    input_to_shortpath="$new_path"
16181  fi
16182
16183  # Call helper function which possibly converts this using DOS-style short mode.
16184  # If so, the updated path is stored in $new_path.
16185  new_path="$input_to_shortpath"
16186
16187  input_path="$input_to_shortpath"
16188  # Check if we need to convert this using DOS-style short mode. If the path
16189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16190  # take no chances and rewrite it.
16191  # Note: m4 eats our [], so we need to use [ and ] instead.
16192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16193  if test "x$has_forbidden_chars" != x; then
16194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16198      # Going to short mode and back again did indeed matter. Since short mode is
16199      # case insensitive, let's make it lowercase to improve readability.
16200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16201      # Now convert it back to Unix-stile (cygpath)
16202      input_path=`$CYGPATH -u "$shortmode_path"`
16203      new_path="$input_path"
16204    fi
16205  fi
16206
16207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16208  if test "x$test_cygdrive_prefix" = x; then
16209    # As a simple fix, exclude /usr/bin since it's not a real path.
16210    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16212      # a path prefixed by /cygdrive for fixpath to work.
16213      new_path="$CYGWIN_ROOT_PATH$input_path"
16214    fi
16215  fi
16216
16217  # remove trailing .exe if any
16218  new_path="${new_path/%.exe/}"
16219
16220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16221
16222  # First separate the path from the arguments. This will split at the first
16223  # space.
16224  complete="$VS_ENV_CMD"
16225  path="${complete%% *}"
16226  tmp="$complete EOL"
16227  arguments="${tmp#* }"
16228
16229  # Input might be given as Windows format, start by converting to
16230  # unix format.
16231  new_path="$path"
16232
16233  windows_path="$new_path"
16234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16235    unix_path=`$CYGPATH -u "$windows_path"`
16236    new_path="$unix_path"
16237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16239    new_path="$unix_path"
16240  fi
16241
16242
16243  # Now try to locate executable using which
16244  new_path=`$WHICH "$new_path" 2> /dev/null`
16245
16246  if test "x$new_path" = x; then
16247    # Oops. Which didn't find the executable.
16248    # The splitting of arguments from the executable at a space might have been incorrect,
16249    # since paths with space are more likely in Windows. Give it another try with the whole
16250    # argument.
16251    path="$complete"
16252    arguments="EOL"
16253    new_path="$path"
16254
16255  windows_path="$new_path"
16256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16257    unix_path=`$CYGPATH -u "$windows_path"`
16258    new_path="$unix_path"
16259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16261    new_path="$unix_path"
16262  fi
16263
16264
16265    new_path=`$WHICH "$new_path" 2> /dev/null`
16266
16267    if test "x$new_path" = x; then
16268      # It's still not found. Now this is an unrecoverable error.
16269      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16270$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16271      has_space=`$ECHO "$complete" | $GREP " "`
16272      if test "x$has_space" != x; then
16273        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16274$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16275      fi
16276      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16277    fi
16278  fi
16279
16280  # Now new_path has a complete unix path to the binary
16281  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16282    # Keep paths in /bin as-is, but remove trailing .exe if any
16283    new_path="${new_path/%.exe/}"
16284    # Do not save /bin paths to all_fixpath_prefixes!
16285  else
16286    # Not in mixed or Windows style, start by that.
16287    new_path=`cmd //c echo $new_path`
16288
16289  input_path="$new_path"
16290  # Check if we need to convert this using DOS-style short mode. If the path
16291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16292  # take no chances and rewrite it.
16293  # Note: m4 eats our [], so we need to use [ and ] instead.
16294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16295  if test "x$has_forbidden_chars" != x; then
16296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298  fi
16299
16300    # Output is in $new_path
16301
16302  windows_path="$new_path"
16303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16304    unix_path=`$CYGPATH -u "$windows_path"`
16305    new_path="$unix_path"
16306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16308    new_path="$unix_path"
16309  fi
16310
16311    # remove trailing .exe if any
16312    new_path="${new_path/%.exe/}"
16313
16314    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16315    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16316  fi
16317
16318  else
16319    # We're on a posix platform. Hooray! :)
16320    # First separate the path from the arguments. This will split at the first
16321    # space.
16322    complete="$VS_ENV_CMD"
16323    path="${complete%% *}"
16324    tmp="$complete EOL"
16325    arguments="${tmp#* }"
16326
16327    new_path=`$WHICH $path 2> /dev/null`
16328    if test "x$new_path" = x; then
16329      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16330      if test "x$is_absolute_path" != x; then
16331        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16332$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16333        new_path="$path"
16334      else
16335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16336$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16337        has_space=`$ECHO "$complete" | $GREP " "`
16338        if test "x$has_space" != x; then
16339          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16340$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16341        fi
16342        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16343      fi
16344    fi
16345  fi
16346
16347  # Now join together the path and the arguments once again
16348  if test "x$arguments" != xEOL; then
16349      new_complete="$new_path ${arguments% *}"
16350  else
16351      new_complete="$new_path"
16352  fi
16353
16354  if test "x$complete" != "x$new_complete"; then
16355    VS_ENV_CMD="$new_complete"
16356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16357$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16358  fi
16359
16360
16361    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16362    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16363$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16364    cd $OUTPUT_ROOT
16365    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16366    # to autoconf standards.
16367
16368    #----
16369
16370    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16371    # but calculate the difference in Cygwin environment before/after running it and then
16372    # apply the diff.
16373
16374    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16375      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16376      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16377      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16378    else
16379      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16380      _dosbash=`cmd //c echo \`which bash\``
16381    fi
16382
16383    # generate the set of exported vars before/after the vs10 setup
16384    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16385    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16386    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16387    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16388
16389    # Now execute the newly created bat file.
16390    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16391    cmd /c localdevenvtmp.bat | cat
16392
16393    # apply the diff (less some non-vs10 vars named by "!")
16394    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16395    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16396    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16397
16398    # cleanup
16399    $RM localdevenvtmp*
16400    #----
16401    cd $CURDIR
16402    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16404$as_echo "no" >&6; }
16405      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16406$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16407      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16408$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16409      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16410$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16411      as_fn_error $? "Cannot continue" "$LINENO" 5
16412    fi
16413
16414    # Now set all paths and other env variables. This will allow the rest of
16415    # the configure script to find and run the compiler in the proper way.
16416    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16417$as_echo "$as_me: Setting extracted environment variables" >&6;}
16418    . $OUTPUT_ROOT/localdevenv.sh
16419  else
16420    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16422$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16423  fi
16424
16425  # At this point, we should have corrent variables in the environment, or we can't continue.
16426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16427$as_echo_n "checking for Visual Studio variables... " >&6; }
16428
16429  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16430    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16432$as_echo "present but broken" >&6; }
16433      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16434    else
16435      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16436$as_echo "ok" >&6; }
16437      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16438      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16439      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16440      VS_PATH="$PATH"
16441
16442
16443
16444    fi
16445  else
16446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16447$as_echo "not found" >&6; }
16448
16449    if test "x$VS_ENV_CMD" = x; then
16450      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16451$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16452      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16453$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16454    else
16455      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16456$as_echo "$as_me: Running the extraction script failed." >&6;}
16457    fi
16458    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16459$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16460    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16461$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16462    as_fn_error $? "Cannot continue" "$LINENO" 5
16463  fi
16464
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16466$as_echo_n "checking for msvcr100.dll... " >&6; }
16467
16468# Check whether --with-msvcr-dll was given.
16469if test "${with_msvcr_dll+set}" = set; then :
16470  withval=$with_msvcr_dll;
16471fi
16472
16473  if test "x$with_msvcr_dll" != x; then
16474    MSVCR_DLL="$with_msvcr_dll"
16475  else
16476    if test "x$VCINSTALLDIR" != x; then
16477      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16478        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16479      else
16480        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16481        if test "x$MSVCR_DLL" = x; then
16482          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16483        fi
16484      fi
16485      if test "x$MSVCR_DLL" != x; then
16486        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16487$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16488      else
16489        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16490$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16491      fi
16492    fi
16493    if test "x$MSVCR_DLL" = x; then
16494      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16495        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16496$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16497        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16498      fi
16499    fi
16500  fi
16501  if test "x$MSVCR_DLL" = x; then
16502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16503$as_echo "no" >&6; }
16504    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16505  fi
16506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16507$as_echo "$MSVCR_DLL" >&6; }
16508
16509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16510
16511  # Input might be given as Windows format, start by converting to
16512  # unix format.
16513  path="$MSVCR_DLL"
16514  new_path=`$CYGPATH -u "$path"`
16515
16516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16519  # "foo.exe" is OK but "foo" is an error.
16520  #
16521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16522  # It is also a way to make sure we got the proper file name for the real test later on.
16523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16524  if test "x$test_shortpath" = x; then
16525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16526$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16527    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16528  fi
16529
16530  # Call helper function which possibly converts this using DOS-style short mode.
16531  # If so, the updated path is stored in $new_path.
16532
16533  input_path="$new_path"
16534  # Check if we need to convert this using DOS-style short mode. If the path
16535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16536  # take no chances and rewrite it.
16537  # Note: m4 eats our [], so we need to use [ and ] instead.
16538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16539  if test "x$has_forbidden_chars" != x; then
16540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16544      # Going to short mode and back again did indeed matter. Since short mode is
16545      # case insensitive, let's make it lowercase to improve readability.
16546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16547      # Now convert it back to Unix-stile (cygpath)
16548      input_path=`$CYGPATH -u "$shortmode_path"`
16549      new_path="$input_path"
16550    fi
16551  fi
16552
16553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16554  if test "x$test_cygdrive_prefix" = x; then
16555    # As a simple fix, exclude /usr/bin since it's not a real path.
16556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16558      # a path prefixed by /cygdrive for fixpath to work.
16559      new_path="$CYGWIN_ROOT_PATH$input_path"
16560    fi
16561  fi
16562
16563
16564  if test "x$path" != "x$new_path"; then
16565    MSVCR_DLL="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16568  fi
16569
16570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571
16572  path="$MSVCR_DLL"
16573  has_colon=`$ECHO $path | $GREP ^.:`
16574  new_path="$path"
16575  if test "x$has_colon" = x; then
16576    # Not in mixed or Windows style, start by that.
16577    new_path=`cmd //c echo $path`
16578  fi
16579
16580
16581  input_path="$new_path"
16582  # Check if we need to convert this using DOS-style short mode. If the path
16583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16584  # take no chances and rewrite it.
16585  # Note: m4 eats our [], so we need to use [ and ] instead.
16586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16587  if test "x$has_forbidden_chars" != x; then
16588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16590  fi
16591
16592
16593  windows_path="$new_path"
16594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595    unix_path=`$CYGPATH -u "$windows_path"`
16596    new_path="$unix_path"
16597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16599    new_path="$unix_path"
16600  fi
16601
16602  if test "x$path" != "x$new_path"; then
16603    MSVCR_DLL="$new_path"
16604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16605$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16606  fi
16607
16608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16610
16611  else
16612    # We're on a posix platform. Hooray! :)
16613    path="$MSVCR_DLL"
16614
16615    if test ! -f "$path" && test ! -d "$path"; then
16616      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16617    fi
16618
16619    has_space=`$ECHO "$path" | $GREP " "`
16620    if test "x$has_space" != x; then
16621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16622$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16624    fi
16625  fi
16626
16627
16628fi
16629
16630
16631
16632# If --build AND --host is set, then the configure script will find any
16633# cross compilation tools in the PATH. Cross compilation tools
16634# follows the cross compilation standard where they are prefixed with ${host}.
16635# For example the binary i686-sun-solaris2.10-gcc
16636# will cross compile for i686-sun-solaris2.10
16637# If neither of build and host is not set, then build=host and the
16638# default compiler found in the path will be used.
16639# Setting only --host, does not seem to be really supported.
16640# Please set both --build and --host if you want to cross compile.
16641
16642if test "x$COMPILE_TYPE" = "xcross"; then
16643    # Now we to find a C/C++ compiler that can build executables for the build
16644    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16645    # once. Also, we need to do this before adding a tools dir to the path,
16646    # otherwise we might pick up cross-compilers which don't use standard naming.
16647    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16648    # to wait until they are properly discovered.
16649    for ac_prog in cl cc gcc
16650do
16651  # Extract the first word of "$ac_prog", so it can be a program name with args.
16652set dummy $ac_prog; ac_word=$2
16653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16654$as_echo_n "checking for $ac_word... " >&6; }
16655if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16656  $as_echo_n "(cached) " >&6
16657else
16658  case $BUILD_CC in
16659  [\\/]* | ?:[\\/]*)
16660  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16661  ;;
16662  *)
16663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16664for as_dir in $PATH
16665do
16666  IFS=$as_save_IFS
16667  test -z "$as_dir" && as_dir=.
16668    for ac_exec_ext in '' $ac_executable_extensions; do
16669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16670    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16672    break 2
16673  fi
16674done
16675  done
16676IFS=$as_save_IFS
16677
16678  ;;
16679esac
16680fi
16681BUILD_CC=$ac_cv_path_BUILD_CC
16682if test -n "$BUILD_CC"; then
16683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16684$as_echo "$BUILD_CC" >&6; }
16685else
16686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687$as_echo "no" >&6; }
16688fi
16689
16690
16691  test -n "$BUILD_CC" && break
16692done
16693
16694
16695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16696
16697  # First separate the path from the arguments. This will split at the first
16698  # space.
16699  complete="$BUILD_CC"
16700  path="${complete%% *}"
16701  tmp="$complete EOL"
16702  arguments="${tmp#* }"
16703
16704  # Input might be given as Windows format, start by converting to
16705  # unix format.
16706  new_path=`$CYGPATH -u "$path"`
16707
16708  # Now try to locate executable using which
16709  new_path=`$WHICH "$new_path" 2> /dev/null`
16710  # bat and cmd files are not always considered executable in cygwin causing which
16711  # to not find them
16712  if test "x$new_path" = x \
16713           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16714           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16715    new_path=`$CYGPATH -u "$path"`
16716  fi
16717  if test "x$new_path" = x; then
16718    # Oops. Which didn't find the executable.
16719    # The splitting of arguments from the executable at a space might have been incorrect,
16720    # since paths with space are more likely in Windows. Give it another try with the whole
16721    # argument.
16722    path="$complete"
16723    arguments="EOL"
16724    new_path=`$CYGPATH -u "$path"`
16725    new_path=`$WHICH "$new_path" 2> /dev/null`
16726    # bat and cmd files are not always considered executable in cygwin causing which
16727    # to not find them
16728    if test "x$new_path" = x \
16729             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16730             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16731      new_path=`$CYGPATH -u "$path"`
16732    fi
16733    if test "x$new_path" = x; then
16734      # It's still not found. Now this is an unrecoverable error.
16735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16736$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16737      has_space=`$ECHO "$complete" | $GREP " "`
16738      if test "x$has_space" != x; then
16739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16741      fi
16742      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16743    fi
16744  fi
16745
16746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16749  # "foo.exe" is OK but "foo" is an error.
16750  #
16751  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16752  # It is also a way to make sure we got the proper file name for the real test later on.
16753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16754  if test "x$test_shortpath" = x; then
16755    # Short path failed, file does not exist as specified.
16756    # Try adding .exe or .cmd
16757    if test -f "${new_path}.exe"; then
16758       input_to_shortpath="${new_path}.exe"
16759    elif test -f "${new_path}.cmd"; then
16760       input_to_shortpath="${new_path}.cmd"
16761    else
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16763$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16766      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16767    fi
16768  else
16769    input_to_shortpath="$new_path"
16770  fi
16771
16772  # Call helper function which possibly converts this using DOS-style short mode.
16773  # If so, the updated path is stored in $new_path.
16774  new_path="$input_to_shortpath"
16775
16776  input_path="$input_to_shortpath"
16777  # Check if we need to convert this using DOS-style short mode. If the path
16778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16779  # take no chances and rewrite it.
16780  # Note: m4 eats our [], so we need to use [ and ] instead.
16781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16782  if test "x$has_forbidden_chars" != x; then
16783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16787      # Going to short mode and back again did indeed matter. Since short mode is
16788      # case insensitive, let's make it lowercase to improve readability.
16789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16790      # Now convert it back to Unix-stile (cygpath)
16791      input_path=`$CYGPATH -u "$shortmode_path"`
16792      new_path="$input_path"
16793    fi
16794  fi
16795
16796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16797  if test "x$test_cygdrive_prefix" = x; then
16798    # As a simple fix, exclude /usr/bin since it's not a real path.
16799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16801      # a path prefixed by /cygdrive for fixpath to work.
16802      new_path="$CYGWIN_ROOT_PATH$input_path"
16803    fi
16804  fi
16805
16806  # remove trailing .exe if any
16807  new_path="${new_path/%.exe/}"
16808
16809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16810
16811  # First separate the path from the arguments. This will split at the first
16812  # space.
16813  complete="$BUILD_CC"
16814  path="${complete%% *}"
16815  tmp="$complete EOL"
16816  arguments="${tmp#* }"
16817
16818  # Input might be given as Windows format, start by converting to
16819  # unix format.
16820  new_path="$path"
16821
16822  windows_path="$new_path"
16823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16824    unix_path=`$CYGPATH -u "$windows_path"`
16825    new_path="$unix_path"
16826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16828    new_path="$unix_path"
16829  fi
16830
16831
16832  # Now try to locate executable using which
16833  new_path=`$WHICH "$new_path" 2> /dev/null`
16834
16835  if test "x$new_path" = x; then
16836    # Oops. Which didn't find the executable.
16837    # The splitting of arguments from the executable at a space might have been incorrect,
16838    # since paths with space are more likely in Windows. Give it another try with the whole
16839    # argument.
16840    path="$complete"
16841    arguments="EOL"
16842    new_path="$path"
16843
16844  windows_path="$new_path"
16845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16846    unix_path=`$CYGPATH -u "$windows_path"`
16847    new_path="$unix_path"
16848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16850    new_path="$unix_path"
16851  fi
16852
16853
16854    new_path=`$WHICH "$new_path" 2> /dev/null`
16855
16856    if test "x$new_path" = x; then
16857      # It's still not found. Now this is an unrecoverable error.
16858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16859$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16860      has_space=`$ECHO "$complete" | $GREP " "`
16861      if test "x$has_space" != x; then
16862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16864      fi
16865      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16866    fi
16867  fi
16868
16869  # Now new_path has a complete unix path to the binary
16870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16871    # Keep paths in /bin as-is, but remove trailing .exe if any
16872    new_path="${new_path/%.exe/}"
16873    # Do not save /bin paths to all_fixpath_prefixes!
16874  else
16875    # Not in mixed or Windows style, start by that.
16876    new_path=`cmd //c echo $new_path`
16877
16878  input_path="$new_path"
16879  # Check if we need to convert this using DOS-style short mode. If the path
16880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16881  # take no chances and rewrite it.
16882  # Note: m4 eats our [], so we need to use [ and ] instead.
16883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16884  if test "x$has_forbidden_chars" != x; then
16885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16887  fi
16888
16889    # Output is in $new_path
16890
16891  windows_path="$new_path"
16892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16893    unix_path=`$CYGPATH -u "$windows_path"`
16894    new_path="$unix_path"
16895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16897    new_path="$unix_path"
16898  fi
16899
16900    # remove trailing .exe if any
16901    new_path="${new_path/%.exe/}"
16902
16903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16905  fi
16906
16907  else
16908    # We're on a posix platform. Hooray! :)
16909    # First separate the path from the arguments. This will split at the first
16910    # space.
16911    complete="$BUILD_CC"
16912    path="${complete%% *}"
16913    tmp="$complete EOL"
16914    arguments="${tmp#* }"
16915
16916    new_path=`$WHICH $path 2> /dev/null`
16917    if test "x$new_path" = x; then
16918      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16919      if test "x$is_absolute_path" != x; then
16920        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16921$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16922        new_path="$path"
16923      else
16924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16925$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16926        has_space=`$ECHO "$complete" | $GREP " "`
16927        if test "x$has_space" != x; then
16928          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16929$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16930        fi
16931        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16932      fi
16933    fi
16934  fi
16935
16936  # Now join together the path and the arguments once again
16937  if test "x$arguments" != xEOL; then
16938      new_complete="$new_path ${arguments% *}"
16939  else
16940      new_complete="$new_path"
16941  fi
16942
16943  if test "x$complete" != "x$new_complete"; then
16944    BUILD_CC="$new_complete"
16945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16946$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16947  fi
16948
16949    for ac_prog in cl CC g++
16950do
16951  # Extract the first word of "$ac_prog", so it can be a program name with args.
16952set dummy $ac_prog; ac_word=$2
16953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16954$as_echo_n "checking for $ac_word... " >&6; }
16955if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16956  $as_echo_n "(cached) " >&6
16957else
16958  case $BUILD_CXX in
16959  [\\/]* | ?:[\\/]*)
16960  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16961  ;;
16962  *)
16963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16964for as_dir in $PATH
16965do
16966  IFS=$as_save_IFS
16967  test -z "$as_dir" && as_dir=.
16968    for ac_exec_ext in '' $ac_executable_extensions; do
16969  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16970    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16972    break 2
16973  fi
16974done
16975  done
16976IFS=$as_save_IFS
16977
16978  ;;
16979esac
16980fi
16981BUILD_CXX=$ac_cv_path_BUILD_CXX
16982if test -n "$BUILD_CXX"; then
16983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16984$as_echo "$BUILD_CXX" >&6; }
16985else
16986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16987$as_echo "no" >&6; }
16988fi
16989
16990
16991  test -n "$BUILD_CXX" && break
16992done
16993
16994
16995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16996
16997  # First separate the path from the arguments. This will split at the first
16998  # space.
16999  complete="$BUILD_CXX"
17000  path="${complete%% *}"
17001  tmp="$complete EOL"
17002  arguments="${tmp#* }"
17003
17004  # Input might be given as Windows format, start by converting to
17005  # unix format.
17006  new_path=`$CYGPATH -u "$path"`
17007
17008  # Now try to locate executable using which
17009  new_path=`$WHICH "$new_path" 2> /dev/null`
17010  # bat and cmd files are not always considered executable in cygwin causing which
17011  # to not find them
17012  if test "x$new_path" = x \
17013           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17014           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17015    new_path=`$CYGPATH -u "$path"`
17016  fi
17017  if test "x$new_path" = x; then
17018    # Oops. Which didn't find the executable.
17019    # The splitting of arguments from the executable at a space might have been incorrect,
17020    # since paths with space are more likely in Windows. Give it another try with the whole
17021    # argument.
17022    path="$complete"
17023    arguments="EOL"
17024    new_path=`$CYGPATH -u "$path"`
17025    new_path=`$WHICH "$new_path" 2> /dev/null`
17026    # bat and cmd files are not always considered executable in cygwin causing which
17027    # to not find them
17028    if test "x$new_path" = x \
17029             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17030             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17031      new_path=`$CYGPATH -u "$path"`
17032    fi
17033    if test "x$new_path" = x; then
17034      # It's still not found. Now this is an unrecoverable error.
17035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17036$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17037      has_space=`$ECHO "$complete" | $GREP " "`
17038      if test "x$has_space" != x; then
17039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17041      fi
17042      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17043    fi
17044  fi
17045
17046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17049  # "foo.exe" is OK but "foo" is an error.
17050  #
17051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17052  # It is also a way to make sure we got the proper file name for the real test later on.
17053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17054  if test "x$test_shortpath" = x; then
17055    # Short path failed, file does not exist as specified.
17056    # Try adding .exe or .cmd
17057    if test -f "${new_path}.exe"; then
17058       input_to_shortpath="${new_path}.exe"
17059    elif test -f "${new_path}.cmd"; then
17060       input_to_shortpath="${new_path}.cmd"
17061    else
17062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17063$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17066      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17067    fi
17068  else
17069    input_to_shortpath="$new_path"
17070  fi
17071
17072  # Call helper function which possibly converts this using DOS-style short mode.
17073  # If so, the updated path is stored in $new_path.
17074  new_path="$input_to_shortpath"
17075
17076  input_path="$input_to_shortpath"
17077  # Check if we need to convert this using DOS-style short mode. If the path
17078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17079  # take no chances and rewrite it.
17080  # Note: m4 eats our [], so we need to use [ and ] instead.
17081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17082  if test "x$has_forbidden_chars" != x; then
17083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17087      # Going to short mode and back again did indeed matter. Since short mode is
17088      # case insensitive, let's make it lowercase to improve readability.
17089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17090      # Now convert it back to Unix-stile (cygpath)
17091      input_path=`$CYGPATH -u "$shortmode_path"`
17092      new_path="$input_path"
17093    fi
17094  fi
17095
17096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17097  if test "x$test_cygdrive_prefix" = x; then
17098    # As a simple fix, exclude /usr/bin since it's not a real path.
17099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17101      # a path prefixed by /cygdrive for fixpath to work.
17102      new_path="$CYGWIN_ROOT_PATH$input_path"
17103    fi
17104  fi
17105
17106  # remove trailing .exe if any
17107  new_path="${new_path/%.exe/}"
17108
17109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17110
17111  # First separate the path from the arguments. This will split at the first
17112  # space.
17113  complete="$BUILD_CXX"
17114  path="${complete%% *}"
17115  tmp="$complete EOL"
17116  arguments="${tmp#* }"
17117
17118  # Input might be given as Windows format, start by converting to
17119  # unix format.
17120  new_path="$path"
17121
17122  windows_path="$new_path"
17123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17124    unix_path=`$CYGPATH -u "$windows_path"`
17125    new_path="$unix_path"
17126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17128    new_path="$unix_path"
17129  fi
17130
17131
17132  # Now try to locate executable using which
17133  new_path=`$WHICH "$new_path" 2> /dev/null`
17134
17135  if test "x$new_path" = x; then
17136    # Oops. Which didn't find the executable.
17137    # The splitting of arguments from the executable at a space might have been incorrect,
17138    # since paths with space are more likely in Windows. Give it another try with the whole
17139    # argument.
17140    path="$complete"
17141    arguments="EOL"
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    new_path=`$WHICH "$new_path" 2> /dev/null`
17155
17156    if test "x$new_path" = x; then
17157      # It's still not found. Now this is an unrecoverable error.
17158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17159$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17160      has_space=`$ECHO "$complete" | $GREP " "`
17161      if test "x$has_space" != x; then
17162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17164      fi
17165      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17166    fi
17167  fi
17168
17169  # Now new_path has a complete unix path to the binary
17170  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17171    # Keep paths in /bin as-is, but remove trailing .exe if any
17172    new_path="${new_path/%.exe/}"
17173    # Do not save /bin paths to all_fixpath_prefixes!
17174  else
17175    # Not in mixed or Windows style, start by that.
17176    new_path=`cmd //c echo $new_path`
17177
17178  input_path="$new_path"
17179  # Check if we need to convert this using DOS-style short mode. If the path
17180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17181  # take no chances and rewrite it.
17182  # Note: m4 eats our [], so we need to use [ and ] instead.
17183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17184  if test "x$has_forbidden_chars" != x; then
17185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17187  fi
17188
17189    # Output is in $new_path
17190
17191  windows_path="$new_path"
17192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17193    unix_path=`$CYGPATH -u "$windows_path"`
17194    new_path="$unix_path"
17195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17197    new_path="$unix_path"
17198  fi
17199
17200    # remove trailing .exe if any
17201    new_path="${new_path/%.exe/}"
17202
17203    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17204    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17205  fi
17206
17207  else
17208    # We're on a posix platform. Hooray! :)
17209    # First separate the path from the arguments. This will split at the first
17210    # space.
17211    complete="$BUILD_CXX"
17212    path="${complete%% *}"
17213    tmp="$complete EOL"
17214    arguments="${tmp#* }"
17215
17216    new_path=`$WHICH $path 2> /dev/null`
17217    if test "x$new_path" = x; then
17218      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17219      if test "x$is_absolute_path" != x; then
17220        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17221$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17222        new_path="$path"
17223      else
17224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17225$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17226        has_space=`$ECHO "$complete" | $GREP " "`
17227        if test "x$has_space" != x; then
17228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17230        fi
17231        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17232      fi
17233    fi
17234  fi
17235
17236  # Now join together the path and the arguments once again
17237  if test "x$arguments" != xEOL; then
17238      new_complete="$new_path ${arguments% *}"
17239  else
17240      new_complete="$new_path"
17241  fi
17242
17243  if test "x$complete" != "x$new_complete"; then
17244    BUILD_CXX="$new_complete"
17245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17246$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17247  fi
17248
17249    # Extract the first word of "ld", so it can be a program name with args.
17250set dummy ld; ac_word=$2
17251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17252$as_echo_n "checking for $ac_word... " >&6; }
17253if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17254  $as_echo_n "(cached) " >&6
17255else
17256  case $BUILD_LD in
17257  [\\/]* | ?:[\\/]*)
17258  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17259  ;;
17260  *)
17261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17262for as_dir in $PATH
17263do
17264  IFS=$as_save_IFS
17265  test -z "$as_dir" && as_dir=.
17266    for ac_exec_ext in '' $ac_executable_extensions; do
17267  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17268    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17270    break 2
17271  fi
17272done
17273  done
17274IFS=$as_save_IFS
17275
17276  ;;
17277esac
17278fi
17279BUILD_LD=$ac_cv_path_BUILD_LD
17280if test -n "$BUILD_LD"; then
17281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17282$as_echo "$BUILD_LD" >&6; }
17283else
17284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17285$as_echo "no" >&6; }
17286fi
17287
17288
17289
17290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17291
17292  # First separate the path from the arguments. This will split at the first
17293  # space.
17294  complete="$BUILD_LD"
17295  path="${complete%% *}"
17296  tmp="$complete EOL"
17297  arguments="${tmp#* }"
17298
17299  # Input might be given as Windows format, start by converting to
17300  # unix format.
17301  new_path=`$CYGPATH -u "$path"`
17302
17303  # Now try to locate executable using which
17304  new_path=`$WHICH "$new_path" 2> /dev/null`
17305  # bat and cmd files are not always considered executable in cygwin causing which
17306  # to not find them
17307  if test "x$new_path" = x \
17308           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17309           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17310    new_path=`$CYGPATH -u "$path"`
17311  fi
17312  if test "x$new_path" = x; then
17313    # Oops. Which didn't find the executable.
17314    # The splitting of arguments from the executable at a space might have been incorrect,
17315    # since paths with space are more likely in Windows. Give it another try with the whole
17316    # argument.
17317    path="$complete"
17318    arguments="EOL"
17319    new_path=`$CYGPATH -u "$path"`
17320    new_path=`$WHICH "$new_path" 2> /dev/null`
17321    # bat and cmd files are not always considered executable in cygwin causing which
17322    # to not find them
17323    if test "x$new_path" = x \
17324             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17325             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17326      new_path=`$CYGPATH -u "$path"`
17327    fi
17328    if test "x$new_path" = x; then
17329      # It's still not found. Now this is an unrecoverable error.
17330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17331$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17332      has_space=`$ECHO "$complete" | $GREP " "`
17333      if test "x$has_space" != x; then
17334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17336      fi
17337      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17338    fi
17339  fi
17340
17341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17344  # "foo.exe" is OK but "foo" is an error.
17345  #
17346  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17347  # It is also a way to make sure we got the proper file name for the real test later on.
17348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17349  if test "x$test_shortpath" = x; then
17350    # Short path failed, file does not exist as specified.
17351    # Try adding .exe or .cmd
17352    if test -f "${new_path}.exe"; then
17353       input_to_shortpath="${new_path}.exe"
17354    elif test -f "${new_path}.cmd"; then
17355       input_to_shortpath="${new_path}.cmd"
17356    else
17357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17358$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17361      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17362    fi
17363  else
17364    input_to_shortpath="$new_path"
17365  fi
17366
17367  # Call helper function which possibly converts this using DOS-style short mode.
17368  # If so, the updated path is stored in $new_path.
17369  new_path="$input_to_shortpath"
17370
17371  input_path="$input_to_shortpath"
17372  # Check if we need to convert this using DOS-style short mode. If the path
17373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17374  # take no chances and rewrite it.
17375  # Note: m4 eats our [], so we need to use [ and ] instead.
17376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17377  if test "x$has_forbidden_chars" != x; then
17378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17382      # Going to short mode and back again did indeed matter. Since short mode is
17383      # case insensitive, let's make it lowercase to improve readability.
17384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17385      # Now convert it back to Unix-stile (cygpath)
17386      input_path=`$CYGPATH -u "$shortmode_path"`
17387      new_path="$input_path"
17388    fi
17389  fi
17390
17391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17392  if test "x$test_cygdrive_prefix" = x; then
17393    # As a simple fix, exclude /usr/bin since it's not a real path.
17394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17396      # a path prefixed by /cygdrive for fixpath to work.
17397      new_path="$CYGWIN_ROOT_PATH$input_path"
17398    fi
17399  fi
17400
17401  # remove trailing .exe if any
17402  new_path="${new_path/%.exe/}"
17403
17404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17405
17406  # First separate the path from the arguments. This will split at the first
17407  # space.
17408  complete="$BUILD_LD"
17409  path="${complete%% *}"
17410  tmp="$complete EOL"
17411  arguments="${tmp#* }"
17412
17413  # Input might be given as Windows format, start by converting to
17414  # unix format.
17415  new_path="$path"
17416
17417  windows_path="$new_path"
17418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17419    unix_path=`$CYGPATH -u "$windows_path"`
17420    new_path="$unix_path"
17421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17423    new_path="$unix_path"
17424  fi
17425
17426
17427  # Now try to locate executable using which
17428  new_path=`$WHICH "$new_path" 2> /dev/null`
17429
17430  if test "x$new_path" = x; then
17431    # Oops. Which didn't find the executable.
17432    # The splitting of arguments from the executable at a space might have been incorrect,
17433    # since paths with space are more likely in Windows. Give it another try with the whole
17434    # argument.
17435    path="$complete"
17436    arguments="EOL"
17437    new_path="$path"
17438
17439  windows_path="$new_path"
17440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17441    unix_path=`$CYGPATH -u "$windows_path"`
17442    new_path="$unix_path"
17443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17445    new_path="$unix_path"
17446  fi
17447
17448
17449    new_path=`$WHICH "$new_path" 2> /dev/null`
17450
17451    if test "x$new_path" = x; then
17452      # It's still not found. Now this is an unrecoverable error.
17453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17454$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17455      has_space=`$ECHO "$complete" | $GREP " "`
17456      if test "x$has_space" != x; then
17457        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17458$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17459      fi
17460      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17461    fi
17462  fi
17463
17464  # Now new_path has a complete unix path to the binary
17465  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17466    # Keep paths in /bin as-is, but remove trailing .exe if any
17467    new_path="${new_path/%.exe/}"
17468    # Do not save /bin paths to all_fixpath_prefixes!
17469  else
17470    # Not in mixed or Windows style, start by that.
17471    new_path=`cmd //c echo $new_path`
17472
17473  input_path="$new_path"
17474  # Check if we need to convert this using DOS-style short mode. If the path
17475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17476  # take no chances and rewrite it.
17477  # Note: m4 eats our [], so we need to use [ and ] instead.
17478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17479  if test "x$has_forbidden_chars" != x; then
17480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17481    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17482  fi
17483
17484    # Output is in $new_path
17485
17486  windows_path="$new_path"
17487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17488    unix_path=`$CYGPATH -u "$windows_path"`
17489    new_path="$unix_path"
17490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17492    new_path="$unix_path"
17493  fi
17494
17495    # remove trailing .exe if any
17496    new_path="${new_path/%.exe/}"
17497
17498    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17499    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17500  fi
17501
17502  else
17503    # We're on a posix platform. Hooray! :)
17504    # First separate the path from the arguments. This will split at the first
17505    # space.
17506    complete="$BUILD_LD"
17507    path="${complete%% *}"
17508    tmp="$complete EOL"
17509    arguments="${tmp#* }"
17510
17511    new_path=`$WHICH $path 2> /dev/null`
17512    if test "x$new_path" = x; then
17513      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17514      if test "x$is_absolute_path" != x; then
17515        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17516$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17517        new_path="$path"
17518      else
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17520$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17521        has_space=`$ECHO "$complete" | $GREP " "`
17522        if test "x$has_space" != x; then
17523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17525        fi
17526        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17527      fi
17528    fi
17529  fi
17530
17531  # Now join together the path and the arguments once again
17532  if test "x$arguments" != xEOL; then
17533      new_complete="$new_path ${arguments% *}"
17534  else
17535      new_complete="$new_path"
17536  fi
17537
17538  if test "x$complete" != "x$new_complete"; then
17539    BUILD_LD="$new_complete"
17540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17541$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17542  fi
17543
17544fi
17545
17546
17547
17548
17549# If a devkit is found on the builddeps server, then prepend its path to the
17550# PATH variable. If there are cross compilers available in the devkit, these
17551# will be found by AC_PROG_CC et al.
17552DEVKIT=
17553
17554
17555    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17556        # Source the builddeps file again, to make sure it uses the latest variables!
17557        . $builddepsfile
17558        # Look for a target and build machine specific resource!
17559        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17560        if test "x$resource" = x; then
17561            # Ok, lets instead look for a target specific resource
17562            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17563        fi
17564        if test "x$resource" = x; then
17565            # Ok, lets instead look for a build specific resource
17566            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17567        fi
17568        if test "x$resource" = x; then
17569            # Ok, lets instead look for a generic resource
17570            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17571            resource=${builddep_devkit}
17572        fi
17573        if test "x$resource" != x; then
17574            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17575$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17576	    # If the resource in the builddeps.conf file is an existing directory,
17577	    # for example /java/linux/cups
17578	    if test -d ${resource}; then
17579	       depdir=${resource}
17580	    else
17581
17582# devkit is for example mymodule
17583# $resource is for example libs/general/libmymod_1_2_3.zip
17584# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17585# $with_builddeps_dir is for example /localhome/builddeps
17586# depdir is the name of the variable into which we store the depdir, eg MYMOD
17587# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17588# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17589    filename=`basename $resource`
17590    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17591    filebase=${filename%%.*}
17592    extension=${filename#*.}
17593    installdir=$with_builddeps_dir/$filebase
17594    if test ! -f $installdir/$filename.unpacked; then
17595        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17596$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17597        if test ! -d $installdir; then
17598            mkdir -p $installdir
17599        fi
17600        if test ! -d $installdir; then
17601            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17602        fi
17603        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17604        touch $tmpfile
17605        if test ! -f $tmpfile; then
17606            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17607        fi
17608
17609    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17610    # $tmpfile is the local file name for the downloaded file.
17611    VALID_TOOL=no
17612    if test "x$BDEPS_FTP" = xwget; then
17613       VALID_TOOL=yes
17614       wget -O $tmpfile $with_builddeps_server/$resource
17615    fi
17616    if test "x$BDEPS_FTP" = xlftp; then
17617       VALID_TOOL=yes
17618       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17619    fi
17620    if test "x$BDEPS_FTP" = xftp; then
17621        VALID_TOOL=yes
17622        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17623        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17624        FTPUSERPWD=${FTPSERVER%%@*}
17625        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17626            FTPUSER=${userpwd%%:*}
17627            FTPPWD=${userpwd#*@}
17628            FTPSERVER=${FTPSERVER#*@}
17629        else
17630            FTPUSER=ftp
17631            FTPPWD=ftp
17632        fi
17633        # the "pass" command does not work on some
17634        # ftp clients (read ftp.exe) but if it works,
17635        # passive mode is better!
17636        (\
17637            echo "user $FTPUSER $FTPPWD"        ;\
17638            echo "pass"                         ;\
17639            echo "bin"                          ;\
17640            echo "get $FTPPATH $tmpfile"              ;\
17641        ) | ftp -in $FTPSERVER
17642    fi
17643    if test "x$VALID_TOOL" != xyes; then
17644       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17645    fi
17646
17647        mv $tmpfile $installdir/$filename
17648        if test ! -s $installdir/$filename; then
17649            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17650        fi
17651        case "$extension" in
17652            zip)  echo "Unzipping $installdir/$filename..."
17653               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17654            ;;
17655            tar.gz) echo "Untaring $installdir/$filename..."
17656               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17657            ;;
17658            tgz) echo "Untaring $installdir/$filename..."
17659               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17660            ;;
17661            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17662            ;;
17663        esac
17664    fi
17665    if test -f $installdir/$filename.unpacked; then
17666        depdir=$installdir
17667    fi
17668
17669	    fi
17670            # Source the builddeps file again, because in the previous command, the depdir
17671            # was updated to point at the current build dependency install directory.
17672            . $builddepsfile
17673            # Now extract variables from the builddeps.conf files.
17674            theroot=${builddep_devkit_ROOT}
17675            thecflags=${builddep_devkit_CFLAGS}
17676            thelibs=${builddep_devkit_LIBS}
17677            if test "x$depdir" = x; then
17678                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17679            fi
17680            DEVKIT=$depdir
17681            if test "x$theroot" != x; then
17682               DEVKIT="$theroot"
17683            fi
17684            if test "x$thecflags" != x; then
17685               DEVKIT_CFLAGS="$thecflags"
17686            fi
17687            if test "x$thelibs" != x; then
17688               DEVKIT_LIBS="$thelibs"
17689            fi
17690            # Found devkit
17691                     PATH="$DEVKIT/bin:$PATH"
17692                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17693                     if test "x$x_includes" = "xNONE"; then
17694                         x_includes="$SYS_ROOT/usr/include/X11"
17695                     fi
17696                     if test "x$x_libraries" = "xNONE"; then
17697                         x_libraries="$SYS_ROOT/usr/lib"
17698                     fi
17699
17700
17701        fi
17702
17703    fi
17704
17705
17706if test "x$SYS_ROOT" != "x/" ; then
17707    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17708    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17709    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17710    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17711    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17712    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17713fi
17714
17715# Store the CFLAGS etal passed to the configure script.
17716ORG_CFLAGS="$CFLAGS"
17717ORG_CXXFLAGS="$CXXFLAGS"
17718ORG_OBJCFLAGS="$OBJCFLAGS"
17719
17720# autoconf magic only relies on PATH, so update it if tools dir is specified
17721OLD_PATH="$PATH"
17722if test "x$TOOLS_DIR" != x; then
17723  PATH=$TOOLS_DIR:$PATH
17724fi
17725
17726
17727### Locate C compiler (CC)
17728
17729# gcc is almost always present, but on Windows we
17730# prefer cl.exe and on Solaris we prefer CC.
17731# Thus test for them in this order.
17732if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17733  # Do not probe for cc on MacOSX.
17734  COMPILER_CHECK_LIST="cl gcc"
17735else
17736  COMPILER_CHECK_LIST="cl cc gcc"
17737fi
17738
17739
17740  COMPILER_NAME=C
17741
17742  # Do a first initial attempt at searching the list of compiler names.
17743  # AC_PATH_PROGS can't be run multiple times with the same variable,
17744  # so create a new name for this run.
17745  for ac_prog in $COMPILER_CHECK_LIST
17746do
17747  # Extract the first word of "$ac_prog", so it can be a program name with args.
17748set dummy $ac_prog; ac_word=$2
17749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17750$as_echo_n "checking for $ac_word... " >&6; }
17751if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17752  $as_echo_n "(cached) " >&6
17753else
17754  case $POTENTIAL_CC in
17755  [\\/]* | ?:[\\/]*)
17756  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17757  ;;
17758  *)
17759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17760for as_dir in $PATH
17761do
17762  IFS=$as_save_IFS
17763  test -z "$as_dir" && as_dir=.
17764    for ac_exec_ext in '' $ac_executable_extensions; do
17765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17766    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17768    break 2
17769  fi
17770done
17771  done
17772IFS=$as_save_IFS
17773
17774  ;;
17775esac
17776fi
17777POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17778if test -n "$POTENTIAL_CC"; then
17779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17780$as_echo "$POTENTIAL_CC" >&6; }
17781else
17782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17783$as_echo "no" >&6; }
17784fi
17785
17786
17787  test -n "$POTENTIAL_CC" && break
17788done
17789
17790  CC=$POTENTIAL_CC
17791
17792  if test "x$$CC" = x; then
17793
17794    # Print a helpful message on how to acquire the necessary build dependency.
17795    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17796    MISSING_DEPENDENCY=devkit
17797    PKGHANDLER_COMMAND=
17798
17799    case $PKGHANDLER in
17800	apt-get)
17801                apt_help     $MISSING_DEPENDENCY ;;
17802    yum)
17803                yum_help     $MISSING_DEPENDENCY ;;
17804	port)
17805                port_help    $MISSING_DEPENDENCY ;;
17806	pkgutil)
17807                pkgutil_help $MISSING_DEPENDENCY ;;
17808	pkgadd)
17809                pkgadd_help  $MISSING_DEPENDENCY ;;
17810    * )
17811      break ;;
17812    esac
17813
17814    if test "x$PKGHANDLER_COMMAND" != x; then
17815        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17816    fi
17817
17818      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17819  fi
17820
17821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17822
17823  # First separate the path from the arguments. This will split at the first
17824  # space.
17825  complete="$CC"
17826  path="${complete%% *}"
17827  tmp="$complete EOL"
17828  arguments="${tmp#* }"
17829
17830  # Input might be given as Windows format, start by converting to
17831  # unix format.
17832  new_path=`$CYGPATH -u "$path"`
17833
17834  # Now try to locate executable using which
17835  new_path=`$WHICH "$new_path" 2> /dev/null`
17836  # bat and cmd files are not always considered executable in cygwin causing which
17837  # to not find them
17838  if test "x$new_path" = x \
17839           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17840           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17841    new_path=`$CYGPATH -u "$path"`
17842  fi
17843  if test "x$new_path" = x; then
17844    # Oops. Which didn't find the executable.
17845    # The splitting of arguments from the executable at a space might have been incorrect,
17846    # since paths with space are more likely in Windows. Give it another try with the whole
17847    # argument.
17848    path="$complete"
17849    arguments="EOL"
17850    new_path=`$CYGPATH -u "$path"`
17851    new_path=`$WHICH "$new_path" 2> /dev/null`
17852    # bat and cmd files are not always considered executable in cygwin causing which
17853    # to not find them
17854    if test "x$new_path" = x \
17855             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17856             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17857      new_path=`$CYGPATH -u "$path"`
17858    fi
17859    if test "x$new_path" = x; then
17860      # It's still not found. Now this is an unrecoverable error.
17861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17862$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17863      has_space=`$ECHO "$complete" | $GREP " "`
17864      if test "x$has_space" != x; then
17865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17867      fi
17868      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17869    fi
17870  fi
17871
17872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17875  # "foo.exe" is OK but "foo" is an error.
17876  #
17877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17878  # It is also a way to make sure we got the proper file name for the real test later on.
17879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17880  if test "x$test_shortpath" = x; then
17881    # Short path failed, file does not exist as specified.
17882    # Try adding .exe or .cmd
17883    if test -f "${new_path}.exe"; then
17884       input_to_shortpath="${new_path}.exe"
17885    elif test -f "${new_path}.cmd"; then
17886       input_to_shortpath="${new_path}.cmd"
17887    else
17888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17889$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17890      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17891$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17892      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17893    fi
17894  else
17895    input_to_shortpath="$new_path"
17896  fi
17897
17898  # Call helper function which possibly converts this using DOS-style short mode.
17899  # If so, the updated path is stored in $new_path.
17900  new_path="$input_to_shortpath"
17901
17902  input_path="$input_to_shortpath"
17903  # Check if we need to convert this using DOS-style short mode. If the path
17904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17905  # take no chances and rewrite it.
17906  # Note: m4 eats our [], so we need to use [ and ] instead.
17907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17908  if test "x$has_forbidden_chars" != x; then
17909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17913      # Going to short mode and back again did indeed matter. Since short mode is
17914      # case insensitive, let's make it lowercase to improve readability.
17915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17916      # Now convert it back to Unix-stile (cygpath)
17917      input_path=`$CYGPATH -u "$shortmode_path"`
17918      new_path="$input_path"
17919    fi
17920  fi
17921
17922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17923  if test "x$test_cygdrive_prefix" = x; then
17924    # As a simple fix, exclude /usr/bin since it's not a real path.
17925    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17927      # a path prefixed by /cygdrive for fixpath to work.
17928      new_path="$CYGWIN_ROOT_PATH$input_path"
17929    fi
17930  fi
17931
17932  # remove trailing .exe if any
17933  new_path="${new_path/%.exe/}"
17934
17935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17936
17937  # First separate the path from the arguments. This will split at the first
17938  # space.
17939  complete="$CC"
17940  path="${complete%% *}"
17941  tmp="$complete EOL"
17942  arguments="${tmp#* }"
17943
17944  # Input might be given as Windows format, start by converting to
17945  # unix format.
17946  new_path="$path"
17947
17948  windows_path="$new_path"
17949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950    unix_path=`$CYGPATH -u "$windows_path"`
17951    new_path="$unix_path"
17952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17954    new_path="$unix_path"
17955  fi
17956
17957
17958  # Now try to locate executable using which
17959  new_path=`$WHICH "$new_path" 2> /dev/null`
17960
17961  if test "x$new_path" = x; then
17962    # Oops. Which didn't find the executable.
17963    # The splitting of arguments from the executable at a space might have been incorrect,
17964    # since paths with space are more likely in Windows. Give it another try with the whole
17965    # argument.
17966    path="$complete"
17967    arguments="EOL"
17968    new_path="$path"
17969
17970  windows_path="$new_path"
17971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17972    unix_path=`$CYGPATH -u "$windows_path"`
17973    new_path="$unix_path"
17974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17976    new_path="$unix_path"
17977  fi
17978
17979
17980    new_path=`$WHICH "$new_path" 2> /dev/null`
17981
17982    if test "x$new_path" = x; then
17983      # It's still not found. Now this is an unrecoverable error.
17984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17985$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17986      has_space=`$ECHO "$complete" | $GREP " "`
17987      if test "x$has_space" != x; then
17988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17990      fi
17991      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17992    fi
17993  fi
17994
17995  # Now new_path has a complete unix path to the binary
17996  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17997    # Keep paths in /bin as-is, but remove trailing .exe if any
17998    new_path="${new_path/%.exe/}"
17999    # Do not save /bin paths to all_fixpath_prefixes!
18000  else
18001    # Not in mixed or Windows style, start by that.
18002    new_path=`cmd //c echo $new_path`
18003
18004  input_path="$new_path"
18005  # Check if we need to convert this using DOS-style short mode. If the path
18006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18007  # take no chances and rewrite it.
18008  # Note: m4 eats our [], so we need to use [ and ] instead.
18009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18010  if test "x$has_forbidden_chars" != x; then
18011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18013  fi
18014
18015    # Output is in $new_path
18016
18017  windows_path="$new_path"
18018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18019    unix_path=`$CYGPATH -u "$windows_path"`
18020    new_path="$unix_path"
18021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18023    new_path="$unix_path"
18024  fi
18025
18026    # remove trailing .exe if any
18027    new_path="${new_path/%.exe/}"
18028
18029    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18030    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18031  fi
18032
18033  else
18034    # We're on a posix platform. Hooray! :)
18035    # First separate the path from the arguments. This will split at the first
18036    # space.
18037    complete="$CC"
18038    path="${complete%% *}"
18039    tmp="$complete EOL"
18040    arguments="${tmp#* }"
18041
18042    new_path=`$WHICH $path 2> /dev/null`
18043    if test "x$new_path" = x; then
18044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18045      if test "x$is_absolute_path" != x; then
18046        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
18047$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
18048        new_path="$path"
18049      else
18050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18052        has_space=`$ECHO "$complete" | $GREP " "`
18053        if test "x$has_space" != x; then
18054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18056        fi
18057        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18058      fi
18059    fi
18060  fi
18061
18062  # Now join together the path and the arguments once again
18063  if test "x$arguments" != xEOL; then
18064      new_complete="$new_path ${arguments% *}"
18065  else
18066      new_complete="$new_path"
18067  fi
18068
18069  if test "x$complete" != "x$new_complete"; then
18070    CC="$new_complete"
18071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18072$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18073  fi
18074
18075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18076$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18077  TEST_COMPILER="$CC"
18078
18079    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18080        # Follow a chain of symbolic links. Use readlink
18081        # where it exists, else fall back to horribly
18082        # complicated shell code.
18083        if test "x$READLINK_TESTED" != yes; then
18084            # On MacOSX there is a readlink tool with a different
18085            # purpose than the GNU readlink tool. Check the found readlink.
18086            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
18087            if test "x$ISGNU" = x; then
18088                 # A readlink that we do not know how to use.
18089                 # Are there other non-GNU readlinks out there?
18090                 READLINK_TESTED=yes
18091                 READLINK=
18092            fi
18093        fi
18094
18095        if test "x$READLINK" != x; then
18096            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18097        else
18098            STARTDIR=$PWD
18099            COUNTER=0
18100            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18101            sym_link_file=`$BASENAME $TEST_COMPILER`
18102            while test $COUNTER -lt 20; do
18103                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18104                if test "x$ISLINK" == x; then
18105                    # This is not a symbolic link! We are done!
18106                    break
18107                fi
18108                # The link might be relative! We have to use cd to travel safely.
18109                cd $sym_link_dir
18110                # ... and we must get the to the absolute path, not one using symbolic links.
18111                cd `pwd -P`
18112                cd `$DIRNAME $ISLINK`
18113                sym_link_dir=`$THEPWDCMD`
18114                sym_link_file=`$BASENAME $ISLINK`
18115                let COUNTER=COUNTER+1
18116            done
18117            cd $STARTDIR
18118            TEST_COMPILER=$sym_link_dir/$sym_link_file
18119        fi
18120    fi
18121
18122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18123$as_echo "$TEST_COMPILER" >&6; }
18124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18125$as_echo_n "checking if CC is disguised ccache... " >&6; }
18126
18127  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18128  if test "x$COMPILER_BASENAME" = "xccache"; then
18129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18130$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18131    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18132    # We want to control ccache invocation ourselves, so ignore this cc and try
18133    # searching again.
18134
18135    # Remove the path to the fake ccache cc from the PATH
18136    RETRY_COMPILER_SAVED_PATH="$PATH"
18137    COMPILER_DIRNAME=`$DIRNAME $CC`
18138    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18139
18140    # Try again looking for our compiler
18141    if test -n "$ac_tool_prefix"; then
18142  for ac_prog in $COMPILER_CHECK_LIST
18143  do
18144    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18147$as_echo_n "checking for $ac_word... " >&6; }
18148if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18149  $as_echo_n "(cached) " >&6
18150else
18151  if test -n "$PROPER_COMPILER_CC"; then
18152  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18153else
18154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18161    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169fi
18170fi
18171PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18172if test -n "$PROPER_COMPILER_CC"; then
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18174$as_echo "$PROPER_COMPILER_CC" >&6; }
18175else
18176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18177$as_echo "no" >&6; }
18178fi
18179
18180
18181    test -n "$PROPER_COMPILER_CC" && break
18182  done
18183fi
18184if test -z "$PROPER_COMPILER_CC"; then
18185  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18186  for ac_prog in $COMPILER_CHECK_LIST
18187do
18188  # Extract the first word of "$ac_prog", so it can be a program name with args.
18189set dummy $ac_prog; ac_word=$2
18190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18191$as_echo_n "checking for $ac_word... " >&6; }
18192if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18193  $as_echo_n "(cached) " >&6
18194else
18195  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18196  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18197else
18198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18199for as_dir in $PATH
18200do
18201  IFS=$as_save_IFS
18202  test -z "$as_dir" && as_dir=.
18203    for ac_exec_ext in '' $ac_executable_extensions; do
18204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18205    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18207    break 2
18208  fi
18209done
18210  done
18211IFS=$as_save_IFS
18212
18213fi
18214fi
18215ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18216if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18218$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18219else
18220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18221$as_echo "no" >&6; }
18222fi
18223
18224
18225  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18226done
18227
18228  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18229    PROPER_COMPILER_CC=""
18230  else
18231    case $cross_compiling:$ac_tool_warned in
18232yes:)
18233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18235ac_tool_warned=yes ;;
18236esac
18237    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18238  fi
18239fi
18240
18241
18242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18243
18244  # First separate the path from the arguments. This will split at the first
18245  # space.
18246  complete="$PROPER_COMPILER_CC"
18247  path="${complete%% *}"
18248  tmp="$complete EOL"
18249  arguments="${tmp#* }"
18250
18251  # Input might be given as Windows format, start by converting to
18252  # unix format.
18253  new_path=`$CYGPATH -u "$path"`
18254
18255  # Now try to locate executable using which
18256  new_path=`$WHICH "$new_path" 2> /dev/null`
18257  # bat and cmd files are not always considered executable in cygwin causing which
18258  # to not find them
18259  if test "x$new_path" = x \
18260           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18261           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18262    new_path=`$CYGPATH -u "$path"`
18263  fi
18264  if test "x$new_path" = x; then
18265    # Oops. Which didn't find the executable.
18266    # The splitting of arguments from the executable at a space might have been incorrect,
18267    # since paths with space are more likely in Windows. Give it another try with the whole
18268    # argument.
18269    path="$complete"
18270    arguments="EOL"
18271    new_path=`$CYGPATH -u "$path"`
18272    new_path=`$WHICH "$new_path" 2> /dev/null`
18273    # bat and cmd files are not always considered executable in cygwin causing which
18274    # to not find them
18275    if test "x$new_path" = x \
18276             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18277             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18278      new_path=`$CYGPATH -u "$path"`
18279    fi
18280    if test "x$new_path" = x; then
18281      # It's still not found. Now this is an unrecoverable error.
18282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18283$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18284      has_space=`$ECHO "$complete" | $GREP " "`
18285      if test "x$has_space" != x; then
18286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18288      fi
18289      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18290    fi
18291  fi
18292
18293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18296  # "foo.exe" is OK but "foo" is an error.
18297  #
18298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18299  # It is also a way to make sure we got the proper file name for the real test later on.
18300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18301  if test "x$test_shortpath" = x; then
18302    # Short path failed, file does not exist as specified.
18303    # Try adding .exe or .cmd
18304    if test -f "${new_path}.exe"; then
18305       input_to_shortpath="${new_path}.exe"
18306    elif test -f "${new_path}.cmd"; then
18307       input_to_shortpath="${new_path}.cmd"
18308    else
18309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18310$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18313      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18314    fi
18315  else
18316    input_to_shortpath="$new_path"
18317  fi
18318
18319  # Call helper function which possibly converts this using DOS-style short mode.
18320  # If so, the updated path is stored in $new_path.
18321  new_path="$input_to_shortpath"
18322
18323  input_path="$input_to_shortpath"
18324  # Check if we need to convert this using DOS-style short mode. If the path
18325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18326  # take no chances and rewrite it.
18327  # Note: m4 eats our [], so we need to use [ and ] instead.
18328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18329  if test "x$has_forbidden_chars" != x; then
18330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18334      # Going to short mode and back again did indeed matter. Since short mode is
18335      # case insensitive, let's make it lowercase to improve readability.
18336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18337      # Now convert it back to Unix-stile (cygpath)
18338      input_path=`$CYGPATH -u "$shortmode_path"`
18339      new_path="$input_path"
18340    fi
18341  fi
18342
18343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18344  if test "x$test_cygdrive_prefix" = x; then
18345    # As a simple fix, exclude /usr/bin since it's not a real path.
18346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18348      # a path prefixed by /cygdrive for fixpath to work.
18349      new_path="$CYGWIN_ROOT_PATH$input_path"
18350    fi
18351  fi
18352
18353  # remove trailing .exe if any
18354  new_path="${new_path/%.exe/}"
18355
18356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18357
18358  # First separate the path from the arguments. This will split at the first
18359  # space.
18360  complete="$PROPER_COMPILER_CC"
18361  path="${complete%% *}"
18362  tmp="$complete EOL"
18363  arguments="${tmp#* }"
18364
18365  # Input might be given as Windows format, start by converting to
18366  # unix format.
18367  new_path="$path"
18368
18369  windows_path="$new_path"
18370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18371    unix_path=`$CYGPATH -u "$windows_path"`
18372    new_path="$unix_path"
18373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18375    new_path="$unix_path"
18376  fi
18377
18378
18379  # Now try to locate executable using which
18380  new_path=`$WHICH "$new_path" 2> /dev/null`
18381
18382  if test "x$new_path" = x; then
18383    # Oops. Which didn't find the executable.
18384    # The splitting of arguments from the executable at a space might have been incorrect,
18385    # since paths with space are more likely in Windows. Give it another try with the whole
18386    # argument.
18387    path="$complete"
18388    arguments="EOL"
18389    new_path="$path"
18390
18391  windows_path="$new_path"
18392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18393    unix_path=`$CYGPATH -u "$windows_path"`
18394    new_path="$unix_path"
18395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18397    new_path="$unix_path"
18398  fi
18399
18400
18401    new_path=`$WHICH "$new_path" 2> /dev/null`
18402
18403    if test "x$new_path" = x; then
18404      # It's still not found. Now this is an unrecoverable error.
18405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18406$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18407      has_space=`$ECHO "$complete" | $GREP " "`
18408      if test "x$has_space" != x; then
18409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18411      fi
18412      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18413    fi
18414  fi
18415
18416  # Now new_path has a complete unix path to the binary
18417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18418    # Keep paths in /bin as-is, but remove trailing .exe if any
18419    new_path="${new_path/%.exe/}"
18420    # Do not save /bin paths to all_fixpath_prefixes!
18421  else
18422    # Not in mixed or Windows style, start by that.
18423    new_path=`cmd //c echo $new_path`
18424
18425  input_path="$new_path"
18426  # Check if we need to convert this using DOS-style short mode. If the path
18427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18428  # take no chances and rewrite it.
18429  # Note: m4 eats our [], so we need to use [ and ] instead.
18430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18431  if test "x$has_forbidden_chars" != x; then
18432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18434  fi
18435
18436    # Output is in $new_path
18437
18438  windows_path="$new_path"
18439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440    unix_path=`$CYGPATH -u "$windows_path"`
18441    new_path="$unix_path"
18442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18444    new_path="$unix_path"
18445  fi
18446
18447    # remove trailing .exe if any
18448    new_path="${new_path/%.exe/}"
18449
18450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18452  fi
18453
18454  else
18455    # We're on a posix platform. Hooray! :)
18456    # First separate the path from the arguments. This will split at the first
18457    # space.
18458    complete="$PROPER_COMPILER_CC"
18459    path="${complete%% *}"
18460    tmp="$complete EOL"
18461    arguments="${tmp#* }"
18462
18463    new_path=`$WHICH $path 2> /dev/null`
18464    if test "x$new_path" = x; then
18465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18466      if test "x$is_absolute_path" != x; then
18467        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18468$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18469        new_path="$path"
18470      else
18471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18472$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18473        has_space=`$ECHO "$complete" | $GREP " "`
18474        if test "x$has_space" != x; then
18475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18477        fi
18478        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18479      fi
18480    fi
18481  fi
18482
18483  # Now join together the path and the arguments once again
18484  if test "x$arguments" != xEOL; then
18485      new_complete="$new_path ${arguments% *}"
18486  else
18487      new_complete="$new_path"
18488  fi
18489
18490  if test "x$complete" != "x$new_complete"; then
18491    PROPER_COMPILER_CC="$new_complete"
18492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18493$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18494  fi
18495
18496    PATH="$RETRY_COMPILER_SAVED_PATH"
18497
18498    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18499$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
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 --help 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            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18519        else
18520            STARTDIR=$PWD
18521            COUNTER=0
18522            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18523            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18524            while test $COUNTER -lt 20; do
18525                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18526                if test "x$ISLINK" == x; then
18527                    # This is not a symbolic link! We are done!
18528                    break
18529                fi
18530                # The link might be relative! We have to use cd to travel safely.
18531                cd $sym_link_dir
18532                # ... and we must get the to the absolute path, not one using symbolic links.
18533                cd `pwd -P`
18534                cd `$DIRNAME $ISLINK`
18535                sym_link_dir=`$THEPWDCMD`
18536                sym_link_file=`$BASENAME $ISLINK`
18537                let COUNTER=COUNTER+1
18538            done
18539            cd $STARTDIR
18540            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18541        fi
18542    fi
18543
18544    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18545$as_echo "$PROPER_COMPILER_CC" >&6; }
18546    CC="$PROPER_COMPILER_CC"
18547  else
18548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18549$as_echo "no, keeping CC" >&6; }
18550    CC="$TEST_COMPILER"
18551  fi
18552
18553  COMPILER=$CC
18554  COMPILER_NAME=$COMPILER_NAME
18555
18556  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18557    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18558    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18559    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18560    if test $? -ne 0; then
18561      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18562
18563      { $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
18564$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18565      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18566$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18567      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18568    else
18569      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18570      COMPILER_VENDOR="Sun Studio"
18571    fi
18572  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18573    # First line typically looks something like:
18574    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18575    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18576    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18577    COMPILER_VENDOR="Microsoft CL.EXE"
18578    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18579    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18580      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18581        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18582      fi
18583    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18584      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18585        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18586      fi
18587    fi
18588  else
18589    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18590    # Check that this is likely to be GCC.
18591    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18592    if test $? -ne 0; then
18593      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18594$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18595      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18596$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18597      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18598    fi
18599
18600    # First line typically looks something like:
18601    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18602    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18603    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18604  fi
18605  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18606  CC_VERSION="$COMPILER_VERSION"
18607  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18608  CC_VENDOR="$COMPILER_VENDOR"
18609
18610  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18611$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18612
18613
18614# Now that we have resolved CC ourself, let autoconf have it's go at it
18615ac_ext=c
18616ac_cpp='$CPP $CPPFLAGS'
18617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18619ac_compiler_gnu=$ac_cv_c_compiler_gnu
18620if test -n "$ac_tool_prefix"; then
18621  for ac_prog in $CC
18622  do
18623    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18624set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18626$as_echo_n "checking for $ac_word... " >&6; }
18627if test "${ac_cv_prog_CC+set}" = set; then :
18628  $as_echo_n "(cached) " >&6
18629else
18630  if test -n "$CC"; then
18631  ac_cv_prog_CC="$CC" # Let the user override the test.
18632else
18633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18634for as_dir in $PATH
18635do
18636  IFS=$as_save_IFS
18637  test -z "$as_dir" && as_dir=.
18638    for ac_exec_ext in '' $ac_executable_extensions; do
18639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18640    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18642    break 2
18643  fi
18644done
18645  done
18646IFS=$as_save_IFS
18647
18648fi
18649fi
18650CC=$ac_cv_prog_CC
18651if test -n "$CC"; then
18652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18653$as_echo "$CC" >&6; }
18654else
18655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18656$as_echo "no" >&6; }
18657fi
18658
18659
18660    test -n "$CC" && break
18661  done
18662fi
18663if test -z "$CC"; then
18664  ac_ct_CC=$CC
18665  for ac_prog in $CC
18666do
18667  # Extract the first word of "$ac_prog", so it can be a program name with args.
18668set dummy $ac_prog; ac_word=$2
18669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18670$as_echo_n "checking for $ac_word... " >&6; }
18671if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18672  $as_echo_n "(cached) " >&6
18673else
18674  if test -n "$ac_ct_CC"; then
18675  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18676else
18677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18678for as_dir in $PATH
18679do
18680  IFS=$as_save_IFS
18681  test -z "$as_dir" && as_dir=.
18682    for ac_exec_ext in '' $ac_executable_extensions; do
18683  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18684    ac_cv_prog_ac_ct_CC="$ac_prog"
18685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18686    break 2
18687  fi
18688done
18689  done
18690IFS=$as_save_IFS
18691
18692fi
18693fi
18694ac_ct_CC=$ac_cv_prog_ac_ct_CC
18695if test -n "$ac_ct_CC"; then
18696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18697$as_echo "$ac_ct_CC" >&6; }
18698else
18699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18700$as_echo "no" >&6; }
18701fi
18702
18703
18704  test -n "$ac_ct_CC" && break
18705done
18706
18707  if test "x$ac_ct_CC" = x; then
18708    CC=""
18709  else
18710    case $cross_compiling:$ac_tool_warned in
18711yes:)
18712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18714ac_tool_warned=yes ;;
18715esac
18716    CC=$ac_ct_CC
18717  fi
18718fi
18719
18720
18721test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18723as_fn_error $? "no acceptable C compiler found in \$PATH
18724See \`config.log' for more details" "$LINENO" 5 ; }
18725
18726# Provide some information about the compiler.
18727$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18728set X $ac_compile
18729ac_compiler=$2
18730for ac_option in --version -v -V -qversion; do
18731  { { ac_try="$ac_compiler $ac_option >&5"
18732case "(($ac_try" in
18733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18734  *) ac_try_echo=$ac_try;;
18735esac
18736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18737$as_echo "$ac_try_echo"; } >&5
18738  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18739  ac_status=$?
18740  if test -s conftest.err; then
18741    sed '10a\
18742... rest of stderr output deleted ...
18743         10q' conftest.err >conftest.er1
18744    cat conftest.er1 >&5
18745  fi
18746  rm -f conftest.er1 conftest.err
18747  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18748  test $ac_status = 0; }
18749done
18750
18751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752/* end confdefs.h.  */
18753
18754int
18755main ()
18756{
18757
18758  ;
18759  return 0;
18760}
18761_ACEOF
18762ac_clean_files_save=$ac_clean_files
18763ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18764# Try to create an executable without -o first, disregard a.out.
18765# It will help us diagnose broken compilers, and finding out an intuition
18766# of exeext.
18767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18768$as_echo_n "checking whether the C compiler works... " >&6; }
18769ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18770
18771# The possible output files:
18772ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18773
18774ac_rmfiles=
18775for ac_file in $ac_files
18776do
18777  case $ac_file in
18778    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18779    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18780  esac
18781done
18782rm -f $ac_rmfiles
18783
18784if { { ac_try="$ac_link_default"
18785case "(($ac_try" in
18786  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18787  *) ac_try_echo=$ac_try;;
18788esac
18789eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18790$as_echo "$ac_try_echo"; } >&5
18791  (eval "$ac_link_default") 2>&5
18792  ac_status=$?
18793  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18794  test $ac_status = 0; }; then :
18795  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18796# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18797# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18798# so that the user can short-circuit this test for compilers unknown to
18799# Autoconf.
18800for ac_file in $ac_files ''
18801do
18802  test -f "$ac_file" || continue
18803  case $ac_file in
18804    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18805	;;
18806    [ab].out )
18807	# We found the default executable, but exeext='' is most
18808	# certainly right.
18809	break;;
18810    *.* )
18811	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18812	then :; else
18813	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18814	fi
18815	# We set ac_cv_exeext here because the later test for it is not
18816	# safe: cross compilers may not add the suffix if given an `-o'
18817	# argument, so we may need to know it at that point already.
18818	# Even if this section looks crufty: it has the advantage of
18819	# actually working.
18820	break;;
18821    * )
18822	break;;
18823  esac
18824done
18825test "$ac_cv_exeext" = no && ac_cv_exeext=
18826
18827else
18828  ac_file=''
18829fi
18830if test -z "$ac_file"; then :
18831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18832$as_echo "no" >&6; }
18833$as_echo "$as_me: failed program was:" >&5
18834sed 's/^/| /' conftest.$ac_ext >&5
18835
18836{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18838as_fn_error 77 "C compiler cannot create executables
18839See \`config.log' for more details" "$LINENO" 5 ; }
18840else
18841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18842$as_echo "yes" >&6; }
18843fi
18844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18845$as_echo_n "checking for C compiler default output file name... " >&6; }
18846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18847$as_echo "$ac_file" >&6; }
18848ac_exeext=$ac_cv_exeext
18849
18850rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18851ac_clean_files=$ac_clean_files_save
18852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18853$as_echo_n "checking for suffix of executables... " >&6; }
18854if { { ac_try="$ac_link"
18855case "(($ac_try" in
18856  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18857  *) ac_try_echo=$ac_try;;
18858esac
18859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18860$as_echo "$ac_try_echo"; } >&5
18861  (eval "$ac_link") 2>&5
18862  ac_status=$?
18863  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18864  test $ac_status = 0; }; then :
18865  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18866# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18867# work properly (i.e., refer to `conftest.exe'), while it won't with
18868# `rm'.
18869for ac_file in conftest.exe conftest conftest.*; do
18870  test -f "$ac_file" || continue
18871  case $ac_file in
18872    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18873    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18874	  break;;
18875    * ) break;;
18876  esac
18877done
18878else
18879  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18881as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18882See \`config.log' for more details" "$LINENO" 5 ; }
18883fi
18884rm -f conftest conftest$ac_cv_exeext
18885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18886$as_echo "$ac_cv_exeext" >&6; }
18887
18888rm -f conftest.$ac_ext
18889EXEEXT=$ac_cv_exeext
18890ac_exeext=$EXEEXT
18891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18892/* end confdefs.h.  */
18893#include <stdio.h>
18894int
18895main ()
18896{
18897FILE *f = fopen ("conftest.out", "w");
18898 return ferror (f) || fclose (f) != 0;
18899
18900  ;
18901  return 0;
18902}
18903_ACEOF
18904ac_clean_files="$ac_clean_files conftest.out"
18905# Check that the compiler produces executables we can run.  If not, either
18906# the compiler is broken, or we cross compile.
18907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18908$as_echo_n "checking whether we are cross compiling... " >&6; }
18909if test "$cross_compiling" != yes; then
18910  { { ac_try="$ac_link"
18911case "(($ac_try" in
18912  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18913  *) ac_try_echo=$ac_try;;
18914esac
18915eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18916$as_echo "$ac_try_echo"; } >&5
18917  (eval "$ac_link") 2>&5
18918  ac_status=$?
18919  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18920  test $ac_status = 0; }
18921  if { ac_try='./conftest$ac_cv_exeext'
18922  { { case "(($ac_try" in
18923  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18924  *) ac_try_echo=$ac_try;;
18925esac
18926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18927$as_echo "$ac_try_echo"; } >&5
18928  (eval "$ac_try") 2>&5
18929  ac_status=$?
18930  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18931  test $ac_status = 0; }; }; then
18932    cross_compiling=no
18933  else
18934    if test "$cross_compiling" = maybe; then
18935	cross_compiling=yes
18936    else
18937	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18939as_fn_error $? "cannot run C compiled programs.
18940If you meant to cross compile, use \`--host'.
18941See \`config.log' for more details" "$LINENO" 5 ; }
18942    fi
18943  fi
18944fi
18945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18946$as_echo "$cross_compiling" >&6; }
18947
18948rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18949ac_clean_files=$ac_clean_files_save
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18951$as_echo_n "checking for suffix of object files... " >&6; }
18952if test "${ac_cv_objext+set}" = set; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18956/* end confdefs.h.  */
18957
18958int
18959main ()
18960{
18961
18962  ;
18963  return 0;
18964}
18965_ACEOF
18966rm -f conftest.o conftest.obj
18967if { { ac_try="$ac_compile"
18968case "(($ac_try" in
18969  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18970  *) ac_try_echo=$ac_try;;
18971esac
18972eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18973$as_echo "$ac_try_echo"; } >&5
18974  (eval "$ac_compile") 2>&5
18975  ac_status=$?
18976  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18977  test $ac_status = 0; }; then :
18978  for ac_file in conftest.o conftest.obj conftest.*; do
18979  test -f "$ac_file" || continue;
18980  case $ac_file in
18981    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
18982    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
18983       break;;
18984  esac
18985done
18986else
18987  $as_echo "$as_me: failed program was:" >&5
18988sed 's/^/| /' conftest.$ac_ext >&5
18989
18990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18992as_fn_error $? "cannot compute suffix of object files: cannot compile
18993See \`config.log' for more details" "$LINENO" 5 ; }
18994fi
18995rm -f conftest.$ac_cv_objext conftest.$ac_ext
18996fi
18997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
18998$as_echo "$ac_cv_objext" >&6; }
18999OBJEXT=$ac_cv_objext
19000ac_objext=$OBJEXT
19001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19002$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19003if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19004  $as_echo_n "(cached) " >&6
19005else
19006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19007/* end confdefs.h.  */
19008
19009int
19010main ()
19011{
19012#ifndef __GNUC__
19013       choke me
19014#endif
19015
19016  ;
19017  return 0;
19018}
19019_ACEOF
19020if ac_fn_c_try_compile "$LINENO"; then :
19021  ac_compiler_gnu=yes
19022else
19023  ac_compiler_gnu=no
19024fi
19025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19026ac_cv_c_compiler_gnu=$ac_compiler_gnu
19027
19028fi
19029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19030$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19031if test $ac_compiler_gnu = yes; then
19032  GCC=yes
19033else
19034  GCC=
19035fi
19036ac_test_CFLAGS=${CFLAGS+set}
19037ac_save_CFLAGS=$CFLAGS
19038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19039$as_echo_n "checking whether $CC accepts -g... " >&6; }
19040if test "${ac_cv_prog_cc_g+set}" = set; then :
19041  $as_echo_n "(cached) " >&6
19042else
19043  ac_save_c_werror_flag=$ac_c_werror_flag
19044   ac_c_werror_flag=yes
19045   ac_cv_prog_cc_g=no
19046   CFLAGS="-g"
19047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19048/* end confdefs.h.  */
19049
19050int
19051main ()
19052{
19053
19054  ;
19055  return 0;
19056}
19057_ACEOF
19058if ac_fn_c_try_compile "$LINENO"; then :
19059  ac_cv_prog_cc_g=yes
19060else
19061  CFLAGS=""
19062      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19063/* end confdefs.h.  */
19064
19065int
19066main ()
19067{
19068
19069  ;
19070  return 0;
19071}
19072_ACEOF
19073if ac_fn_c_try_compile "$LINENO"; then :
19074
19075else
19076  ac_c_werror_flag=$ac_save_c_werror_flag
19077	 CFLAGS="-g"
19078	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19079/* end confdefs.h.  */
19080
19081int
19082main ()
19083{
19084
19085  ;
19086  return 0;
19087}
19088_ACEOF
19089if ac_fn_c_try_compile "$LINENO"; then :
19090  ac_cv_prog_cc_g=yes
19091fi
19092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19093fi
19094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19095fi
19096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19097   ac_c_werror_flag=$ac_save_c_werror_flag
19098fi
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19100$as_echo "$ac_cv_prog_cc_g" >&6; }
19101if test "$ac_test_CFLAGS" = set; then
19102  CFLAGS=$ac_save_CFLAGS
19103elif test $ac_cv_prog_cc_g = yes; then
19104  if test "$GCC" = yes; then
19105    CFLAGS="-g -O2"
19106  else
19107    CFLAGS="-g"
19108  fi
19109else
19110  if test "$GCC" = yes; then
19111    CFLAGS="-O2"
19112  else
19113    CFLAGS=
19114  fi
19115fi
19116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19117$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19118if test "${ac_cv_prog_cc_c89+set}" = set; then :
19119  $as_echo_n "(cached) " >&6
19120else
19121  ac_cv_prog_cc_c89=no
19122ac_save_CC=$CC
19123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19124/* end confdefs.h.  */
19125#include <stdarg.h>
19126#include <stdio.h>
19127#include <sys/types.h>
19128#include <sys/stat.h>
19129/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19130struct buf { int x; };
19131FILE * (*rcsopen) (struct buf *, struct stat *, int);
19132static char *e (p, i)
19133     char **p;
19134     int i;
19135{
19136  return p[i];
19137}
19138static char *f (char * (*g) (char **, int), char **p, ...)
19139{
19140  char *s;
19141  va_list v;
19142  va_start (v,p);
19143  s = g (p, va_arg (v,int));
19144  va_end (v);
19145  return s;
19146}
19147
19148/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19149   function prototypes and stuff, but not '\xHH' hex character constants.
19150   These don't provoke an error unfortunately, instead are silently treated
19151   as 'x'.  The following induces an error, until -std is added to get
19152   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19153   array size at least.  It's necessary to write '\x00'==0 to get something
19154   that's true only with -std.  */
19155int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19156
19157/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19158   inside strings and character constants.  */
19159#define FOO(x) 'x'
19160int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19161
19162int test (int i, double x);
19163struct s1 {int (*f) (int a);};
19164struct s2 {int (*f) (double a);};
19165int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19166int argc;
19167char **argv;
19168int
19169main ()
19170{
19171return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19172  ;
19173  return 0;
19174}
19175_ACEOF
19176for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19177	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19178do
19179  CC="$ac_save_CC $ac_arg"
19180  if ac_fn_c_try_compile "$LINENO"; then :
19181  ac_cv_prog_cc_c89=$ac_arg
19182fi
19183rm -f core conftest.err conftest.$ac_objext
19184  test "x$ac_cv_prog_cc_c89" != "xno" && break
19185done
19186rm -f conftest.$ac_ext
19187CC=$ac_save_CC
19188
19189fi
19190# AC_CACHE_VAL
19191case "x$ac_cv_prog_cc_c89" in
19192  x)
19193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19194$as_echo "none needed" >&6; } ;;
19195  xno)
19196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19197$as_echo "unsupported" >&6; } ;;
19198  *)
19199    CC="$CC $ac_cv_prog_cc_c89"
19200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19201$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19202esac
19203if test "x$ac_cv_prog_cc_c89" != xno; then :
19204
19205fi
19206
19207ac_ext=cpp
19208ac_cpp='$CXXCPP $CPPFLAGS'
19209ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19210ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19211ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19212
19213
19214### Locate C++ compiler (CXX)
19215
19216if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19217  # Do not probe for CC on MacOSX.
19218  COMPILER_CHECK_LIST="cl g++"
19219else
19220  COMPILER_CHECK_LIST="cl CC g++"
19221fi
19222
19223  COMPILER_NAME=C++
19224
19225  # Do a first initial attempt at searching the list of compiler names.
19226  # AC_PATH_PROGS can't be run multiple times with the same variable,
19227  # so create a new name for this run.
19228  for ac_prog in $COMPILER_CHECK_LIST
19229do
19230  # Extract the first word of "$ac_prog", so it can be a program name with args.
19231set dummy $ac_prog; ac_word=$2
19232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19233$as_echo_n "checking for $ac_word... " >&6; }
19234if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19235  $as_echo_n "(cached) " >&6
19236else
19237  case $POTENTIAL_CXX in
19238  [\\/]* | ?:[\\/]*)
19239  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19240  ;;
19241  *)
19242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19243for as_dir in $PATH
19244do
19245  IFS=$as_save_IFS
19246  test -z "$as_dir" && as_dir=.
19247    for ac_exec_ext in '' $ac_executable_extensions; do
19248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19249    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19251    break 2
19252  fi
19253done
19254  done
19255IFS=$as_save_IFS
19256
19257  ;;
19258esac
19259fi
19260POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19261if test -n "$POTENTIAL_CXX"; then
19262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19263$as_echo "$POTENTIAL_CXX" >&6; }
19264else
19265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19266$as_echo "no" >&6; }
19267fi
19268
19269
19270  test -n "$POTENTIAL_CXX" && break
19271done
19272
19273  CXX=$POTENTIAL_CXX
19274
19275  if test "x$$CXX" = x; then
19276
19277    # Print a helpful message on how to acquire the necessary build dependency.
19278    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19279    MISSING_DEPENDENCY=devkit
19280    PKGHANDLER_COMMAND=
19281
19282    case $PKGHANDLER in
19283	apt-get)
19284                apt_help     $MISSING_DEPENDENCY ;;
19285    yum)
19286                yum_help     $MISSING_DEPENDENCY ;;
19287	port)
19288                port_help    $MISSING_DEPENDENCY ;;
19289	pkgutil)
19290                pkgutil_help $MISSING_DEPENDENCY ;;
19291	pkgadd)
19292                pkgadd_help  $MISSING_DEPENDENCY ;;
19293    * )
19294      break ;;
19295    esac
19296
19297    if test "x$PKGHANDLER_COMMAND" != x; then
19298        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19299    fi
19300
19301      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19302  fi
19303
19304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19305
19306  # First separate the path from the arguments. This will split at the first
19307  # space.
19308  complete="$CXX"
19309  path="${complete%% *}"
19310  tmp="$complete EOL"
19311  arguments="${tmp#* }"
19312
19313  # Input might be given as Windows format, start by converting to
19314  # unix format.
19315  new_path=`$CYGPATH -u "$path"`
19316
19317  # Now try to locate executable using which
19318  new_path=`$WHICH "$new_path" 2> /dev/null`
19319  # bat and cmd files are not always considered executable in cygwin causing which
19320  # to not find them
19321  if test "x$new_path" = x \
19322           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19323           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19324    new_path=`$CYGPATH -u "$path"`
19325  fi
19326  if test "x$new_path" = x; then
19327    # Oops. Which didn't find the executable.
19328    # The splitting of arguments from the executable at a space might have been incorrect,
19329    # since paths with space are more likely in Windows. Give it another try with the whole
19330    # argument.
19331    path="$complete"
19332    arguments="EOL"
19333    new_path=`$CYGPATH -u "$path"`
19334    new_path=`$WHICH "$new_path" 2> /dev/null`
19335    # bat and cmd files are not always considered executable in cygwin causing which
19336    # to not find them
19337    if test "x$new_path" = x \
19338             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19339             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19340      new_path=`$CYGPATH -u "$path"`
19341    fi
19342    if test "x$new_path" = x; then
19343      # It's still not found. Now this is an unrecoverable error.
19344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19345$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19346      has_space=`$ECHO "$complete" | $GREP " "`
19347      if test "x$has_space" != x; then
19348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19350      fi
19351      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19352    fi
19353  fi
19354
19355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19358  # "foo.exe" is OK but "foo" is an error.
19359  #
19360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19361  # It is also a way to make sure we got the proper file name for the real test later on.
19362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19363  if test "x$test_shortpath" = x; then
19364    # Short path failed, file does not exist as specified.
19365    # Try adding .exe or .cmd
19366    if test -f "${new_path}.exe"; then
19367       input_to_shortpath="${new_path}.exe"
19368    elif test -f "${new_path}.cmd"; then
19369       input_to_shortpath="${new_path}.cmd"
19370    else
19371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19372$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19373      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19374$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19375      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19376    fi
19377  else
19378    input_to_shortpath="$new_path"
19379  fi
19380
19381  # Call helper function which possibly converts this using DOS-style short mode.
19382  # If so, the updated path is stored in $new_path.
19383  new_path="$input_to_shortpath"
19384
19385  input_path="$input_to_shortpath"
19386  # Check if we need to convert this using DOS-style short mode. If the path
19387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19388  # take no chances and rewrite it.
19389  # Note: m4 eats our [], so we need to use [ and ] instead.
19390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19391  if test "x$has_forbidden_chars" != x; then
19392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19396      # Going to short mode and back again did indeed matter. Since short mode is
19397      # case insensitive, let's make it lowercase to improve readability.
19398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19399      # Now convert it back to Unix-stile (cygpath)
19400      input_path=`$CYGPATH -u "$shortmode_path"`
19401      new_path="$input_path"
19402    fi
19403  fi
19404
19405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19406  if test "x$test_cygdrive_prefix" = x; then
19407    # As a simple fix, exclude /usr/bin since it's not a real path.
19408    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19410      # a path prefixed by /cygdrive for fixpath to work.
19411      new_path="$CYGWIN_ROOT_PATH$input_path"
19412    fi
19413  fi
19414
19415  # remove trailing .exe if any
19416  new_path="${new_path/%.exe/}"
19417
19418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19419
19420  # First separate the path from the arguments. This will split at the first
19421  # space.
19422  complete="$CXX"
19423  path="${complete%% *}"
19424  tmp="$complete EOL"
19425  arguments="${tmp#* }"
19426
19427  # Input might be given as Windows format, start by converting to
19428  # unix format.
19429  new_path="$path"
19430
19431  windows_path="$new_path"
19432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19433    unix_path=`$CYGPATH -u "$windows_path"`
19434    new_path="$unix_path"
19435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19437    new_path="$unix_path"
19438  fi
19439
19440
19441  # Now try to locate executable using which
19442  new_path=`$WHICH "$new_path" 2> /dev/null`
19443
19444  if test "x$new_path" = x; then
19445    # Oops. Which didn't find the executable.
19446    # The splitting of arguments from the executable at a space might have been incorrect,
19447    # since paths with space are more likely in Windows. Give it another try with the whole
19448    # argument.
19449    path="$complete"
19450    arguments="EOL"
19451    new_path="$path"
19452
19453  windows_path="$new_path"
19454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19455    unix_path=`$CYGPATH -u "$windows_path"`
19456    new_path="$unix_path"
19457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19459    new_path="$unix_path"
19460  fi
19461
19462
19463    new_path=`$WHICH "$new_path" 2> /dev/null`
19464
19465    if test "x$new_path" = x; then
19466      # It's still not found. Now this is an unrecoverable error.
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19468$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19469      has_space=`$ECHO "$complete" | $GREP " "`
19470      if test "x$has_space" != x; then
19471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19473      fi
19474      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19475    fi
19476  fi
19477
19478  # Now new_path has a complete unix path to the binary
19479  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19480    # Keep paths in /bin as-is, but remove trailing .exe if any
19481    new_path="${new_path/%.exe/}"
19482    # Do not save /bin paths to all_fixpath_prefixes!
19483  else
19484    # Not in mixed or Windows style, start by that.
19485    new_path=`cmd //c echo $new_path`
19486
19487  input_path="$new_path"
19488  # Check if we need to convert this using DOS-style short mode. If the path
19489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19490  # take no chances and rewrite it.
19491  # Note: m4 eats our [], so we need to use [ and ] instead.
19492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19493  if test "x$has_forbidden_chars" != x; then
19494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19496  fi
19497
19498    # Output is in $new_path
19499
19500  windows_path="$new_path"
19501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19502    unix_path=`$CYGPATH -u "$windows_path"`
19503    new_path="$unix_path"
19504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19506    new_path="$unix_path"
19507  fi
19508
19509    # remove trailing .exe if any
19510    new_path="${new_path/%.exe/}"
19511
19512    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19513    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19514  fi
19515
19516  else
19517    # We're on a posix platform. Hooray! :)
19518    # First separate the path from the arguments. This will split at the first
19519    # space.
19520    complete="$CXX"
19521    path="${complete%% *}"
19522    tmp="$complete EOL"
19523    arguments="${tmp#* }"
19524
19525    new_path=`$WHICH $path 2> /dev/null`
19526    if test "x$new_path" = x; then
19527      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19528      if test "x$is_absolute_path" != x; then
19529        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19530$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19531        new_path="$path"
19532      else
19533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19534$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19535        has_space=`$ECHO "$complete" | $GREP " "`
19536        if test "x$has_space" != x; then
19537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19539        fi
19540        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19541      fi
19542    fi
19543  fi
19544
19545  # Now join together the path and the arguments once again
19546  if test "x$arguments" != xEOL; then
19547      new_complete="$new_path ${arguments% *}"
19548  else
19549      new_complete="$new_path"
19550  fi
19551
19552  if test "x$complete" != "x$new_complete"; then
19553    CXX="$new_complete"
19554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19555$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19556  fi
19557
19558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19559$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19560  TEST_COMPILER="$CXX"
19561
19562    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19563        # Follow a chain of symbolic links. Use readlink
19564        # where it exists, else fall back to horribly
19565        # complicated shell code.
19566        if test "x$READLINK_TESTED" != yes; then
19567            # On MacOSX there is a readlink tool with a different
19568            # purpose than the GNU readlink tool. Check the found readlink.
19569            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19570            if test "x$ISGNU" = x; then
19571                 # A readlink that we do not know how to use.
19572                 # Are there other non-GNU readlinks out there?
19573                 READLINK_TESTED=yes
19574                 READLINK=
19575            fi
19576        fi
19577
19578        if test "x$READLINK" != x; then
19579            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19580        else
19581            STARTDIR=$PWD
19582            COUNTER=0
19583            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19584            sym_link_file=`$BASENAME $TEST_COMPILER`
19585            while test $COUNTER -lt 20; do
19586                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19587                if test "x$ISLINK" == x; then
19588                    # This is not a symbolic link! We are done!
19589                    break
19590                fi
19591                # The link might be relative! We have to use cd to travel safely.
19592                cd $sym_link_dir
19593                # ... and we must get the to the absolute path, not one using symbolic links.
19594                cd `pwd -P`
19595                cd `$DIRNAME $ISLINK`
19596                sym_link_dir=`$THEPWDCMD`
19597                sym_link_file=`$BASENAME $ISLINK`
19598                let COUNTER=COUNTER+1
19599            done
19600            cd $STARTDIR
19601            TEST_COMPILER=$sym_link_dir/$sym_link_file
19602        fi
19603    fi
19604
19605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19606$as_echo "$TEST_COMPILER" >&6; }
19607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19608$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19609
19610  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19611  if test "x$COMPILER_BASENAME" = "xccache"; then
19612    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19613$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19614    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19615    # We want to control ccache invocation ourselves, so ignore this cc and try
19616    # searching again.
19617
19618    # Remove the path to the fake ccache cc from the PATH
19619    RETRY_COMPILER_SAVED_PATH="$PATH"
19620    COMPILER_DIRNAME=`$DIRNAME $CXX`
19621    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19622
19623    # Try again looking for our compiler
19624    if test -n "$ac_tool_prefix"; then
19625  for ac_prog in $COMPILER_CHECK_LIST
19626  do
19627    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19630$as_echo_n "checking for $ac_word... " >&6; }
19631if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19632  $as_echo_n "(cached) " >&6
19633else
19634  if test -n "$PROPER_COMPILER_CXX"; then
19635  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19636else
19637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19638for as_dir in $PATH
19639do
19640  IFS=$as_save_IFS
19641  test -z "$as_dir" && as_dir=.
19642    for ac_exec_ext in '' $ac_executable_extensions; do
19643  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19644    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19646    break 2
19647  fi
19648done
19649  done
19650IFS=$as_save_IFS
19651
19652fi
19653fi
19654PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19655if test -n "$PROPER_COMPILER_CXX"; then
19656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19657$as_echo "$PROPER_COMPILER_CXX" >&6; }
19658else
19659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19660$as_echo "no" >&6; }
19661fi
19662
19663
19664    test -n "$PROPER_COMPILER_CXX" && break
19665  done
19666fi
19667if test -z "$PROPER_COMPILER_CXX"; then
19668  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19669  for ac_prog in $COMPILER_CHECK_LIST
19670do
19671  # Extract the first word of "$ac_prog", so it can be a program name with args.
19672set dummy $ac_prog; ac_word=$2
19673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19674$as_echo_n "checking for $ac_word... " >&6; }
19675if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19676  $as_echo_n "(cached) " >&6
19677else
19678  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19679  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19680else
19681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19682for as_dir in $PATH
19683do
19684  IFS=$as_save_IFS
19685  test -z "$as_dir" && as_dir=.
19686    for ac_exec_ext in '' $ac_executable_extensions; do
19687  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19688    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19690    break 2
19691  fi
19692done
19693  done
19694IFS=$as_save_IFS
19695
19696fi
19697fi
19698ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19699if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19701$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19702else
19703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19704$as_echo "no" >&6; }
19705fi
19706
19707
19708  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19709done
19710
19711  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19712    PROPER_COMPILER_CXX=""
19713  else
19714    case $cross_compiling:$ac_tool_warned in
19715yes:)
19716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19718ac_tool_warned=yes ;;
19719esac
19720    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19721  fi
19722fi
19723
19724
19725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19726
19727  # First separate the path from the arguments. This will split at the first
19728  # space.
19729  complete="$PROPER_COMPILER_CXX"
19730  path="${complete%% *}"
19731  tmp="$complete EOL"
19732  arguments="${tmp#* }"
19733
19734  # Input might be given as Windows format, start by converting to
19735  # unix format.
19736  new_path=`$CYGPATH -u "$path"`
19737
19738  # Now try to locate executable using which
19739  new_path=`$WHICH "$new_path" 2> /dev/null`
19740  # bat and cmd files are not always considered executable in cygwin causing which
19741  # to not find them
19742  if test "x$new_path" = x \
19743           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19744           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19745    new_path=`$CYGPATH -u "$path"`
19746  fi
19747  if test "x$new_path" = x; then
19748    # Oops. Which didn't find the executable.
19749    # The splitting of arguments from the executable at a space might have been incorrect,
19750    # since paths with space are more likely in Windows. Give it another try with the whole
19751    # argument.
19752    path="$complete"
19753    arguments="EOL"
19754    new_path=`$CYGPATH -u "$path"`
19755    new_path=`$WHICH "$new_path" 2> /dev/null`
19756    # bat and cmd files are not always considered executable in cygwin causing which
19757    # to not find them
19758    if test "x$new_path" = x \
19759             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19760             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19761      new_path=`$CYGPATH -u "$path"`
19762    fi
19763    if test "x$new_path" = x; then
19764      # It's still not found. Now this is an unrecoverable error.
19765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19766$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19767      has_space=`$ECHO "$complete" | $GREP " "`
19768      if test "x$has_space" != x; then
19769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19771      fi
19772      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19773    fi
19774  fi
19775
19776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19779  # "foo.exe" is OK but "foo" is an error.
19780  #
19781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19782  # It is also a way to make sure we got the proper file name for the real test later on.
19783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19784  if test "x$test_shortpath" = x; then
19785    # Short path failed, file does not exist as specified.
19786    # Try adding .exe or .cmd
19787    if test -f "${new_path}.exe"; then
19788       input_to_shortpath="${new_path}.exe"
19789    elif test -f "${new_path}.cmd"; then
19790       input_to_shortpath="${new_path}.cmd"
19791    else
19792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19793$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19796      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19797    fi
19798  else
19799    input_to_shortpath="$new_path"
19800  fi
19801
19802  # Call helper function which possibly converts this using DOS-style short mode.
19803  # If so, the updated path is stored in $new_path.
19804  new_path="$input_to_shortpath"
19805
19806  input_path="$input_to_shortpath"
19807  # Check if we need to convert this using DOS-style short mode. If the path
19808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19809  # take no chances and rewrite it.
19810  # Note: m4 eats our [], so we need to use [ and ] instead.
19811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19812  if test "x$has_forbidden_chars" != x; then
19813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19817      # Going to short mode and back again did indeed matter. Since short mode is
19818      # case insensitive, let's make it lowercase to improve readability.
19819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19820      # Now convert it back to Unix-stile (cygpath)
19821      input_path=`$CYGPATH -u "$shortmode_path"`
19822      new_path="$input_path"
19823    fi
19824  fi
19825
19826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19827  if test "x$test_cygdrive_prefix" = x; then
19828    # As a simple fix, exclude /usr/bin since it's not a real path.
19829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19831      # a path prefixed by /cygdrive for fixpath to work.
19832      new_path="$CYGWIN_ROOT_PATH$input_path"
19833    fi
19834  fi
19835
19836  # remove trailing .exe if any
19837  new_path="${new_path/%.exe/}"
19838
19839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19840
19841  # First separate the path from the arguments. This will split at the first
19842  # space.
19843  complete="$PROPER_COMPILER_CXX"
19844  path="${complete%% *}"
19845  tmp="$complete EOL"
19846  arguments="${tmp#* }"
19847
19848  # Input might be given as Windows format, start by converting to
19849  # unix format.
19850  new_path="$path"
19851
19852  windows_path="$new_path"
19853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19854    unix_path=`$CYGPATH -u "$windows_path"`
19855    new_path="$unix_path"
19856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19858    new_path="$unix_path"
19859  fi
19860
19861
19862  # Now try to locate executable using which
19863  new_path=`$WHICH "$new_path" 2> /dev/null`
19864
19865  if test "x$new_path" = x; then
19866    # Oops. Which didn't find the executable.
19867    # The splitting of arguments from the executable at a space might have been incorrect,
19868    # since paths with space are more likely in Windows. Give it another try with the whole
19869    # argument.
19870    path="$complete"
19871    arguments="EOL"
19872    new_path="$path"
19873
19874  windows_path="$new_path"
19875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19876    unix_path=`$CYGPATH -u "$windows_path"`
19877    new_path="$unix_path"
19878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19880    new_path="$unix_path"
19881  fi
19882
19883
19884    new_path=`$WHICH "$new_path" 2> /dev/null`
19885
19886    if test "x$new_path" = x; then
19887      # It's still not found. Now this is an unrecoverable error.
19888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19889$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19890      has_space=`$ECHO "$complete" | $GREP " "`
19891      if test "x$has_space" != x; then
19892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19894      fi
19895      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19896    fi
19897  fi
19898
19899  # Now new_path has a complete unix path to the binary
19900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19901    # Keep paths in /bin as-is, but remove trailing .exe if any
19902    new_path="${new_path/%.exe/}"
19903    # Do not save /bin paths to all_fixpath_prefixes!
19904  else
19905    # Not in mixed or Windows style, start by that.
19906    new_path=`cmd //c echo $new_path`
19907
19908  input_path="$new_path"
19909  # Check if we need to convert this using DOS-style short mode. If the path
19910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19911  # take no chances and rewrite it.
19912  # Note: m4 eats our [], so we need to use [ and ] instead.
19913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19914  if test "x$has_forbidden_chars" != x; then
19915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19917  fi
19918
19919    # Output is in $new_path
19920
19921  windows_path="$new_path"
19922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19923    unix_path=`$CYGPATH -u "$windows_path"`
19924    new_path="$unix_path"
19925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19927    new_path="$unix_path"
19928  fi
19929
19930    # remove trailing .exe if any
19931    new_path="${new_path/%.exe/}"
19932
19933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19935  fi
19936
19937  else
19938    # We're on a posix platform. Hooray! :)
19939    # First separate the path from the arguments. This will split at the first
19940    # space.
19941    complete="$PROPER_COMPILER_CXX"
19942    path="${complete%% *}"
19943    tmp="$complete EOL"
19944    arguments="${tmp#* }"
19945
19946    new_path=`$WHICH $path 2> /dev/null`
19947    if test "x$new_path" = x; then
19948      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19949      if test "x$is_absolute_path" != x; then
19950        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19951$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19952        new_path="$path"
19953      else
19954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19955$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19956        has_space=`$ECHO "$complete" | $GREP " "`
19957        if test "x$has_space" != x; then
19958          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19960        fi
19961        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19962      fi
19963    fi
19964  fi
19965
19966  # Now join together the path and the arguments once again
19967  if test "x$arguments" != xEOL; then
19968      new_complete="$new_path ${arguments% *}"
19969  else
19970      new_complete="$new_path"
19971  fi
19972
19973  if test "x$complete" != "x$new_complete"; then
19974    PROPER_COMPILER_CXX="$new_complete"
19975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
19976$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
19977  fi
19978
19979    PATH="$RETRY_COMPILER_SAVED_PATH"
19980
19981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
19982$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
19983
19984    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19985        # Follow a chain of symbolic links. Use readlink
19986        # where it exists, else fall back to horribly
19987        # complicated shell code.
19988        if test "x$READLINK_TESTED" != yes; then
19989            # On MacOSX there is a readlink tool with a different
19990            # purpose than the GNU readlink tool. Check the found readlink.
19991            ISGNU=`$READLINK --help 2>&1 | $GREP GNU`
19992            if test "x$ISGNU" = x; then
19993                 # A readlink that we do not know how to use.
19994                 # Are there other non-GNU readlinks out there?
19995                 READLINK_TESTED=yes
19996                 READLINK=
19997            fi
19998        fi
19999
20000        if test "x$READLINK" != x; then
20001            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20002        else
20003            STARTDIR=$PWD
20004            COUNTER=0
20005            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20006            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20007            while test $COUNTER -lt 20; do
20008                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20009                if test "x$ISLINK" == x; then
20010                    # This is not a symbolic link! We are done!
20011                    break
20012                fi
20013                # The link might be relative! We have to use cd to travel safely.
20014                cd $sym_link_dir
20015                # ... and we must get the to the absolute path, not one using symbolic links.
20016                cd `pwd -P`
20017                cd `$DIRNAME $ISLINK`
20018                sym_link_dir=`$THEPWDCMD`
20019                sym_link_file=`$BASENAME $ISLINK`
20020                let COUNTER=COUNTER+1
20021            done
20022            cd $STARTDIR
20023            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20024        fi
20025    fi
20026
20027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20028$as_echo "$PROPER_COMPILER_CXX" >&6; }
20029    CXX="$PROPER_COMPILER_CXX"
20030  else
20031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20032$as_echo "no, keeping CXX" >&6; }
20033    CXX="$TEST_COMPILER"
20034  fi
20035
20036  COMPILER=$CXX
20037  COMPILER_NAME=$COMPILER_NAME
20038
20039  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20040    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20041    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20042    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20043    if test $? -ne 0; then
20044      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20045
20046      { $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
20047$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20048      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20049$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20050      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20051    else
20052      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20053      COMPILER_VENDOR="Sun Studio"
20054    fi
20055  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20056    # First line typically looks something like:
20057    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20058    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20059    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20060    COMPILER_VENDOR="Microsoft CL.EXE"
20061    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20062    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20063      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20064        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20065      fi
20066    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20067      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20068        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20069      fi
20070    fi
20071  else
20072    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20073    # Check that this is likely to be GCC.
20074    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20075    if test $? -ne 0; then
20076      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20077$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20078      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20079$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20080      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20081    fi
20082
20083    # First line typically looks something like:
20084    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20085    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20086    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20087  fi
20088  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20089  CXX_VERSION="$COMPILER_VERSION"
20090  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20091  CXX_VENDOR="$COMPILER_VENDOR"
20092
20093  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20094$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20095
20096
20097# Now that we have resolved CXX ourself, let autoconf have it's go at it
20098ac_ext=cpp
20099ac_cpp='$CXXCPP $CPPFLAGS'
20100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20103if test -z "$CXX"; then
20104  if test -n "$CCC"; then
20105    CXX=$CCC
20106  else
20107    if test -n "$ac_tool_prefix"; then
20108  for ac_prog in $CXX
20109  do
20110    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20111set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20113$as_echo_n "checking for $ac_word... " >&6; }
20114if test "${ac_cv_prog_CXX+set}" = set; then :
20115  $as_echo_n "(cached) " >&6
20116else
20117  if test -n "$CXX"; then
20118  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20119else
20120as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20121for as_dir in $PATH
20122do
20123  IFS=$as_save_IFS
20124  test -z "$as_dir" && as_dir=.
20125    for ac_exec_ext in '' $ac_executable_extensions; do
20126  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20127    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20129    break 2
20130  fi
20131done
20132  done
20133IFS=$as_save_IFS
20134
20135fi
20136fi
20137CXX=$ac_cv_prog_CXX
20138if test -n "$CXX"; then
20139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20140$as_echo "$CXX" >&6; }
20141else
20142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20143$as_echo "no" >&6; }
20144fi
20145
20146
20147    test -n "$CXX" && break
20148  done
20149fi
20150if test -z "$CXX"; then
20151  ac_ct_CXX=$CXX
20152  for ac_prog in $CXX
20153do
20154  # Extract the first word of "$ac_prog", so it can be a program name with args.
20155set dummy $ac_prog; ac_word=$2
20156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20157$as_echo_n "checking for $ac_word... " >&6; }
20158if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20159  $as_echo_n "(cached) " >&6
20160else
20161  if test -n "$ac_ct_CXX"; then
20162  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20163else
20164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20165for as_dir in $PATH
20166do
20167  IFS=$as_save_IFS
20168  test -z "$as_dir" && as_dir=.
20169    for ac_exec_ext in '' $ac_executable_extensions; do
20170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20171    ac_cv_prog_ac_ct_CXX="$ac_prog"
20172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20173    break 2
20174  fi
20175done
20176  done
20177IFS=$as_save_IFS
20178
20179fi
20180fi
20181ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20182if test -n "$ac_ct_CXX"; then
20183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20184$as_echo "$ac_ct_CXX" >&6; }
20185else
20186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20187$as_echo "no" >&6; }
20188fi
20189
20190
20191  test -n "$ac_ct_CXX" && break
20192done
20193
20194  if test "x$ac_ct_CXX" = x; then
20195    CXX="g++"
20196  else
20197    case $cross_compiling:$ac_tool_warned in
20198yes:)
20199{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20200$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20201ac_tool_warned=yes ;;
20202esac
20203    CXX=$ac_ct_CXX
20204  fi
20205fi
20206
20207  fi
20208fi
20209# Provide some information about the compiler.
20210$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20211set X $ac_compile
20212ac_compiler=$2
20213for ac_option in --version -v -V -qversion; do
20214  { { ac_try="$ac_compiler $ac_option >&5"
20215case "(($ac_try" in
20216  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20217  *) ac_try_echo=$ac_try;;
20218esac
20219eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20220$as_echo "$ac_try_echo"; } >&5
20221  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20222  ac_status=$?
20223  if test -s conftest.err; then
20224    sed '10a\
20225... rest of stderr output deleted ...
20226         10q' conftest.err >conftest.er1
20227    cat conftest.er1 >&5
20228  fi
20229  rm -f conftest.er1 conftest.err
20230  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20231  test $ac_status = 0; }
20232done
20233
20234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20235$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20236if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20237  $as_echo_n "(cached) " >&6
20238else
20239  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20240/* end confdefs.h.  */
20241
20242int
20243main ()
20244{
20245#ifndef __GNUC__
20246       choke me
20247#endif
20248
20249  ;
20250  return 0;
20251}
20252_ACEOF
20253if ac_fn_cxx_try_compile "$LINENO"; then :
20254  ac_compiler_gnu=yes
20255else
20256  ac_compiler_gnu=no
20257fi
20258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20259ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20260
20261fi
20262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20263$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20264if test $ac_compiler_gnu = yes; then
20265  GXX=yes
20266else
20267  GXX=
20268fi
20269ac_test_CXXFLAGS=${CXXFLAGS+set}
20270ac_save_CXXFLAGS=$CXXFLAGS
20271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20272$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20273if test "${ac_cv_prog_cxx_g+set}" = set; then :
20274  $as_echo_n "(cached) " >&6
20275else
20276  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20277   ac_cxx_werror_flag=yes
20278   ac_cv_prog_cxx_g=no
20279   CXXFLAGS="-g"
20280   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20281/* end confdefs.h.  */
20282
20283int
20284main ()
20285{
20286
20287  ;
20288  return 0;
20289}
20290_ACEOF
20291if ac_fn_cxx_try_compile "$LINENO"; then :
20292  ac_cv_prog_cxx_g=yes
20293else
20294  CXXFLAGS=""
20295      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20296/* end confdefs.h.  */
20297
20298int
20299main ()
20300{
20301
20302  ;
20303  return 0;
20304}
20305_ACEOF
20306if ac_fn_cxx_try_compile "$LINENO"; then :
20307
20308else
20309  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20310	 CXXFLAGS="-g"
20311	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20312/* end confdefs.h.  */
20313
20314int
20315main ()
20316{
20317
20318  ;
20319  return 0;
20320}
20321_ACEOF
20322if ac_fn_cxx_try_compile "$LINENO"; then :
20323  ac_cv_prog_cxx_g=yes
20324fi
20325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20326fi
20327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20328fi
20329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20330   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20331fi
20332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20333$as_echo "$ac_cv_prog_cxx_g" >&6; }
20334if test "$ac_test_CXXFLAGS" = set; then
20335  CXXFLAGS=$ac_save_CXXFLAGS
20336elif test $ac_cv_prog_cxx_g = yes; then
20337  if test "$GXX" = yes; then
20338    CXXFLAGS="-g -O2"
20339  else
20340    CXXFLAGS="-g"
20341  fi
20342else
20343  if test "$GXX" = yes; then
20344    CXXFLAGS="-O2"
20345  else
20346    CXXFLAGS=
20347  fi
20348fi
20349ac_ext=cpp
20350ac_cpp='$CXXCPP $CPPFLAGS'
20351ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20352ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20353ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20354
20355
20356### Locate other tools
20357
20358if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20359    ac_ext=m
20360ac_cpp='$OBJCPP $CPPFLAGS'
20361ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20362ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20363ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20364if test -n "$ac_tool_prefix"; then
20365  for ac_prog in gcc objcc objc cc CC
20366  do
20367    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20368set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20370$as_echo_n "checking for $ac_word... " >&6; }
20371if test "${ac_cv_prog_OBJC+set}" = set; then :
20372  $as_echo_n "(cached) " >&6
20373else
20374  if test -n "$OBJC"; then
20375  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20376else
20377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20378for as_dir in $PATH
20379do
20380  IFS=$as_save_IFS
20381  test -z "$as_dir" && as_dir=.
20382    for ac_exec_ext in '' $ac_executable_extensions; do
20383  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20384    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20386    break 2
20387  fi
20388done
20389  done
20390IFS=$as_save_IFS
20391
20392fi
20393fi
20394OBJC=$ac_cv_prog_OBJC
20395if test -n "$OBJC"; then
20396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20397$as_echo "$OBJC" >&6; }
20398else
20399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20400$as_echo "no" >&6; }
20401fi
20402
20403
20404    test -n "$OBJC" && break
20405  done
20406fi
20407if test -z "$OBJC"; then
20408  ac_ct_OBJC=$OBJC
20409  for ac_prog in gcc objcc objc cc CC
20410do
20411  # Extract the first word of "$ac_prog", so it can be a program name with args.
20412set dummy $ac_prog; ac_word=$2
20413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20414$as_echo_n "checking for $ac_word... " >&6; }
20415if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20416  $as_echo_n "(cached) " >&6
20417else
20418  if test -n "$ac_ct_OBJC"; then
20419  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20420else
20421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20422for as_dir in $PATH
20423do
20424  IFS=$as_save_IFS
20425  test -z "$as_dir" && as_dir=.
20426    for ac_exec_ext in '' $ac_executable_extensions; do
20427  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20428    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20430    break 2
20431  fi
20432done
20433  done
20434IFS=$as_save_IFS
20435
20436fi
20437fi
20438ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20439if test -n "$ac_ct_OBJC"; then
20440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20441$as_echo "$ac_ct_OBJC" >&6; }
20442else
20443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20444$as_echo "no" >&6; }
20445fi
20446
20447
20448  test -n "$ac_ct_OBJC" && break
20449done
20450
20451  if test "x$ac_ct_OBJC" = x; then
20452    OBJC="gcc"
20453  else
20454    case $cross_compiling:$ac_tool_warned in
20455yes:)
20456{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20457$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20458ac_tool_warned=yes ;;
20459esac
20460    OBJC=$ac_ct_OBJC
20461  fi
20462fi
20463
20464# Provide some information about the compiler.
20465$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20466set X $ac_compile
20467ac_compiler=$2
20468for ac_option in --version -v -V -qversion; do
20469  { { ac_try="$ac_compiler $ac_option >&5"
20470case "(($ac_try" in
20471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20472  *) ac_try_echo=$ac_try;;
20473esac
20474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20475$as_echo "$ac_try_echo"; } >&5
20476  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20477  ac_status=$?
20478  if test -s conftest.err; then
20479    sed '10a\
20480... rest of stderr output deleted ...
20481         10q' conftest.err >conftest.er1
20482    cat conftest.er1 >&5
20483  fi
20484  rm -f conftest.er1 conftest.err
20485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20486  test $ac_status = 0; }
20487done
20488
20489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20490$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20491if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20492  $as_echo_n "(cached) " >&6
20493else
20494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20495/* end confdefs.h.  */
20496
20497int
20498main ()
20499{
20500#ifndef __GNUC__
20501       choke me
20502#endif
20503
20504  ;
20505  return 0;
20506}
20507_ACEOF
20508if ac_fn_objc_try_compile "$LINENO"; then :
20509  ac_compiler_gnu=yes
20510else
20511  ac_compiler_gnu=no
20512fi
20513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20514ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20515
20516fi
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20518$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20519if test $ac_compiler_gnu = yes; then
20520  GOBJC=yes
20521else
20522  GOBJC=
20523fi
20524ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20525ac_save_OBJCFLAGS=$OBJCFLAGS
20526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20527$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20528if test "${ac_cv_prog_objc_g+set}" = set; then :
20529  $as_echo_n "(cached) " >&6
20530else
20531  ac_save_objc_werror_flag=$ac_objc_werror_flag
20532   ac_objc_werror_flag=yes
20533   ac_cv_prog_objc_g=no
20534   OBJCFLAGS="-g"
20535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20536/* end confdefs.h.  */
20537
20538int
20539main ()
20540{
20541
20542  ;
20543  return 0;
20544}
20545_ACEOF
20546if ac_fn_objc_try_compile "$LINENO"; then :
20547  ac_cv_prog_objc_g=yes
20548else
20549  OBJCFLAGS=""
20550      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20551/* end confdefs.h.  */
20552
20553int
20554main ()
20555{
20556
20557  ;
20558  return 0;
20559}
20560_ACEOF
20561if ac_fn_objc_try_compile "$LINENO"; then :
20562
20563else
20564  ac_objc_werror_flag=$ac_save_objc_werror_flag
20565	 OBJCFLAGS="-g"
20566	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567/* end confdefs.h.  */
20568
20569int
20570main ()
20571{
20572
20573  ;
20574  return 0;
20575}
20576_ACEOF
20577if ac_fn_objc_try_compile "$LINENO"; then :
20578  ac_cv_prog_objc_g=yes
20579fi
20580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20581fi
20582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20583fi
20584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20585   ac_objc_werror_flag=$ac_save_objc_werror_flag
20586fi
20587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20588$as_echo "$ac_cv_prog_objc_g" >&6; }
20589if test "$ac_test_OBJCFLAGS" = set; then
20590  OBJCFLAGS=$ac_save_OBJCFLAGS
20591elif test $ac_cv_prog_objc_g = yes; then
20592  if test "$GOBJC" = yes; then
20593    OBJCFLAGS="-g -O2"
20594  else
20595    OBJCFLAGS="-g"
20596  fi
20597else
20598  if test "$GOBJC" = yes; then
20599    OBJCFLAGS="-O2"
20600  else
20601    OBJCFLAGS=
20602  fi
20603fi
20604ac_ext=cpp
20605ac_cpp='$CXXCPP $CPPFLAGS'
20606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20609
20610
20611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20612
20613  # First separate the path from the arguments. This will split at the first
20614  # space.
20615  complete="$OBJC"
20616  path="${complete%% *}"
20617  tmp="$complete EOL"
20618  arguments="${tmp#* }"
20619
20620  # Input might be given as Windows format, start by converting to
20621  # unix format.
20622  new_path=`$CYGPATH -u "$path"`
20623
20624  # Now try to locate executable using which
20625  new_path=`$WHICH "$new_path" 2> /dev/null`
20626  # bat and cmd files are not always considered executable in cygwin causing which
20627  # to not find them
20628  if test "x$new_path" = x \
20629           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20630           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20631    new_path=`$CYGPATH -u "$path"`
20632  fi
20633  if test "x$new_path" = x; then
20634    # Oops. Which didn't find the executable.
20635    # The splitting of arguments from the executable at a space might have been incorrect,
20636    # since paths with space are more likely in Windows. Give it another try with the whole
20637    # argument.
20638    path="$complete"
20639    arguments="EOL"
20640    new_path=`$CYGPATH -u "$path"`
20641    new_path=`$WHICH "$new_path" 2> /dev/null`
20642    # bat and cmd files are not always considered executable in cygwin causing which
20643    # to not find them
20644    if test "x$new_path" = x \
20645             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20646             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20647      new_path=`$CYGPATH -u "$path"`
20648    fi
20649    if test "x$new_path" = x; then
20650      # It's still not found. Now this is an unrecoverable error.
20651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20652$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20653      has_space=`$ECHO "$complete" | $GREP " "`
20654      if test "x$has_space" != x; then
20655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20657      fi
20658      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20659    fi
20660  fi
20661
20662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20665  # "foo.exe" is OK but "foo" is an error.
20666  #
20667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20668  # It is also a way to make sure we got the proper file name for the real test later on.
20669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20670  if test "x$test_shortpath" = x; then
20671    # Short path failed, file does not exist as specified.
20672    # Try adding .exe or .cmd
20673    if test -f "${new_path}.exe"; then
20674       input_to_shortpath="${new_path}.exe"
20675    elif test -f "${new_path}.cmd"; then
20676       input_to_shortpath="${new_path}.cmd"
20677    else
20678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20679$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20682      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20683    fi
20684  else
20685    input_to_shortpath="$new_path"
20686  fi
20687
20688  # Call helper function which possibly converts this using DOS-style short mode.
20689  # If so, the updated path is stored in $new_path.
20690  new_path="$input_to_shortpath"
20691
20692  input_path="$input_to_shortpath"
20693  # Check if we need to convert this using DOS-style short mode. If the path
20694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20695  # take no chances and rewrite it.
20696  # Note: m4 eats our [], so we need to use [ and ] instead.
20697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20698  if test "x$has_forbidden_chars" != x; then
20699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20703      # Going to short mode and back again did indeed matter. Since short mode is
20704      # case insensitive, let's make it lowercase to improve readability.
20705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20706      # Now convert it back to Unix-stile (cygpath)
20707      input_path=`$CYGPATH -u "$shortmode_path"`
20708      new_path="$input_path"
20709    fi
20710  fi
20711
20712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20713  if test "x$test_cygdrive_prefix" = x; then
20714    # As a simple fix, exclude /usr/bin since it's not a real path.
20715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20717      # a path prefixed by /cygdrive for fixpath to work.
20718      new_path="$CYGWIN_ROOT_PATH$input_path"
20719    fi
20720  fi
20721
20722  # remove trailing .exe if any
20723  new_path="${new_path/%.exe/}"
20724
20725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20726
20727  # First separate the path from the arguments. This will split at the first
20728  # space.
20729  complete="$OBJC"
20730  path="${complete%% *}"
20731  tmp="$complete EOL"
20732  arguments="${tmp#* }"
20733
20734  # Input might be given as Windows format, start by converting to
20735  # unix format.
20736  new_path="$path"
20737
20738  windows_path="$new_path"
20739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20740    unix_path=`$CYGPATH -u "$windows_path"`
20741    new_path="$unix_path"
20742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20744    new_path="$unix_path"
20745  fi
20746
20747
20748  # Now try to locate executable using which
20749  new_path=`$WHICH "$new_path" 2> /dev/null`
20750
20751  if test "x$new_path" = x; then
20752    # Oops. Which didn't find the executable.
20753    # The splitting of arguments from the executable at a space might have been incorrect,
20754    # since paths with space are more likely in Windows. Give it another try with the whole
20755    # argument.
20756    path="$complete"
20757    arguments="EOL"
20758    new_path="$path"
20759
20760  windows_path="$new_path"
20761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20762    unix_path=`$CYGPATH -u "$windows_path"`
20763    new_path="$unix_path"
20764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20766    new_path="$unix_path"
20767  fi
20768
20769
20770    new_path=`$WHICH "$new_path" 2> /dev/null`
20771
20772    if test "x$new_path" = x; then
20773      # It's still not found. Now this is an unrecoverable error.
20774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20775$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20776      has_space=`$ECHO "$complete" | $GREP " "`
20777      if test "x$has_space" != x; then
20778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20780      fi
20781      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20782    fi
20783  fi
20784
20785  # Now new_path has a complete unix path to the binary
20786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20787    # Keep paths in /bin as-is, but remove trailing .exe if any
20788    new_path="${new_path/%.exe/}"
20789    # Do not save /bin paths to all_fixpath_prefixes!
20790  else
20791    # Not in mixed or Windows style, start by that.
20792    new_path=`cmd //c echo $new_path`
20793
20794  input_path="$new_path"
20795  # Check if we need to convert this using DOS-style short mode. If the path
20796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20797  # take no chances and rewrite it.
20798  # Note: m4 eats our [], so we need to use [ and ] instead.
20799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20800  if test "x$has_forbidden_chars" != x; then
20801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20803  fi
20804
20805    # Output is in $new_path
20806
20807  windows_path="$new_path"
20808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20809    unix_path=`$CYGPATH -u "$windows_path"`
20810    new_path="$unix_path"
20811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20813    new_path="$unix_path"
20814  fi
20815
20816    # remove trailing .exe if any
20817    new_path="${new_path/%.exe/}"
20818
20819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20821  fi
20822
20823  else
20824    # We're on a posix platform. Hooray! :)
20825    # First separate the path from the arguments. This will split at the first
20826    # space.
20827    complete="$OBJC"
20828    path="${complete%% *}"
20829    tmp="$complete EOL"
20830    arguments="${tmp#* }"
20831
20832    new_path=`$WHICH $path 2> /dev/null`
20833    if test "x$new_path" = x; then
20834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20835      if test "x$is_absolute_path" != x; then
20836        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20837$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20838        new_path="$path"
20839      else
20840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20841$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20842        has_space=`$ECHO "$complete" | $GREP " "`
20843        if test "x$has_space" != x; then
20844          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20846        fi
20847        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20848      fi
20849    fi
20850  fi
20851
20852  # Now join together the path and the arguments once again
20853  if test "x$arguments" != xEOL; then
20854      new_complete="$new_path ${arguments% *}"
20855  else
20856      new_complete="$new_path"
20857  fi
20858
20859  if test "x$complete" != "x$new_complete"; then
20860    OBJC="$new_complete"
20861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20862$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20863  fi
20864
20865else
20866    OBJC=
20867fi
20868
20869# Restore the flags to the user specified values.
20870# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20871CFLAGS="$ORG_CFLAGS"
20872CXXFLAGS="$ORG_CXXFLAGS"
20873OBJCFLAGS="$ORG_OBJCFLAGS"
20874
20875LD="$CC"
20876LDEXE="$CC"
20877LDCXX="$CXX"
20878LDEXECXX="$CXX"
20879
20880# LDEXE is the linker to use, when creating executables.
20881
20882# Linking C++ libraries.
20883
20884# Linking C++ executables.
20885
20886
20887if test "x$OPENJDK_TARGET_OS" != xwindows; then
20888    if test -n "$ac_tool_prefix"; then
20889  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20890set dummy ${ac_tool_prefix}ar; ac_word=$2
20891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20892$as_echo_n "checking for $ac_word... " >&6; }
20893if test "${ac_cv_prog_AR+set}" = set; then :
20894  $as_echo_n "(cached) " >&6
20895else
20896  if test -n "$AR"; then
20897  ac_cv_prog_AR="$AR" # Let the user override the test.
20898else
20899as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20900for as_dir in $PATH
20901do
20902  IFS=$as_save_IFS
20903  test -z "$as_dir" && as_dir=.
20904    for ac_exec_ext in '' $ac_executable_extensions; do
20905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20906    ac_cv_prog_AR="${ac_tool_prefix}ar"
20907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20908    break 2
20909  fi
20910done
20911  done
20912IFS=$as_save_IFS
20913
20914fi
20915fi
20916AR=$ac_cv_prog_AR
20917if test -n "$AR"; then
20918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20919$as_echo "$AR" >&6; }
20920else
20921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20922$as_echo "no" >&6; }
20923fi
20924
20925
20926fi
20927if test -z "$ac_cv_prog_AR"; then
20928  ac_ct_AR=$AR
20929  # Extract the first word of "ar", so it can be a program name with args.
20930set dummy ar; ac_word=$2
20931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20932$as_echo_n "checking for $ac_word... " >&6; }
20933if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20934  $as_echo_n "(cached) " >&6
20935else
20936  if test -n "$ac_ct_AR"; then
20937  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20938else
20939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20940for as_dir in $PATH
20941do
20942  IFS=$as_save_IFS
20943  test -z "$as_dir" && as_dir=.
20944    for ac_exec_ext in '' $ac_executable_extensions; do
20945  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20946    ac_cv_prog_ac_ct_AR="ar"
20947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20948    break 2
20949  fi
20950done
20951  done
20952IFS=$as_save_IFS
20953
20954fi
20955fi
20956ac_ct_AR=$ac_cv_prog_ac_ct_AR
20957if test -n "$ac_ct_AR"; then
20958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20959$as_echo "$ac_ct_AR" >&6; }
20960else
20961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20962$as_echo "no" >&6; }
20963fi
20964
20965  if test "x$ac_ct_AR" = x; then
20966    AR=""
20967  else
20968    case $cross_compiling:$ac_tool_warned in
20969yes:)
20970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20972ac_tool_warned=yes ;;
20973esac
20974    AR=$ac_ct_AR
20975  fi
20976else
20977  AR="$ac_cv_prog_AR"
20978fi
20979
20980
20981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20982
20983  # First separate the path from the arguments. This will split at the first
20984  # space.
20985  complete="$AR"
20986  path="${complete%% *}"
20987  tmp="$complete EOL"
20988  arguments="${tmp#* }"
20989
20990  # Input might be given as Windows format, start by converting to
20991  # unix format.
20992  new_path=`$CYGPATH -u "$path"`
20993
20994  # Now try to locate executable using which
20995  new_path=`$WHICH "$new_path" 2> /dev/null`
20996  # bat and cmd files are not always considered executable in cygwin causing which
20997  # to not find them
20998  if test "x$new_path" = x \
20999           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21000           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21001    new_path=`$CYGPATH -u "$path"`
21002  fi
21003  if test "x$new_path" = x; then
21004    # Oops. Which didn't find the executable.
21005    # The splitting of arguments from the executable at a space might have been incorrect,
21006    # since paths with space are more likely in Windows. Give it another try with the whole
21007    # argument.
21008    path="$complete"
21009    arguments="EOL"
21010    new_path=`$CYGPATH -u "$path"`
21011    new_path=`$WHICH "$new_path" 2> /dev/null`
21012    # bat and cmd files are not always considered executable in cygwin causing which
21013    # to not find them
21014    if test "x$new_path" = x \
21015             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21016             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21017      new_path=`$CYGPATH -u "$path"`
21018    fi
21019    if test "x$new_path" = x; then
21020      # It's still not found. Now this is an unrecoverable error.
21021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21022$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21023      has_space=`$ECHO "$complete" | $GREP " "`
21024      if test "x$has_space" != x; then
21025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21027      fi
21028      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21029    fi
21030  fi
21031
21032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21035  # "foo.exe" is OK but "foo" is an error.
21036  #
21037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21038  # It is also a way to make sure we got the proper file name for the real test later on.
21039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21040  if test "x$test_shortpath" = x; then
21041    # Short path failed, file does not exist as specified.
21042    # Try adding .exe or .cmd
21043    if test -f "${new_path}.exe"; then
21044       input_to_shortpath="${new_path}.exe"
21045    elif test -f "${new_path}.cmd"; then
21046       input_to_shortpath="${new_path}.cmd"
21047    else
21048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21049$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21052      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21053    fi
21054  else
21055    input_to_shortpath="$new_path"
21056  fi
21057
21058  # Call helper function which possibly converts this using DOS-style short mode.
21059  # If so, the updated path is stored in $new_path.
21060  new_path="$input_to_shortpath"
21061
21062  input_path="$input_to_shortpath"
21063  # Check if we need to convert this using DOS-style short mode. If the path
21064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21065  # take no chances and rewrite it.
21066  # Note: m4 eats our [], so we need to use [ and ] instead.
21067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21068  if test "x$has_forbidden_chars" != x; then
21069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21073      # Going to short mode and back again did indeed matter. Since short mode is
21074      # case insensitive, let's make it lowercase to improve readability.
21075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21076      # Now convert it back to Unix-stile (cygpath)
21077      input_path=`$CYGPATH -u "$shortmode_path"`
21078      new_path="$input_path"
21079    fi
21080  fi
21081
21082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21083  if test "x$test_cygdrive_prefix" = x; then
21084    # As a simple fix, exclude /usr/bin since it's not a real path.
21085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21087      # a path prefixed by /cygdrive for fixpath to work.
21088      new_path="$CYGWIN_ROOT_PATH$input_path"
21089    fi
21090  fi
21091
21092  # remove trailing .exe if any
21093  new_path="${new_path/%.exe/}"
21094
21095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21096
21097  # First separate the path from the arguments. This will split at the first
21098  # space.
21099  complete="$AR"
21100  path="${complete%% *}"
21101  tmp="$complete EOL"
21102  arguments="${tmp#* }"
21103
21104  # Input might be given as Windows format, start by converting to
21105  # unix format.
21106  new_path="$path"
21107
21108  windows_path="$new_path"
21109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21110    unix_path=`$CYGPATH -u "$windows_path"`
21111    new_path="$unix_path"
21112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21114    new_path="$unix_path"
21115  fi
21116
21117
21118  # Now try to locate executable using which
21119  new_path=`$WHICH "$new_path" 2> /dev/null`
21120
21121  if test "x$new_path" = x; then
21122    # Oops. Which didn't find the executable.
21123    # The splitting of arguments from the executable at a space might have been incorrect,
21124    # since paths with space are more likely in Windows. Give it another try with the whole
21125    # argument.
21126    path="$complete"
21127    arguments="EOL"
21128    new_path="$path"
21129
21130  windows_path="$new_path"
21131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21132    unix_path=`$CYGPATH -u "$windows_path"`
21133    new_path="$unix_path"
21134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21136    new_path="$unix_path"
21137  fi
21138
21139
21140    new_path=`$WHICH "$new_path" 2> /dev/null`
21141
21142    if test "x$new_path" = x; then
21143      # It's still not found. Now this is an unrecoverable error.
21144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21145$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21146      has_space=`$ECHO "$complete" | $GREP " "`
21147      if test "x$has_space" != x; then
21148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21150      fi
21151      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21152    fi
21153  fi
21154
21155  # Now new_path has a complete unix path to the binary
21156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21157    # Keep paths in /bin as-is, but remove trailing .exe if any
21158    new_path="${new_path/%.exe/}"
21159    # Do not save /bin paths to all_fixpath_prefixes!
21160  else
21161    # Not in mixed or Windows style, start by that.
21162    new_path=`cmd //c echo $new_path`
21163
21164  input_path="$new_path"
21165  # Check if we need to convert this using DOS-style short mode. If the path
21166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21167  # take no chances and rewrite it.
21168  # Note: m4 eats our [], so we need to use [ and ] instead.
21169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21170  if test "x$has_forbidden_chars" != x; then
21171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21173  fi
21174
21175    # Output is in $new_path
21176
21177  windows_path="$new_path"
21178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21179    unix_path=`$CYGPATH -u "$windows_path"`
21180    new_path="$unix_path"
21181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21183    new_path="$unix_path"
21184  fi
21185
21186    # remove trailing .exe if any
21187    new_path="${new_path/%.exe/}"
21188
21189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21191  fi
21192
21193  else
21194    # We're on a posix platform. Hooray! :)
21195    # First separate the path from the arguments. This will split at the first
21196    # space.
21197    complete="$AR"
21198    path="${complete%% *}"
21199    tmp="$complete EOL"
21200    arguments="${tmp#* }"
21201
21202    new_path=`$WHICH $path 2> /dev/null`
21203    if test "x$new_path" = x; then
21204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21205      if test "x$is_absolute_path" != x; then
21206        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21207$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21208        new_path="$path"
21209      else
21210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21211$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21212        has_space=`$ECHO "$complete" | $GREP " "`
21213        if test "x$has_space" != x; then
21214          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21216        fi
21217        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21218      fi
21219    fi
21220  fi
21221
21222  # Now join together the path and the arguments once again
21223  if test "x$arguments" != xEOL; then
21224      new_complete="$new_path ${arguments% *}"
21225  else
21226      new_complete="$new_path"
21227  fi
21228
21229  if test "x$complete" != "x$new_complete"; then
21230    AR="$new_complete"
21231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21232$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21233  fi
21234
21235fi
21236if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21237    ARFLAGS="-r"
21238else
21239    ARFLAGS=""
21240fi
21241
21242
21243# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21244HOTSPOT_CXX="$CXX"
21245HOTSPOT_LD="$LD"
21246
21247
21248
21249COMPILER_NAME=gcc
21250COMPILER_TYPE=CC
21251if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21252
21253    # For now, assume that we are always compiling using cl.exe.
21254    CC_OUT_OPTION=-Fo
21255    EXE_OUT_OPTION=-out:
21256    LD_OUT_OPTION=-out:
21257    AR_OUT_OPTION=-out:
21258    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21259    # program for something completely different.
21260    # Extract the first word of "link", so it can be a program name with args.
21261set dummy link; ac_word=$2
21262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21263$as_echo_n "checking for $ac_word... " >&6; }
21264if test "${ac_cv_prog_WINLD+set}" = set; then :
21265  $as_echo_n "(cached) " >&6
21266else
21267  if test -n "$WINLD"; then
21268  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21269else
21270  ac_prog_rejected=no
21271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21272for as_dir in $PATH
21273do
21274  IFS=$as_save_IFS
21275  test -z "$as_dir" && as_dir=.
21276    for ac_exec_ext in '' $ac_executable_extensions; do
21277  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21278    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21279       ac_prog_rejected=yes
21280       continue
21281     fi
21282    ac_cv_prog_WINLD="link"
21283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21284    break 2
21285  fi
21286done
21287  done
21288IFS=$as_save_IFS
21289
21290if test $ac_prog_rejected = yes; then
21291  # We found a bogon in the path, so make sure we never use it.
21292  set dummy $ac_cv_prog_WINLD
21293  shift
21294  if test $# != 0; then
21295    # We chose a different compiler from the bogus one.
21296    # However, it has the same basename, so the bogon will be chosen
21297    # first if we set WINLD to just the basename; use the full file name.
21298    shift
21299    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21300  fi
21301fi
21302fi
21303fi
21304WINLD=$ac_cv_prog_WINLD
21305if test -n "$WINLD"; then
21306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21307$as_echo "$WINLD" >&6; }
21308else
21309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21310$as_echo "no" >&6; }
21311fi
21312
21313
21314    # Since we must ignore the first found link, WINLD will contain
21315    # the full path to the link.exe program.
21316
21317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21318
21319  # First separate the path from the arguments. This will split at the first
21320  # space.
21321  complete="$WINLD"
21322  path="${complete%% *}"
21323  tmp="$complete EOL"
21324  arguments="${tmp#* }"
21325
21326  # Input might be given as Windows format, start by converting to
21327  # unix format.
21328  new_path=`$CYGPATH -u "$path"`
21329
21330  # Now try to locate executable using which
21331  new_path=`$WHICH "$new_path" 2> /dev/null`
21332  # bat and cmd files are not always considered executable in cygwin causing which
21333  # to not find them
21334  if test "x$new_path" = x \
21335           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21336           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21337    new_path=`$CYGPATH -u "$path"`
21338  fi
21339  if test "x$new_path" = x; then
21340    # Oops. Which didn't find the executable.
21341    # The splitting of arguments from the executable at a space might have been incorrect,
21342    # since paths with space are more likely in Windows. Give it another try with the whole
21343    # argument.
21344    path="$complete"
21345    arguments="EOL"
21346    new_path=`$CYGPATH -u "$path"`
21347    new_path=`$WHICH "$new_path" 2> /dev/null`
21348    # bat and cmd files are not always considered executable in cygwin causing which
21349    # to not find them
21350    if test "x$new_path" = x \
21351             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21352             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21353      new_path=`$CYGPATH -u "$path"`
21354    fi
21355    if test "x$new_path" = x; then
21356      # It's still not found. Now this is an unrecoverable error.
21357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21358$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21359      has_space=`$ECHO "$complete" | $GREP " "`
21360      if test "x$has_space" != x; then
21361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21363      fi
21364      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21365    fi
21366  fi
21367
21368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21371  # "foo.exe" is OK but "foo" is an error.
21372  #
21373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21374  # It is also a way to make sure we got the proper file name for the real test later on.
21375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21376  if test "x$test_shortpath" = x; then
21377    # Short path failed, file does not exist as specified.
21378    # Try adding .exe or .cmd
21379    if test -f "${new_path}.exe"; then
21380       input_to_shortpath="${new_path}.exe"
21381    elif test -f "${new_path}.cmd"; then
21382       input_to_shortpath="${new_path}.cmd"
21383    else
21384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21385$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21388      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21389    fi
21390  else
21391    input_to_shortpath="$new_path"
21392  fi
21393
21394  # Call helper function which possibly converts this using DOS-style short mode.
21395  # If so, the updated path is stored in $new_path.
21396  new_path="$input_to_shortpath"
21397
21398  input_path="$input_to_shortpath"
21399  # Check if we need to convert this using DOS-style short mode. If the path
21400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21401  # take no chances and rewrite it.
21402  # Note: m4 eats our [], so we need to use [ and ] instead.
21403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21404  if test "x$has_forbidden_chars" != x; then
21405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21409      # Going to short mode and back again did indeed matter. Since short mode is
21410      # case insensitive, let's make it lowercase to improve readability.
21411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21412      # Now convert it back to Unix-stile (cygpath)
21413      input_path=`$CYGPATH -u "$shortmode_path"`
21414      new_path="$input_path"
21415    fi
21416  fi
21417
21418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21419  if test "x$test_cygdrive_prefix" = x; then
21420    # As a simple fix, exclude /usr/bin since it's not a real path.
21421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21423      # a path prefixed by /cygdrive for fixpath to work.
21424      new_path="$CYGWIN_ROOT_PATH$input_path"
21425    fi
21426  fi
21427
21428  # remove trailing .exe if any
21429  new_path="${new_path/%.exe/}"
21430
21431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21432
21433  # First separate the path from the arguments. This will split at the first
21434  # space.
21435  complete="$WINLD"
21436  path="${complete%% *}"
21437  tmp="$complete EOL"
21438  arguments="${tmp#* }"
21439
21440  # Input might be given as Windows format, start by converting to
21441  # unix format.
21442  new_path="$path"
21443
21444  windows_path="$new_path"
21445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21446    unix_path=`$CYGPATH -u "$windows_path"`
21447    new_path="$unix_path"
21448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21450    new_path="$unix_path"
21451  fi
21452
21453
21454  # Now try to locate executable using which
21455  new_path=`$WHICH "$new_path" 2> /dev/null`
21456
21457  if test "x$new_path" = x; then
21458    # Oops. Which didn't find the executable.
21459    # The splitting of arguments from the executable at a space might have been incorrect,
21460    # since paths with space are more likely in Windows. Give it another try with the whole
21461    # argument.
21462    path="$complete"
21463    arguments="EOL"
21464    new_path="$path"
21465
21466  windows_path="$new_path"
21467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21468    unix_path=`$CYGPATH -u "$windows_path"`
21469    new_path="$unix_path"
21470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21472    new_path="$unix_path"
21473  fi
21474
21475
21476    new_path=`$WHICH "$new_path" 2> /dev/null`
21477
21478    if test "x$new_path" = x; then
21479      # It's still not found. Now this is an unrecoverable error.
21480      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21481$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21482      has_space=`$ECHO "$complete" | $GREP " "`
21483      if test "x$has_space" != x; then
21484        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21485$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21486      fi
21487      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21488    fi
21489  fi
21490
21491  # Now new_path has a complete unix path to the binary
21492  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21493    # Keep paths in /bin as-is, but remove trailing .exe if any
21494    new_path="${new_path/%.exe/}"
21495    # Do not save /bin paths to all_fixpath_prefixes!
21496  else
21497    # Not in mixed or Windows style, start by that.
21498    new_path=`cmd //c echo $new_path`
21499
21500  input_path="$new_path"
21501  # Check if we need to convert this using DOS-style short mode. If the path
21502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21503  # take no chances and rewrite it.
21504  # Note: m4 eats our [], so we need to use [ and ] instead.
21505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21506  if test "x$has_forbidden_chars" != x; then
21507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21508    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21509  fi
21510
21511    # Output is in $new_path
21512
21513  windows_path="$new_path"
21514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21515    unix_path=`$CYGPATH -u "$windows_path"`
21516    new_path="$unix_path"
21517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21519    new_path="$unix_path"
21520  fi
21521
21522    # remove trailing .exe if any
21523    new_path="${new_path/%.exe/}"
21524
21525    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21526    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21527  fi
21528
21529  else
21530    # We're on a posix platform. Hooray! :)
21531    # First separate the path from the arguments. This will split at the first
21532    # space.
21533    complete="$WINLD"
21534    path="${complete%% *}"
21535    tmp="$complete EOL"
21536    arguments="${tmp#* }"
21537
21538    new_path=`$WHICH $path 2> /dev/null`
21539    if test "x$new_path" = x; then
21540      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21541      if test "x$is_absolute_path" != x; then
21542        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21543$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21544        new_path="$path"
21545      else
21546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21547$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21548        has_space=`$ECHO "$complete" | $GREP " "`
21549        if test "x$has_space" != x; then
21550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21552        fi
21553        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21554      fi
21555    fi
21556  fi
21557
21558  # Now join together the path and the arguments once again
21559  if test "x$arguments" != xEOL; then
21560      new_complete="$new_path ${arguments% *}"
21561  else
21562      new_complete="$new_path"
21563  fi
21564
21565  if test "x$complete" != "x$new_complete"; then
21566    WINLD="$new_complete"
21567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21568$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21569  fi
21570
21571    printf "Windows linker was found at $WINLD\n"
21572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21573$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21574    "$WINLD" --version > /dev/null
21575    if test $? -eq 0 ; then
21576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21577$as_echo "no" >&6; }
21578      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21579    else
21580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21581$as_echo "yes" >&6; }
21582    fi
21583    LD="$WINLD"
21584    LDEXE="$WINLD"
21585    LDCXX="$WINLD"
21586    LDEXECXX="$WINLD"
21587
21588    # Extract the first word of "mt", so it can be a program name with args.
21589set dummy mt; ac_word=$2
21590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21591$as_echo_n "checking for $ac_word... " >&6; }
21592if test "${ac_cv_prog_MT+set}" = set; then :
21593  $as_echo_n "(cached) " >&6
21594else
21595  if test -n "$MT"; then
21596  ac_cv_prog_MT="$MT" # Let the user override the test.
21597else
21598  ac_prog_rejected=no
21599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21600for as_dir in $PATH
21601do
21602  IFS=$as_save_IFS
21603  test -z "$as_dir" && as_dir=.
21604    for ac_exec_ext in '' $ac_executable_extensions; do
21605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21606    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21607       ac_prog_rejected=yes
21608       continue
21609     fi
21610    ac_cv_prog_MT="mt"
21611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21612    break 2
21613  fi
21614done
21615  done
21616IFS=$as_save_IFS
21617
21618if test $ac_prog_rejected = yes; then
21619  # We found a bogon in the path, so make sure we never use it.
21620  set dummy $ac_cv_prog_MT
21621  shift
21622  if test $# != 0; then
21623    # We chose a different compiler from the bogus one.
21624    # However, it has the same basename, so the bogon will be chosen
21625    # first if we set MT to just the basename; use the full file name.
21626    shift
21627    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21628  fi
21629fi
21630fi
21631fi
21632MT=$ac_cv_prog_MT
21633if test -n "$MT"; then
21634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21635$as_echo "$MT" >&6; }
21636else
21637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21638$as_echo "no" >&6; }
21639fi
21640
21641
21642
21643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21644
21645  # First separate the path from the arguments. This will split at the first
21646  # space.
21647  complete="$MT"
21648  path="${complete%% *}"
21649  tmp="$complete EOL"
21650  arguments="${tmp#* }"
21651
21652  # Input might be given as Windows format, start by converting to
21653  # unix format.
21654  new_path=`$CYGPATH -u "$path"`
21655
21656  # Now try to locate executable using which
21657  new_path=`$WHICH "$new_path" 2> /dev/null`
21658  # bat and cmd files are not always considered executable in cygwin causing which
21659  # to not find them
21660  if test "x$new_path" = x \
21661           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21662           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21663    new_path=`$CYGPATH -u "$path"`
21664  fi
21665  if test "x$new_path" = x; then
21666    # Oops. Which didn't find the executable.
21667    # The splitting of arguments from the executable at a space might have been incorrect,
21668    # since paths with space are more likely in Windows. Give it another try with the whole
21669    # argument.
21670    path="$complete"
21671    arguments="EOL"
21672    new_path=`$CYGPATH -u "$path"`
21673    new_path=`$WHICH "$new_path" 2> /dev/null`
21674    # bat and cmd files are not always considered executable in cygwin causing which
21675    # to not find them
21676    if test "x$new_path" = x \
21677             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21678             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21679      new_path=`$CYGPATH -u "$path"`
21680    fi
21681    if test "x$new_path" = x; then
21682      # It's still not found. Now this is an unrecoverable error.
21683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21684$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21685      has_space=`$ECHO "$complete" | $GREP " "`
21686      if test "x$has_space" != x; then
21687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21689      fi
21690      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21691    fi
21692  fi
21693
21694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21697  # "foo.exe" is OK but "foo" is an error.
21698  #
21699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21700  # It is also a way to make sure we got the proper file name for the real test later on.
21701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21702  if test "x$test_shortpath" = x; then
21703    # Short path failed, file does not exist as specified.
21704    # Try adding .exe or .cmd
21705    if test -f "${new_path}.exe"; then
21706       input_to_shortpath="${new_path}.exe"
21707    elif test -f "${new_path}.cmd"; then
21708       input_to_shortpath="${new_path}.cmd"
21709    else
21710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21711$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21714      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21715    fi
21716  else
21717    input_to_shortpath="$new_path"
21718  fi
21719
21720  # Call helper function which possibly converts this using DOS-style short mode.
21721  # If so, the updated path is stored in $new_path.
21722  new_path="$input_to_shortpath"
21723
21724  input_path="$input_to_shortpath"
21725  # Check if we need to convert this using DOS-style short mode. If the path
21726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21727  # take no chances and rewrite it.
21728  # Note: m4 eats our [], so we need to use [ and ] instead.
21729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21730  if test "x$has_forbidden_chars" != x; then
21731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21735      # Going to short mode and back again did indeed matter. Since short mode is
21736      # case insensitive, let's make it lowercase to improve readability.
21737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21738      # Now convert it back to Unix-stile (cygpath)
21739      input_path=`$CYGPATH -u "$shortmode_path"`
21740      new_path="$input_path"
21741    fi
21742  fi
21743
21744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21745  if test "x$test_cygdrive_prefix" = x; then
21746    # As a simple fix, exclude /usr/bin since it's not a real path.
21747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21749      # a path prefixed by /cygdrive for fixpath to work.
21750      new_path="$CYGWIN_ROOT_PATH$input_path"
21751    fi
21752  fi
21753
21754  # remove trailing .exe if any
21755  new_path="${new_path/%.exe/}"
21756
21757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21758
21759  # First separate the path from the arguments. This will split at the first
21760  # space.
21761  complete="$MT"
21762  path="${complete%% *}"
21763  tmp="$complete EOL"
21764  arguments="${tmp#* }"
21765
21766  # Input might be given as Windows format, start by converting to
21767  # unix format.
21768  new_path="$path"
21769
21770  windows_path="$new_path"
21771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21772    unix_path=`$CYGPATH -u "$windows_path"`
21773    new_path="$unix_path"
21774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21776    new_path="$unix_path"
21777  fi
21778
21779
21780  # Now try to locate executable using which
21781  new_path=`$WHICH "$new_path" 2> /dev/null`
21782
21783  if test "x$new_path" = x; then
21784    # Oops. Which didn't find the executable.
21785    # The splitting of arguments from the executable at a space might have been incorrect,
21786    # since paths with space are more likely in Windows. Give it another try with the whole
21787    # argument.
21788    path="$complete"
21789    arguments="EOL"
21790    new_path="$path"
21791
21792  windows_path="$new_path"
21793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21794    unix_path=`$CYGPATH -u "$windows_path"`
21795    new_path="$unix_path"
21796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21798    new_path="$unix_path"
21799  fi
21800
21801
21802    new_path=`$WHICH "$new_path" 2> /dev/null`
21803
21804    if test "x$new_path" = x; then
21805      # It's still not found. Now this is an unrecoverable error.
21806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21807$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21808      has_space=`$ECHO "$complete" | $GREP " "`
21809      if test "x$has_space" != x; then
21810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21812      fi
21813      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21814    fi
21815  fi
21816
21817  # Now new_path has a complete unix path to the binary
21818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21819    # Keep paths in /bin as-is, but remove trailing .exe if any
21820    new_path="${new_path/%.exe/}"
21821    # Do not save /bin paths to all_fixpath_prefixes!
21822  else
21823    # Not in mixed or Windows style, start by that.
21824    new_path=`cmd //c echo $new_path`
21825
21826  input_path="$new_path"
21827  # Check if we need to convert this using DOS-style short mode. If the path
21828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21829  # take no chances and rewrite it.
21830  # Note: m4 eats our [], so we need to use [ and ] instead.
21831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21832  if test "x$has_forbidden_chars" != x; then
21833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21835  fi
21836
21837    # Output is in $new_path
21838
21839  windows_path="$new_path"
21840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21841    unix_path=`$CYGPATH -u "$windows_path"`
21842    new_path="$unix_path"
21843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21845    new_path="$unix_path"
21846  fi
21847
21848    # remove trailing .exe if any
21849    new_path="${new_path/%.exe/}"
21850
21851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21853  fi
21854
21855  else
21856    # We're on a posix platform. Hooray! :)
21857    # First separate the path from the arguments. This will split at the first
21858    # space.
21859    complete="$MT"
21860    path="${complete%% *}"
21861    tmp="$complete EOL"
21862    arguments="${tmp#* }"
21863
21864    new_path=`$WHICH $path 2> /dev/null`
21865    if test "x$new_path" = x; then
21866      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21867      if test "x$is_absolute_path" != x; then
21868        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21869$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21870        new_path="$path"
21871      else
21872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21873$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21874        has_space=`$ECHO "$complete" | $GREP " "`
21875        if test "x$has_space" != x; then
21876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21878        fi
21879        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21880      fi
21881    fi
21882  fi
21883
21884  # Now join together the path and the arguments once again
21885  if test "x$arguments" != xEOL; then
21886      new_complete="$new_path ${arguments% *}"
21887  else
21888      new_complete="$new_path"
21889  fi
21890
21891  if test "x$complete" != "x$new_complete"; then
21892    MT="$new_complete"
21893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21894$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21895  fi
21896
21897    # The resource compiler
21898    # Extract the first word of "rc", so it can be a program name with args.
21899set dummy rc; ac_word=$2
21900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21901$as_echo_n "checking for $ac_word... " >&6; }
21902if test "${ac_cv_prog_RC+set}" = set; then :
21903  $as_echo_n "(cached) " >&6
21904else
21905  if test -n "$RC"; then
21906  ac_cv_prog_RC="$RC" # Let the user override the test.
21907else
21908  ac_prog_rejected=no
21909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21910for as_dir in $PATH
21911do
21912  IFS=$as_save_IFS
21913  test -z "$as_dir" && as_dir=.
21914    for ac_exec_ext in '' $ac_executable_extensions; do
21915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21916    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21917       ac_prog_rejected=yes
21918       continue
21919     fi
21920    ac_cv_prog_RC="rc"
21921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21922    break 2
21923  fi
21924done
21925  done
21926IFS=$as_save_IFS
21927
21928if test $ac_prog_rejected = yes; then
21929  # We found a bogon in the path, so make sure we never use it.
21930  set dummy $ac_cv_prog_RC
21931  shift
21932  if test $# != 0; then
21933    # We chose a different compiler from the bogus one.
21934    # However, it has the same basename, so the bogon will be chosen
21935    # first if we set RC to just the basename; use the full file name.
21936    shift
21937    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21938  fi
21939fi
21940fi
21941fi
21942RC=$ac_cv_prog_RC
21943if test -n "$RC"; then
21944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21945$as_echo "$RC" >&6; }
21946else
21947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21948$as_echo "no" >&6; }
21949fi
21950
21951
21952
21953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21954
21955  # First separate the path from the arguments. This will split at the first
21956  # space.
21957  complete="$RC"
21958  path="${complete%% *}"
21959  tmp="$complete EOL"
21960  arguments="${tmp#* }"
21961
21962  # Input might be given as Windows format, start by converting to
21963  # unix format.
21964  new_path=`$CYGPATH -u "$path"`
21965
21966  # Now try to locate executable using which
21967  new_path=`$WHICH "$new_path" 2> /dev/null`
21968  # bat and cmd files are not always considered executable in cygwin causing which
21969  # to not find them
21970  if test "x$new_path" = x \
21971           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21972           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21973    new_path=`$CYGPATH -u "$path"`
21974  fi
21975  if test "x$new_path" = x; then
21976    # Oops. Which didn't find the executable.
21977    # The splitting of arguments from the executable at a space might have been incorrect,
21978    # since paths with space are more likely in Windows. Give it another try with the whole
21979    # argument.
21980    path="$complete"
21981    arguments="EOL"
21982    new_path=`$CYGPATH -u "$path"`
21983    new_path=`$WHICH "$new_path" 2> /dev/null`
21984    # bat and cmd files are not always considered executable in cygwin causing which
21985    # to not find them
21986    if test "x$new_path" = x \
21987             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21988             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21989      new_path=`$CYGPATH -u "$path"`
21990    fi
21991    if test "x$new_path" = x; then
21992      # It's still not found. Now this is an unrecoverable error.
21993      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
21994$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
21995      has_space=`$ECHO "$complete" | $GREP " "`
21996      if test "x$has_space" != x; then
21997        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21998$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21999      fi
22000      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22001    fi
22002  fi
22003
22004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22007  # "foo.exe" is OK but "foo" is an error.
22008  #
22009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22010  # It is also a way to make sure we got the proper file name for the real test later on.
22011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22012  if test "x$test_shortpath" = x; then
22013    # Short path failed, file does not exist as specified.
22014    # Try adding .exe or .cmd
22015    if test -f "${new_path}.exe"; then
22016       input_to_shortpath="${new_path}.exe"
22017    elif test -f "${new_path}.cmd"; then
22018       input_to_shortpath="${new_path}.cmd"
22019    else
22020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22021$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22022      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22023$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22024      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22025    fi
22026  else
22027    input_to_shortpath="$new_path"
22028  fi
22029
22030  # Call helper function which possibly converts this using DOS-style short mode.
22031  # If so, the updated path is stored in $new_path.
22032  new_path="$input_to_shortpath"
22033
22034  input_path="$input_to_shortpath"
22035  # Check if we need to convert this using DOS-style short mode. If the path
22036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22037  # take no chances and rewrite it.
22038  # Note: m4 eats our [], so we need to use [ and ] instead.
22039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22040  if test "x$has_forbidden_chars" != x; then
22041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22045      # Going to short mode and back again did indeed matter. Since short mode is
22046      # case insensitive, let's make it lowercase to improve readability.
22047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22048      # Now convert it back to Unix-stile (cygpath)
22049      input_path=`$CYGPATH -u "$shortmode_path"`
22050      new_path="$input_path"
22051    fi
22052  fi
22053
22054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22055  if test "x$test_cygdrive_prefix" = x; then
22056    # As a simple fix, exclude /usr/bin since it's not a real path.
22057    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22059      # a path prefixed by /cygdrive for fixpath to work.
22060      new_path="$CYGWIN_ROOT_PATH$input_path"
22061    fi
22062  fi
22063
22064  # remove trailing .exe if any
22065  new_path="${new_path/%.exe/}"
22066
22067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22068
22069  # First separate the path from the arguments. This will split at the first
22070  # space.
22071  complete="$RC"
22072  path="${complete%% *}"
22073  tmp="$complete EOL"
22074  arguments="${tmp#* }"
22075
22076  # Input might be given as Windows format, start by converting to
22077  # unix format.
22078  new_path="$path"
22079
22080  windows_path="$new_path"
22081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22082    unix_path=`$CYGPATH -u "$windows_path"`
22083    new_path="$unix_path"
22084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22086    new_path="$unix_path"
22087  fi
22088
22089
22090  # Now try to locate executable using which
22091  new_path=`$WHICH "$new_path" 2> /dev/null`
22092
22093  if test "x$new_path" = x; then
22094    # Oops. Which didn't find the executable.
22095    # The splitting of arguments from the executable at a space might have been incorrect,
22096    # since paths with space are more likely in Windows. Give it another try with the whole
22097    # argument.
22098    path="$complete"
22099    arguments="EOL"
22100    new_path="$path"
22101
22102  windows_path="$new_path"
22103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22104    unix_path=`$CYGPATH -u "$windows_path"`
22105    new_path="$unix_path"
22106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22108    new_path="$unix_path"
22109  fi
22110
22111
22112    new_path=`$WHICH "$new_path" 2> /dev/null`
22113
22114    if test "x$new_path" = x; then
22115      # It's still not found. Now this is an unrecoverable error.
22116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22117$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22118      has_space=`$ECHO "$complete" | $GREP " "`
22119      if test "x$has_space" != x; then
22120        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22122      fi
22123      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22124    fi
22125  fi
22126
22127  # Now new_path has a complete unix path to the binary
22128  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22129    # Keep paths in /bin as-is, but remove trailing .exe if any
22130    new_path="${new_path/%.exe/}"
22131    # Do not save /bin paths to all_fixpath_prefixes!
22132  else
22133    # Not in mixed or Windows style, start by that.
22134    new_path=`cmd //c echo $new_path`
22135
22136  input_path="$new_path"
22137  # Check if we need to convert this using DOS-style short mode. If the path
22138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22139  # take no chances and rewrite it.
22140  # Note: m4 eats our [], so we need to use [ and ] instead.
22141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22142  if test "x$has_forbidden_chars" != x; then
22143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22145  fi
22146
22147    # Output is in $new_path
22148
22149  windows_path="$new_path"
22150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22151    unix_path=`$CYGPATH -u "$windows_path"`
22152    new_path="$unix_path"
22153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22155    new_path="$unix_path"
22156  fi
22157
22158    # remove trailing .exe if any
22159    new_path="${new_path/%.exe/}"
22160
22161    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22162    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22163  fi
22164
22165  else
22166    # We're on a posix platform. Hooray! :)
22167    # First separate the path from the arguments. This will split at the first
22168    # space.
22169    complete="$RC"
22170    path="${complete%% *}"
22171    tmp="$complete EOL"
22172    arguments="${tmp#* }"
22173
22174    new_path=`$WHICH $path 2> /dev/null`
22175    if test "x$new_path" = x; then
22176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22177      if test "x$is_absolute_path" != x; then
22178        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22179$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22180        new_path="$path"
22181      else
22182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22183$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22184        has_space=`$ECHO "$complete" | $GREP " "`
22185        if test "x$has_space" != x; then
22186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22188        fi
22189        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22190      fi
22191    fi
22192  fi
22193
22194  # Now join together the path and the arguments once again
22195  if test "x$arguments" != xEOL; then
22196      new_complete="$new_path ${arguments% *}"
22197  else
22198      new_complete="$new_path"
22199  fi
22200
22201  if test "x$complete" != "x$new_complete"; then
22202    RC="$new_complete"
22203    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22204$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22205  fi
22206
22207
22208    # For hotspot, we need these in Windows mixed path,
22209    # so rewrite them all. Need added .exe suffix.
22210    HOTSPOT_CXX="$CXX.exe"
22211    HOTSPOT_LD="$LD.exe"
22212    HOTSPOT_MT="$MT.exe"
22213    HOTSPOT_RC="$RC.exe"
22214
22215  unix_path="$HOTSPOT_CXX"
22216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22217    windows_path=`$CYGPATH -m "$unix_path"`
22218    HOTSPOT_CXX="$windows_path"
22219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22220    windows_path=`cmd //c echo $unix_path`
22221    HOTSPOT_CXX="$windows_path"
22222  fi
22223
22224
22225  unix_path="$HOTSPOT_LD"
22226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22227    windows_path=`$CYGPATH -m "$unix_path"`
22228    HOTSPOT_LD="$windows_path"
22229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22230    windows_path=`cmd //c echo $unix_path`
22231    HOTSPOT_LD="$windows_path"
22232  fi
22233
22234
22235  unix_path="$HOTSPOT_MT"
22236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22237    windows_path=`$CYGPATH -m "$unix_path"`
22238    HOTSPOT_MT="$windows_path"
22239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22240    windows_path=`cmd //c echo $unix_path`
22241    HOTSPOT_MT="$windows_path"
22242  fi
22243
22244
22245  unix_path="$HOTSPOT_RC"
22246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22247    windows_path=`$CYGPATH -m "$unix_path"`
22248    HOTSPOT_RC="$windows_path"
22249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22250    windows_path=`cmd //c echo $unix_path`
22251    HOTSPOT_RC="$windows_path"
22252  fi
22253
22254
22255
22256
22257    RC_FLAGS="-nologo -l 0x409 -r"
22258    if test "x$VARIANT" = xOPT; then :
22259
22260        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22261
22262fi
22263    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22264    if test "x$JDK_UPDATE_VERSION" = x; then :
22265
22266        JDK_UPDATE_VERSION_NOTNULL=0
22267
22268fi
22269    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22270    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22271    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22272    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22273    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22274    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22275    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22276
22277    # lib.exe is used to create static libraries.
22278    # Extract the first word of "lib", so it can be a program name with args.
22279set dummy lib; ac_word=$2
22280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22281$as_echo_n "checking for $ac_word... " >&6; }
22282if test "${ac_cv_prog_WINAR+set}" = set; then :
22283  $as_echo_n "(cached) " >&6
22284else
22285  if test -n "$WINAR"; then
22286  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22287else
22288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22289for as_dir in $PATH
22290do
22291  IFS=$as_save_IFS
22292  test -z "$as_dir" && as_dir=.
22293    for ac_exec_ext in '' $ac_executable_extensions; do
22294  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22295    ac_cv_prog_WINAR="lib"
22296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22297    break 2
22298  fi
22299done
22300  done
22301IFS=$as_save_IFS
22302
22303fi
22304fi
22305WINAR=$ac_cv_prog_WINAR
22306if test -n "$WINAR"; then
22307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22308$as_echo "$WINAR" >&6; }
22309else
22310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22311$as_echo "no" >&6; }
22312fi
22313
22314
22315
22316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22317
22318  # First separate the path from the arguments. This will split at the first
22319  # space.
22320  complete="$WINAR"
22321  path="${complete%% *}"
22322  tmp="$complete EOL"
22323  arguments="${tmp#* }"
22324
22325  # Input might be given as Windows format, start by converting to
22326  # unix format.
22327  new_path=`$CYGPATH -u "$path"`
22328
22329  # Now try to locate executable using which
22330  new_path=`$WHICH "$new_path" 2> /dev/null`
22331  # bat and cmd files are not always considered executable in cygwin causing which
22332  # to not find them
22333  if test "x$new_path" = x \
22334           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22336    new_path=`$CYGPATH -u "$path"`
22337  fi
22338  if test "x$new_path" = x; then
22339    # Oops. Which didn't find the executable.
22340    # The splitting of arguments from the executable at a space might have been incorrect,
22341    # since paths with space are more likely in Windows. Give it another try with the whole
22342    # argument.
22343    path="$complete"
22344    arguments="EOL"
22345    new_path=`$CYGPATH -u "$path"`
22346    new_path=`$WHICH "$new_path" 2> /dev/null`
22347    # bat and cmd files are not always considered executable in cygwin causing which
22348    # to not find them
22349    if test "x$new_path" = x \
22350             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22352      new_path=`$CYGPATH -u "$path"`
22353    fi
22354    if test "x$new_path" = x; then
22355      # It's still not found. Now this is an unrecoverable error.
22356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22357$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22358      has_space=`$ECHO "$complete" | $GREP " "`
22359      if test "x$has_space" != x; then
22360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22362      fi
22363      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22364    fi
22365  fi
22366
22367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22370  # "foo.exe" is OK but "foo" is an error.
22371  #
22372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22373  # It is also a way to make sure we got the proper file name for the real test later on.
22374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22375  if test "x$test_shortpath" = x; then
22376    # Short path failed, file does not exist as specified.
22377    # Try adding .exe or .cmd
22378    if test -f "${new_path}.exe"; then
22379       input_to_shortpath="${new_path}.exe"
22380    elif test -f "${new_path}.cmd"; then
22381       input_to_shortpath="${new_path}.cmd"
22382    else
22383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22384$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22387      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22388    fi
22389  else
22390    input_to_shortpath="$new_path"
22391  fi
22392
22393  # Call helper function which possibly converts this using DOS-style short mode.
22394  # If so, the updated path is stored in $new_path.
22395  new_path="$input_to_shortpath"
22396
22397  input_path="$input_to_shortpath"
22398  # Check if we need to convert this using DOS-style short mode. If the path
22399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22400  # take no chances and rewrite it.
22401  # Note: m4 eats our [], so we need to use [ and ] instead.
22402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22403  if test "x$has_forbidden_chars" != x; then
22404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22408      # Going to short mode and back again did indeed matter. Since short mode is
22409      # case insensitive, let's make it lowercase to improve readability.
22410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22411      # Now convert it back to Unix-stile (cygpath)
22412      input_path=`$CYGPATH -u "$shortmode_path"`
22413      new_path="$input_path"
22414    fi
22415  fi
22416
22417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22418  if test "x$test_cygdrive_prefix" = x; then
22419    # As a simple fix, exclude /usr/bin since it's not a real path.
22420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22422      # a path prefixed by /cygdrive for fixpath to work.
22423      new_path="$CYGWIN_ROOT_PATH$input_path"
22424    fi
22425  fi
22426
22427  # remove trailing .exe if any
22428  new_path="${new_path/%.exe/}"
22429
22430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22431
22432  # First separate the path from the arguments. This will split at the first
22433  # space.
22434  complete="$WINAR"
22435  path="${complete%% *}"
22436  tmp="$complete EOL"
22437  arguments="${tmp#* }"
22438
22439  # Input might be given as Windows format, start by converting to
22440  # unix format.
22441  new_path="$path"
22442
22443  windows_path="$new_path"
22444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22445    unix_path=`$CYGPATH -u "$windows_path"`
22446    new_path="$unix_path"
22447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22449    new_path="$unix_path"
22450  fi
22451
22452
22453  # Now try to locate executable using which
22454  new_path=`$WHICH "$new_path" 2> /dev/null`
22455
22456  if test "x$new_path" = x; then
22457    # Oops. Which didn't find the executable.
22458    # The splitting of arguments from the executable at a space might have been incorrect,
22459    # since paths with space are more likely in Windows. Give it another try with the whole
22460    # argument.
22461    path="$complete"
22462    arguments="EOL"
22463    new_path="$path"
22464
22465  windows_path="$new_path"
22466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22467    unix_path=`$CYGPATH -u "$windows_path"`
22468    new_path="$unix_path"
22469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22471    new_path="$unix_path"
22472  fi
22473
22474
22475    new_path=`$WHICH "$new_path" 2> /dev/null`
22476
22477    if test "x$new_path" = x; then
22478      # It's still not found. Now this is an unrecoverable error.
22479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22480$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22481      has_space=`$ECHO "$complete" | $GREP " "`
22482      if test "x$has_space" != x; then
22483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22485      fi
22486      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22487    fi
22488  fi
22489
22490  # Now new_path has a complete unix path to the binary
22491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22492    # Keep paths in /bin as-is, but remove trailing .exe if any
22493    new_path="${new_path/%.exe/}"
22494    # Do not save /bin paths to all_fixpath_prefixes!
22495  else
22496    # Not in mixed or Windows style, start by that.
22497    new_path=`cmd //c echo $new_path`
22498
22499  input_path="$new_path"
22500  # Check if we need to convert this using DOS-style short mode. If the path
22501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22502  # take no chances and rewrite it.
22503  # Note: m4 eats our [], so we need to use [ and ] instead.
22504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22505  if test "x$has_forbidden_chars" != x; then
22506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22508  fi
22509
22510    # Output is in $new_path
22511
22512  windows_path="$new_path"
22513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22514    unix_path=`$CYGPATH -u "$windows_path"`
22515    new_path="$unix_path"
22516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22518    new_path="$unix_path"
22519  fi
22520
22521    # remove trailing .exe if any
22522    new_path="${new_path/%.exe/}"
22523
22524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22526  fi
22527
22528  else
22529    # We're on a posix platform. Hooray! :)
22530    # First separate the path from the arguments. This will split at the first
22531    # space.
22532    complete="$WINAR"
22533    path="${complete%% *}"
22534    tmp="$complete EOL"
22535    arguments="${tmp#* }"
22536
22537    new_path=`$WHICH $path 2> /dev/null`
22538    if test "x$new_path" = x; then
22539      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22540      if test "x$is_absolute_path" != x; then
22541        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22542$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22543        new_path="$path"
22544      else
22545        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22546$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22547        has_space=`$ECHO "$complete" | $GREP " "`
22548        if test "x$has_space" != x; then
22549          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22550$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22551        fi
22552        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22553      fi
22554    fi
22555  fi
22556
22557  # Now join together the path and the arguments once again
22558  if test "x$arguments" != xEOL; then
22559      new_complete="$new_path ${arguments% *}"
22560  else
22561      new_complete="$new_path"
22562  fi
22563
22564  if test "x$complete" != "x$new_complete"; then
22565    WINAR="$new_complete"
22566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22567$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22568  fi
22569
22570    AR="$WINAR"
22571    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22572
22573    # Extract the first word of "dumpbin", so it can be a program name with args.
22574set dummy dumpbin; ac_word=$2
22575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22576$as_echo_n "checking for $ac_word... " >&6; }
22577if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22578  $as_echo_n "(cached) " >&6
22579else
22580  if test -n "$DUMPBIN"; then
22581  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22582else
22583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22584for as_dir in $PATH
22585do
22586  IFS=$as_save_IFS
22587  test -z "$as_dir" && as_dir=.
22588    for ac_exec_ext in '' $ac_executable_extensions; do
22589  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22590    ac_cv_prog_DUMPBIN="dumpbin"
22591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22592    break 2
22593  fi
22594done
22595  done
22596IFS=$as_save_IFS
22597
22598fi
22599fi
22600DUMPBIN=$ac_cv_prog_DUMPBIN
22601if test -n "$DUMPBIN"; then
22602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22603$as_echo "$DUMPBIN" >&6; }
22604else
22605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22606$as_echo "no" >&6; }
22607fi
22608
22609
22610
22611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22612
22613  # First separate the path from the arguments. This will split at the first
22614  # space.
22615  complete="$DUMPBIN"
22616  path="${complete%% *}"
22617  tmp="$complete EOL"
22618  arguments="${tmp#* }"
22619
22620  # Input might be given as Windows format, start by converting to
22621  # unix format.
22622  new_path=`$CYGPATH -u "$path"`
22623
22624  # Now try to locate executable using which
22625  new_path=`$WHICH "$new_path" 2> /dev/null`
22626  # bat and cmd files are not always considered executable in cygwin causing which
22627  # to not find them
22628  if test "x$new_path" = x \
22629           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22630           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22631    new_path=`$CYGPATH -u "$path"`
22632  fi
22633  if test "x$new_path" = x; then
22634    # Oops. Which didn't find the executable.
22635    # The splitting of arguments from the executable at a space might have been incorrect,
22636    # since paths with space are more likely in Windows. Give it another try with the whole
22637    # argument.
22638    path="$complete"
22639    arguments="EOL"
22640    new_path=`$CYGPATH -u "$path"`
22641    new_path=`$WHICH "$new_path" 2> /dev/null`
22642    # bat and cmd files are not always considered executable in cygwin causing which
22643    # to not find them
22644    if test "x$new_path" = x \
22645             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22646             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22647      new_path=`$CYGPATH -u "$path"`
22648    fi
22649    if test "x$new_path" = x; then
22650      # It's still not found. Now this is an unrecoverable error.
22651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22652$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22653      has_space=`$ECHO "$complete" | $GREP " "`
22654      if test "x$has_space" != x; then
22655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22657      fi
22658      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22659    fi
22660  fi
22661
22662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22665  # "foo.exe" is OK but "foo" is an error.
22666  #
22667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22668  # It is also a way to make sure we got the proper file name for the real test later on.
22669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22670  if test "x$test_shortpath" = x; then
22671    # Short path failed, file does not exist as specified.
22672    # Try adding .exe or .cmd
22673    if test -f "${new_path}.exe"; then
22674       input_to_shortpath="${new_path}.exe"
22675    elif test -f "${new_path}.cmd"; then
22676       input_to_shortpath="${new_path}.cmd"
22677    else
22678      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22679$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22680      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22681$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22682      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22683    fi
22684  else
22685    input_to_shortpath="$new_path"
22686  fi
22687
22688  # Call helper function which possibly converts this using DOS-style short mode.
22689  # If so, the updated path is stored in $new_path.
22690  new_path="$input_to_shortpath"
22691
22692  input_path="$input_to_shortpath"
22693  # Check if we need to convert this using DOS-style short mode. If the path
22694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22695  # take no chances and rewrite it.
22696  # Note: m4 eats our [], so we need to use [ and ] instead.
22697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22698  if test "x$has_forbidden_chars" != x; then
22699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22703      # Going to short mode and back again did indeed matter. Since short mode is
22704      # case insensitive, let's make it lowercase to improve readability.
22705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22706      # Now convert it back to Unix-stile (cygpath)
22707      input_path=`$CYGPATH -u "$shortmode_path"`
22708      new_path="$input_path"
22709    fi
22710  fi
22711
22712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22713  if test "x$test_cygdrive_prefix" = x; then
22714    # As a simple fix, exclude /usr/bin since it's not a real path.
22715    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22717      # a path prefixed by /cygdrive for fixpath to work.
22718      new_path="$CYGWIN_ROOT_PATH$input_path"
22719    fi
22720  fi
22721
22722  # remove trailing .exe if any
22723  new_path="${new_path/%.exe/}"
22724
22725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22726
22727  # First separate the path from the arguments. This will split at the first
22728  # space.
22729  complete="$DUMPBIN"
22730  path="${complete%% *}"
22731  tmp="$complete EOL"
22732  arguments="${tmp#* }"
22733
22734  # Input might be given as Windows format, start by converting to
22735  # unix format.
22736  new_path="$path"
22737
22738  windows_path="$new_path"
22739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22740    unix_path=`$CYGPATH -u "$windows_path"`
22741    new_path="$unix_path"
22742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22744    new_path="$unix_path"
22745  fi
22746
22747
22748  # Now try to locate executable using which
22749  new_path=`$WHICH "$new_path" 2> /dev/null`
22750
22751  if test "x$new_path" = x; then
22752    # Oops. Which didn't find the executable.
22753    # The splitting of arguments from the executable at a space might have been incorrect,
22754    # since paths with space are more likely in Windows. Give it another try with the whole
22755    # argument.
22756    path="$complete"
22757    arguments="EOL"
22758    new_path="$path"
22759
22760  windows_path="$new_path"
22761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22762    unix_path=`$CYGPATH -u "$windows_path"`
22763    new_path="$unix_path"
22764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22766    new_path="$unix_path"
22767  fi
22768
22769
22770    new_path=`$WHICH "$new_path" 2> /dev/null`
22771
22772    if test "x$new_path" = x; then
22773      # It's still not found. Now this is an unrecoverable error.
22774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22775$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22776      has_space=`$ECHO "$complete" | $GREP " "`
22777      if test "x$has_space" != x; then
22778        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22779$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22780      fi
22781      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22782    fi
22783  fi
22784
22785  # Now new_path has a complete unix path to the binary
22786  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22787    # Keep paths in /bin as-is, but remove trailing .exe if any
22788    new_path="${new_path/%.exe/}"
22789    # Do not save /bin paths to all_fixpath_prefixes!
22790  else
22791    # Not in mixed or Windows style, start by that.
22792    new_path=`cmd //c echo $new_path`
22793
22794  input_path="$new_path"
22795  # Check if we need to convert this using DOS-style short mode. If the path
22796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22797  # take no chances and rewrite it.
22798  # Note: m4 eats our [], so we need to use [ and ] instead.
22799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22800  if test "x$has_forbidden_chars" != x; then
22801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22802    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22803  fi
22804
22805    # Output is in $new_path
22806
22807  windows_path="$new_path"
22808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22809    unix_path=`$CYGPATH -u "$windows_path"`
22810    new_path="$unix_path"
22811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22813    new_path="$unix_path"
22814  fi
22815
22816    # remove trailing .exe if any
22817    new_path="${new_path/%.exe/}"
22818
22819    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22820    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22821  fi
22822
22823  else
22824    # We're on a posix platform. Hooray! :)
22825    # First separate the path from the arguments. This will split at the first
22826    # space.
22827    complete="$DUMPBIN"
22828    path="${complete%% *}"
22829    tmp="$complete EOL"
22830    arguments="${tmp#* }"
22831
22832    new_path=`$WHICH $path 2> /dev/null`
22833    if test "x$new_path" = x; then
22834      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22835      if test "x$is_absolute_path" != x; then
22836        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22837$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22838        new_path="$path"
22839      else
22840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22841$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22842        has_space=`$ECHO "$complete" | $GREP " "`
22843        if test "x$has_space" != x; then
22844          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22845$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22846        fi
22847        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22848      fi
22849    fi
22850  fi
22851
22852  # Now join together the path and the arguments once again
22853  if test "x$arguments" != xEOL; then
22854      new_complete="$new_path ${arguments% *}"
22855  else
22856      new_complete="$new_path"
22857  fi
22858
22859  if test "x$complete" != "x$new_complete"; then
22860    DUMPBIN="$new_complete"
22861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22862$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22863  fi
22864
22865
22866    COMPILER_TYPE=CL
22867    CCXXFLAGS="$CCXXFLAGS -nologo"
22868
22869fi
22870
22871
22872
22873ac_ext=c
22874ac_cpp='$CPP $CPPFLAGS'
22875ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22876ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22877ac_compiler_gnu=$ac_cv_c_compiler_gnu
22878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22879$as_echo_n "checking how to run the C preprocessor... " >&6; }
22880# On Suns, sometimes $CPP names a directory.
22881if test -n "$CPP" && test -d "$CPP"; then
22882  CPP=
22883fi
22884if test -z "$CPP"; then
22885  if test "${ac_cv_prog_CPP+set}" = set; then :
22886  $as_echo_n "(cached) " >&6
22887else
22888      # Double quotes because CPP needs to be expanded
22889    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22890    do
22891      ac_preproc_ok=false
22892for ac_c_preproc_warn_flag in '' yes
22893do
22894  # Use a header file that comes with gcc, so configuring glibc
22895  # with a fresh cross-compiler works.
22896  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22897  # <limits.h> exists even on freestanding compilers.
22898  # On the NeXT, cc -E runs the code through the compiler's parser,
22899  # not just through cpp. "Syntax error" is here to catch this case.
22900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22901/* end confdefs.h.  */
22902#ifdef __STDC__
22903# include <limits.h>
22904#else
22905# include <assert.h>
22906#endif
22907		     Syntax error
22908_ACEOF
22909if ac_fn_c_try_cpp "$LINENO"; then :
22910
22911else
22912  # Broken: fails on valid input.
22913continue
22914fi
22915rm -f conftest.err conftest.i conftest.$ac_ext
22916
22917  # OK, works on sane cases.  Now check whether nonexistent headers
22918  # can be detected and how.
22919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22920/* end confdefs.h.  */
22921#include <ac_nonexistent.h>
22922_ACEOF
22923if ac_fn_c_try_cpp "$LINENO"; then :
22924  # Broken: success on invalid input.
22925continue
22926else
22927  # Passes both tests.
22928ac_preproc_ok=:
22929break
22930fi
22931rm -f conftest.err conftest.i conftest.$ac_ext
22932
22933done
22934# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22935rm -f conftest.i conftest.err conftest.$ac_ext
22936if $ac_preproc_ok; then :
22937  break
22938fi
22939
22940    done
22941    ac_cv_prog_CPP=$CPP
22942
22943fi
22944  CPP=$ac_cv_prog_CPP
22945else
22946  ac_cv_prog_CPP=$CPP
22947fi
22948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22949$as_echo "$CPP" >&6; }
22950ac_preproc_ok=false
22951for ac_c_preproc_warn_flag in '' yes
22952do
22953  # Use a header file that comes with gcc, so configuring glibc
22954  # with a fresh cross-compiler works.
22955  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22956  # <limits.h> exists even on freestanding compilers.
22957  # On the NeXT, cc -E runs the code through the compiler's parser,
22958  # not just through cpp. "Syntax error" is here to catch this case.
22959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22960/* end confdefs.h.  */
22961#ifdef __STDC__
22962# include <limits.h>
22963#else
22964# include <assert.h>
22965#endif
22966		     Syntax error
22967_ACEOF
22968if ac_fn_c_try_cpp "$LINENO"; then :
22969
22970else
22971  # Broken: fails on valid input.
22972continue
22973fi
22974rm -f conftest.err conftest.i conftest.$ac_ext
22975
22976  # OK, works on sane cases.  Now check whether nonexistent headers
22977  # can be detected and how.
22978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22979/* end confdefs.h.  */
22980#include <ac_nonexistent.h>
22981_ACEOF
22982if ac_fn_c_try_cpp "$LINENO"; then :
22983  # Broken: success on invalid input.
22984continue
22985else
22986  # Passes both tests.
22987ac_preproc_ok=:
22988break
22989fi
22990rm -f conftest.err conftest.i conftest.$ac_ext
22991
22992done
22993# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22994rm -f conftest.i conftest.err conftest.$ac_ext
22995if $ac_preproc_ok; then :
22996
22997else
22998  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23000as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23001See \`config.log' for more details" "$LINENO" 5 ; }
23002fi
23003
23004ac_ext=cpp
23005ac_cpp='$CXXCPP $CPPFLAGS'
23006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23009
23010
23011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23012
23013  # First separate the path from the arguments. This will split at the first
23014  # space.
23015  complete="$CPP"
23016  path="${complete%% *}"
23017  tmp="$complete EOL"
23018  arguments="${tmp#* }"
23019
23020  # Input might be given as Windows format, start by converting to
23021  # unix format.
23022  new_path=`$CYGPATH -u "$path"`
23023
23024  # Now try to locate executable using which
23025  new_path=`$WHICH "$new_path" 2> /dev/null`
23026  # bat and cmd files are not always considered executable in cygwin causing which
23027  # to not find them
23028  if test "x$new_path" = x \
23029           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23030           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23031    new_path=`$CYGPATH -u "$path"`
23032  fi
23033  if test "x$new_path" = x; then
23034    # Oops. Which didn't find the executable.
23035    # The splitting of arguments from the executable at a space might have been incorrect,
23036    # since paths with space are more likely in Windows. Give it another try with the whole
23037    # argument.
23038    path="$complete"
23039    arguments="EOL"
23040    new_path=`$CYGPATH -u "$path"`
23041    new_path=`$WHICH "$new_path" 2> /dev/null`
23042    # bat and cmd files are not always considered executable in cygwin causing which
23043    # to not find them
23044    if test "x$new_path" = x \
23045             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23046             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23047      new_path=`$CYGPATH -u "$path"`
23048    fi
23049    if test "x$new_path" = x; then
23050      # It's still not found. Now this is an unrecoverable error.
23051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23052$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23053      has_space=`$ECHO "$complete" | $GREP " "`
23054      if test "x$has_space" != x; then
23055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23057      fi
23058      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23059    fi
23060  fi
23061
23062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23065  # "foo.exe" is OK but "foo" is an error.
23066  #
23067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23068  # It is also a way to make sure we got the proper file name for the real test later on.
23069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23070  if test "x$test_shortpath" = x; then
23071    # Short path failed, file does not exist as specified.
23072    # Try adding .exe or .cmd
23073    if test -f "${new_path}.exe"; then
23074       input_to_shortpath="${new_path}.exe"
23075    elif test -f "${new_path}.cmd"; then
23076       input_to_shortpath="${new_path}.cmd"
23077    else
23078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23079$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23082      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23083    fi
23084  else
23085    input_to_shortpath="$new_path"
23086  fi
23087
23088  # Call helper function which possibly converts this using DOS-style short mode.
23089  # If so, the updated path is stored in $new_path.
23090  new_path="$input_to_shortpath"
23091
23092  input_path="$input_to_shortpath"
23093  # Check if we need to convert this using DOS-style short mode. If the path
23094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23095  # take no chances and rewrite it.
23096  # Note: m4 eats our [], so we need to use [ and ] instead.
23097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23098  if test "x$has_forbidden_chars" != x; then
23099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23103      # Going to short mode and back again did indeed matter. Since short mode is
23104      # case insensitive, let's make it lowercase to improve readability.
23105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23106      # Now convert it back to Unix-stile (cygpath)
23107      input_path=`$CYGPATH -u "$shortmode_path"`
23108      new_path="$input_path"
23109    fi
23110  fi
23111
23112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23113  if test "x$test_cygdrive_prefix" = x; then
23114    # As a simple fix, exclude /usr/bin since it's not a real path.
23115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23117      # a path prefixed by /cygdrive for fixpath to work.
23118      new_path="$CYGWIN_ROOT_PATH$input_path"
23119    fi
23120  fi
23121
23122  # remove trailing .exe if any
23123  new_path="${new_path/%.exe/}"
23124
23125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126
23127  # First separate the path from the arguments. This will split at the first
23128  # space.
23129  complete="$CPP"
23130  path="${complete%% *}"
23131  tmp="$complete EOL"
23132  arguments="${tmp#* }"
23133
23134  # Input might be given as Windows format, start by converting to
23135  # unix format.
23136  new_path="$path"
23137
23138  windows_path="$new_path"
23139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23140    unix_path=`$CYGPATH -u "$windows_path"`
23141    new_path="$unix_path"
23142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23144    new_path="$unix_path"
23145  fi
23146
23147
23148  # Now try to locate executable using which
23149  new_path=`$WHICH "$new_path" 2> /dev/null`
23150
23151  if test "x$new_path" = x; then
23152    # Oops. Which didn't find the executable.
23153    # The splitting of arguments from the executable at a space might have been incorrect,
23154    # since paths with space are more likely in Windows. Give it another try with the whole
23155    # argument.
23156    path="$complete"
23157    arguments="EOL"
23158    new_path="$path"
23159
23160  windows_path="$new_path"
23161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23162    unix_path=`$CYGPATH -u "$windows_path"`
23163    new_path="$unix_path"
23164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23166    new_path="$unix_path"
23167  fi
23168
23169
23170    new_path=`$WHICH "$new_path" 2> /dev/null`
23171
23172    if test "x$new_path" = x; then
23173      # It's still not found. Now this is an unrecoverable error.
23174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23175$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23176      has_space=`$ECHO "$complete" | $GREP " "`
23177      if test "x$has_space" != x; then
23178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23180      fi
23181      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23182    fi
23183  fi
23184
23185  # Now new_path has a complete unix path to the binary
23186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23187    # Keep paths in /bin as-is, but remove trailing .exe if any
23188    new_path="${new_path/%.exe/}"
23189    # Do not save /bin paths to all_fixpath_prefixes!
23190  else
23191    # Not in mixed or Windows style, start by that.
23192    new_path=`cmd //c echo $new_path`
23193
23194  input_path="$new_path"
23195  # Check if we need to convert this using DOS-style short mode. If the path
23196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23197  # take no chances and rewrite it.
23198  # Note: m4 eats our [], so we need to use [ and ] instead.
23199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23200  if test "x$has_forbidden_chars" != x; then
23201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23203  fi
23204
23205    # Output is in $new_path
23206
23207  windows_path="$new_path"
23208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209    unix_path=`$CYGPATH -u "$windows_path"`
23210    new_path="$unix_path"
23211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23213    new_path="$unix_path"
23214  fi
23215
23216    # remove trailing .exe if any
23217    new_path="${new_path/%.exe/}"
23218
23219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23221  fi
23222
23223  else
23224    # We're on a posix platform. Hooray! :)
23225    # First separate the path from the arguments. This will split at the first
23226    # space.
23227    complete="$CPP"
23228    path="${complete%% *}"
23229    tmp="$complete EOL"
23230    arguments="${tmp#* }"
23231
23232    new_path=`$WHICH $path 2> /dev/null`
23233    if test "x$new_path" = x; then
23234      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23235      if test "x$is_absolute_path" != x; then
23236        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23237$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23238        new_path="$path"
23239      else
23240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23241$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23242        has_space=`$ECHO "$complete" | $GREP " "`
23243        if test "x$has_space" != x; then
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23246        fi
23247        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23248      fi
23249    fi
23250  fi
23251
23252  # Now join together the path and the arguments once again
23253  if test "x$arguments" != xEOL; then
23254      new_complete="$new_path ${arguments% *}"
23255  else
23256      new_complete="$new_path"
23257  fi
23258
23259  if test "x$complete" != "x$new_complete"; then
23260    CPP="$new_complete"
23261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23262$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23263  fi
23264
23265
23266ac_ext=cpp
23267ac_cpp='$CXXCPP $CPPFLAGS'
23268ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23269ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23270ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23272$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23273if test -z "$CXXCPP"; then
23274  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23275  $as_echo_n "(cached) " >&6
23276else
23277      # Double quotes because CXXCPP needs to be expanded
23278    for CXXCPP in "$CXX -E" "/lib/cpp"
23279    do
23280      ac_preproc_ok=false
23281for ac_cxx_preproc_warn_flag in '' yes
23282do
23283  # Use a header file that comes with gcc, so configuring glibc
23284  # with a fresh cross-compiler works.
23285  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23286  # <limits.h> exists even on freestanding compilers.
23287  # On the NeXT, cc -E runs the code through the compiler's parser,
23288  # not just through cpp. "Syntax error" is here to catch this case.
23289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23290/* end confdefs.h.  */
23291#ifdef __STDC__
23292# include <limits.h>
23293#else
23294# include <assert.h>
23295#endif
23296		     Syntax error
23297_ACEOF
23298if ac_fn_cxx_try_cpp "$LINENO"; then :
23299
23300else
23301  # Broken: fails on valid input.
23302continue
23303fi
23304rm -f conftest.err conftest.i conftest.$ac_ext
23305
23306  # OK, works on sane cases.  Now check whether nonexistent headers
23307  # can be detected and how.
23308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23309/* end confdefs.h.  */
23310#include <ac_nonexistent.h>
23311_ACEOF
23312if ac_fn_cxx_try_cpp "$LINENO"; then :
23313  # Broken: success on invalid input.
23314continue
23315else
23316  # Passes both tests.
23317ac_preproc_ok=:
23318break
23319fi
23320rm -f conftest.err conftest.i conftest.$ac_ext
23321
23322done
23323# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23324rm -f conftest.i conftest.err conftest.$ac_ext
23325if $ac_preproc_ok; then :
23326  break
23327fi
23328
23329    done
23330    ac_cv_prog_CXXCPP=$CXXCPP
23331
23332fi
23333  CXXCPP=$ac_cv_prog_CXXCPP
23334else
23335  ac_cv_prog_CXXCPP=$CXXCPP
23336fi
23337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23338$as_echo "$CXXCPP" >&6; }
23339ac_preproc_ok=false
23340for ac_cxx_preproc_warn_flag in '' yes
23341do
23342  # Use a header file that comes with gcc, so configuring glibc
23343  # with a fresh cross-compiler works.
23344  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23345  # <limits.h> exists even on freestanding compilers.
23346  # On the NeXT, cc -E runs the code through the compiler's parser,
23347  # not just through cpp. "Syntax error" is here to catch this case.
23348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23349/* end confdefs.h.  */
23350#ifdef __STDC__
23351# include <limits.h>
23352#else
23353# include <assert.h>
23354#endif
23355		     Syntax error
23356_ACEOF
23357if ac_fn_cxx_try_cpp "$LINENO"; then :
23358
23359else
23360  # Broken: fails on valid input.
23361continue
23362fi
23363rm -f conftest.err conftest.i conftest.$ac_ext
23364
23365  # OK, works on sane cases.  Now check whether nonexistent headers
23366  # can be detected and how.
23367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23368/* end confdefs.h.  */
23369#include <ac_nonexistent.h>
23370_ACEOF
23371if ac_fn_cxx_try_cpp "$LINENO"; then :
23372  # Broken: success on invalid input.
23373continue
23374else
23375  # Passes both tests.
23376ac_preproc_ok=:
23377break
23378fi
23379rm -f conftest.err conftest.i conftest.$ac_ext
23380
23381done
23382# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23383rm -f conftest.i conftest.err conftest.$ac_ext
23384if $ac_preproc_ok; then :
23385
23386else
23387  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23388$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23389as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23390See \`config.log' for more details" "$LINENO" 5 ; }
23391fi
23392
23393ac_ext=cpp
23394ac_cpp='$CXXCPP $CPPFLAGS'
23395ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23396ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23397ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23398
23399
23400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23401
23402  # First separate the path from the arguments. This will split at the first
23403  # space.
23404  complete="$CXXCPP"
23405  path="${complete%% *}"
23406  tmp="$complete EOL"
23407  arguments="${tmp#* }"
23408
23409  # Input might be given as Windows format, start by converting to
23410  # unix format.
23411  new_path=`$CYGPATH -u "$path"`
23412
23413  # Now try to locate executable using which
23414  new_path=`$WHICH "$new_path" 2> /dev/null`
23415  # bat and cmd files are not always considered executable in cygwin causing which
23416  # to not find them
23417  if test "x$new_path" = x \
23418           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23419           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23420    new_path=`$CYGPATH -u "$path"`
23421  fi
23422  if test "x$new_path" = x; then
23423    # Oops. Which didn't find the executable.
23424    # The splitting of arguments from the executable at a space might have been incorrect,
23425    # since paths with space are more likely in Windows. Give it another try with the whole
23426    # argument.
23427    path="$complete"
23428    arguments="EOL"
23429    new_path=`$CYGPATH -u "$path"`
23430    new_path=`$WHICH "$new_path" 2> /dev/null`
23431    # bat and cmd files are not always considered executable in cygwin causing which
23432    # to not find them
23433    if test "x$new_path" = x \
23434             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23435             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23436      new_path=`$CYGPATH -u "$path"`
23437    fi
23438    if test "x$new_path" = x; then
23439      # It's still not found. Now this is an unrecoverable error.
23440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23441$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23442      has_space=`$ECHO "$complete" | $GREP " "`
23443      if test "x$has_space" != x; then
23444        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23445$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23446      fi
23447      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23448    fi
23449  fi
23450
23451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23454  # "foo.exe" is OK but "foo" is an error.
23455  #
23456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23457  # It is also a way to make sure we got the proper file name for the real test later on.
23458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23459  if test "x$test_shortpath" = x; then
23460    # Short path failed, file does not exist as specified.
23461    # Try adding .exe or .cmd
23462    if test -f "${new_path}.exe"; then
23463       input_to_shortpath="${new_path}.exe"
23464    elif test -f "${new_path}.cmd"; then
23465       input_to_shortpath="${new_path}.cmd"
23466    else
23467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23468$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23469      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23470$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23471      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23472    fi
23473  else
23474    input_to_shortpath="$new_path"
23475  fi
23476
23477  # Call helper function which possibly converts this using DOS-style short mode.
23478  # If so, the updated path is stored in $new_path.
23479  new_path="$input_to_shortpath"
23480
23481  input_path="$input_to_shortpath"
23482  # Check if we need to convert this using DOS-style short mode. If the path
23483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23484  # take no chances and rewrite it.
23485  # Note: m4 eats our [], so we need to use [ and ] instead.
23486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23487  if test "x$has_forbidden_chars" != x; then
23488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23492      # Going to short mode and back again did indeed matter. Since short mode is
23493      # case insensitive, let's make it lowercase to improve readability.
23494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23495      # Now convert it back to Unix-stile (cygpath)
23496      input_path=`$CYGPATH -u "$shortmode_path"`
23497      new_path="$input_path"
23498    fi
23499  fi
23500
23501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23502  if test "x$test_cygdrive_prefix" = x; then
23503    # As a simple fix, exclude /usr/bin since it's not a real path.
23504    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23506      # a path prefixed by /cygdrive for fixpath to work.
23507      new_path="$CYGWIN_ROOT_PATH$input_path"
23508    fi
23509  fi
23510
23511  # remove trailing .exe if any
23512  new_path="${new_path/%.exe/}"
23513
23514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23515
23516  # First separate the path from the arguments. This will split at the first
23517  # space.
23518  complete="$CXXCPP"
23519  path="${complete%% *}"
23520  tmp="$complete EOL"
23521  arguments="${tmp#* }"
23522
23523  # Input might be given as Windows format, start by converting to
23524  # unix format.
23525  new_path="$path"
23526
23527  windows_path="$new_path"
23528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23529    unix_path=`$CYGPATH -u "$windows_path"`
23530    new_path="$unix_path"
23531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23533    new_path="$unix_path"
23534  fi
23535
23536
23537  # Now try to locate executable using which
23538  new_path=`$WHICH "$new_path" 2> /dev/null`
23539
23540  if test "x$new_path" = x; then
23541    # Oops. Which didn't find the executable.
23542    # The splitting of arguments from the executable at a space might have been incorrect,
23543    # since paths with space are more likely in Windows. Give it another try with the whole
23544    # argument.
23545    path="$complete"
23546    arguments="EOL"
23547    new_path="$path"
23548
23549  windows_path="$new_path"
23550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23551    unix_path=`$CYGPATH -u "$windows_path"`
23552    new_path="$unix_path"
23553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23555    new_path="$unix_path"
23556  fi
23557
23558
23559    new_path=`$WHICH "$new_path" 2> /dev/null`
23560
23561    if test "x$new_path" = x; then
23562      # It's still not found. Now this is an unrecoverable error.
23563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23564$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23565      has_space=`$ECHO "$complete" | $GREP " "`
23566      if test "x$has_space" != x; then
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23569      fi
23570      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23571    fi
23572  fi
23573
23574  # Now new_path has a complete unix path to the binary
23575  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23576    # Keep paths in /bin as-is, but remove trailing .exe if any
23577    new_path="${new_path/%.exe/}"
23578    # Do not save /bin paths to all_fixpath_prefixes!
23579  else
23580    # Not in mixed or Windows style, start by that.
23581    new_path=`cmd //c echo $new_path`
23582
23583  input_path="$new_path"
23584  # Check if we need to convert this using DOS-style short mode. If the path
23585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23586  # take no chances and rewrite it.
23587  # Note: m4 eats our [], so we need to use [ and ] instead.
23588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23589  if test "x$has_forbidden_chars" != x; then
23590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23592  fi
23593
23594    # Output is in $new_path
23595
23596  windows_path="$new_path"
23597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23598    unix_path=`$CYGPATH -u "$windows_path"`
23599    new_path="$unix_path"
23600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23602    new_path="$unix_path"
23603  fi
23604
23605    # remove trailing .exe if any
23606    new_path="${new_path/%.exe/}"
23607
23608    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23609    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23610  fi
23611
23612  else
23613    # We're on a posix platform. Hooray! :)
23614    # First separate the path from the arguments. This will split at the first
23615    # space.
23616    complete="$CXXCPP"
23617    path="${complete%% *}"
23618    tmp="$complete EOL"
23619    arguments="${tmp#* }"
23620
23621    new_path=`$WHICH $path 2> /dev/null`
23622    if test "x$new_path" = x; then
23623      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23624      if test "x$is_absolute_path" != x; then
23625        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23626$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23627        new_path="$path"
23628      else
23629        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23630$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23631        has_space=`$ECHO "$complete" | $GREP " "`
23632        if test "x$has_space" != x; then
23633          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23634$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23635        fi
23636        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23637      fi
23638    fi
23639  fi
23640
23641  # Now join together the path and the arguments once again
23642  if test "x$arguments" != xEOL; then
23643      new_complete="$new_path ${arguments% *}"
23644  else
23645      new_complete="$new_path"
23646  fi
23647
23648  if test "x$complete" != "x$new_complete"; then
23649    CXXCPP="$new_complete"
23650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23651$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23652  fi
23653
23654
23655if test "x$COMPILE_TYPE" != "xcross"; then
23656    # If we are not cross compiling, use the same compilers for
23657    # building the build platform executables. The cross-compilation
23658    # case needed to be done earlier, but this can only be done after
23659    # the native tools have been localized.
23660    BUILD_CC="$CC"
23661    BUILD_CXX="$CXX"
23662    BUILD_LD="$LD"
23663fi
23664
23665# for solaris we really need solaris tools, and not gnu equivalent
23666#   these seems to normally reside in /usr/ccs/bin so add that to path before
23667#   starting to probe
23668#
23669#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23670#         so that it can be overriden --with-tools-dir
23671if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23672    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23673fi
23674
23675# Find the right assembler.
23676if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23677    # Extract the first word of "as", so it can be a program name with args.
23678set dummy as; ac_word=$2
23679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23680$as_echo_n "checking for $ac_word... " >&6; }
23681if test "${ac_cv_path_AS+set}" = set; then :
23682  $as_echo_n "(cached) " >&6
23683else
23684  case $AS in
23685  [\\/]* | ?:[\\/]*)
23686  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23687  ;;
23688  *)
23689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23690for as_dir in $PATH
23691do
23692  IFS=$as_save_IFS
23693  test -z "$as_dir" && as_dir=.
23694    for ac_exec_ext in '' $ac_executable_extensions; do
23695  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23696    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23698    break 2
23699  fi
23700done
23701  done
23702IFS=$as_save_IFS
23703
23704  ;;
23705esac
23706fi
23707AS=$ac_cv_path_AS
23708if test -n "$AS"; then
23709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23710$as_echo "$AS" >&6; }
23711else
23712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23713$as_echo "no" >&6; }
23714fi
23715
23716
23717
23718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23719
23720  # First separate the path from the arguments. This will split at the first
23721  # space.
23722  complete="$AS"
23723  path="${complete%% *}"
23724  tmp="$complete EOL"
23725  arguments="${tmp#* }"
23726
23727  # Input might be given as Windows format, start by converting to
23728  # unix format.
23729  new_path=`$CYGPATH -u "$path"`
23730
23731  # Now try to locate executable using which
23732  new_path=`$WHICH "$new_path" 2> /dev/null`
23733  # bat and cmd files are not always considered executable in cygwin causing which
23734  # to not find them
23735  if test "x$new_path" = x \
23736           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23737           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23738    new_path=`$CYGPATH -u "$path"`
23739  fi
23740  if test "x$new_path" = x; then
23741    # Oops. Which didn't find the executable.
23742    # The splitting of arguments from the executable at a space might have been incorrect,
23743    # since paths with space are more likely in Windows. Give it another try with the whole
23744    # argument.
23745    path="$complete"
23746    arguments="EOL"
23747    new_path=`$CYGPATH -u "$path"`
23748    new_path=`$WHICH "$new_path" 2> /dev/null`
23749    # bat and cmd files are not always considered executable in cygwin causing which
23750    # to not find them
23751    if test "x$new_path" = x \
23752             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23753             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23754      new_path=`$CYGPATH -u "$path"`
23755    fi
23756    if test "x$new_path" = x; then
23757      # It's still not found. Now this is an unrecoverable error.
23758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23759$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23760      has_space=`$ECHO "$complete" | $GREP " "`
23761      if test "x$has_space" != x; then
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23764      fi
23765      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23766    fi
23767  fi
23768
23769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23772  # "foo.exe" is OK but "foo" is an error.
23773  #
23774  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23775  # It is also a way to make sure we got the proper file name for the real test later on.
23776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23777  if test "x$test_shortpath" = x; then
23778    # Short path failed, file does not exist as specified.
23779    # Try adding .exe or .cmd
23780    if test -f "${new_path}.exe"; then
23781       input_to_shortpath="${new_path}.exe"
23782    elif test -f "${new_path}.cmd"; then
23783       input_to_shortpath="${new_path}.cmd"
23784    else
23785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23786$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23789      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23790    fi
23791  else
23792    input_to_shortpath="$new_path"
23793  fi
23794
23795  # Call helper function which possibly converts this using DOS-style short mode.
23796  # If so, the updated path is stored in $new_path.
23797  new_path="$input_to_shortpath"
23798
23799  input_path="$input_to_shortpath"
23800  # Check if we need to convert this using DOS-style short mode. If the path
23801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23802  # take no chances and rewrite it.
23803  # Note: m4 eats our [], so we need to use [ and ] instead.
23804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23805  if test "x$has_forbidden_chars" != x; then
23806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23810      # Going to short mode and back again did indeed matter. Since short mode is
23811      # case insensitive, let's make it lowercase to improve readability.
23812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23813      # Now convert it back to Unix-stile (cygpath)
23814      input_path=`$CYGPATH -u "$shortmode_path"`
23815      new_path="$input_path"
23816    fi
23817  fi
23818
23819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23820  if test "x$test_cygdrive_prefix" = x; then
23821    # As a simple fix, exclude /usr/bin since it's not a real path.
23822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23824      # a path prefixed by /cygdrive for fixpath to work.
23825      new_path="$CYGWIN_ROOT_PATH$input_path"
23826    fi
23827  fi
23828
23829  # remove trailing .exe if any
23830  new_path="${new_path/%.exe/}"
23831
23832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23833
23834  # First separate the path from the arguments. This will split at the first
23835  # space.
23836  complete="$AS"
23837  path="${complete%% *}"
23838  tmp="$complete EOL"
23839  arguments="${tmp#* }"
23840
23841  # Input might be given as Windows format, start by converting to
23842  # unix format.
23843  new_path="$path"
23844
23845  windows_path="$new_path"
23846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23847    unix_path=`$CYGPATH -u "$windows_path"`
23848    new_path="$unix_path"
23849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23851    new_path="$unix_path"
23852  fi
23853
23854
23855  # Now try to locate executable using which
23856  new_path=`$WHICH "$new_path" 2> /dev/null`
23857
23858  if test "x$new_path" = x; then
23859    # Oops. Which didn't find the executable.
23860    # The splitting of arguments from the executable at a space might have been incorrect,
23861    # since paths with space are more likely in Windows. Give it another try with the whole
23862    # argument.
23863    path="$complete"
23864    arguments="EOL"
23865    new_path="$path"
23866
23867  windows_path="$new_path"
23868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23869    unix_path=`$CYGPATH -u "$windows_path"`
23870    new_path="$unix_path"
23871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23873    new_path="$unix_path"
23874  fi
23875
23876
23877    new_path=`$WHICH "$new_path" 2> /dev/null`
23878
23879    if test "x$new_path" = x; then
23880      # It's still not found. Now this is an unrecoverable error.
23881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23882$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23883      has_space=`$ECHO "$complete" | $GREP " "`
23884      if test "x$has_space" != x; then
23885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23887      fi
23888      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23889    fi
23890  fi
23891
23892  # Now new_path has a complete unix path to the binary
23893  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23894    # Keep paths in /bin as-is, but remove trailing .exe if any
23895    new_path="${new_path/%.exe/}"
23896    # Do not save /bin paths to all_fixpath_prefixes!
23897  else
23898    # Not in mixed or Windows style, start by that.
23899    new_path=`cmd //c echo $new_path`
23900
23901  input_path="$new_path"
23902  # Check if we need to convert this using DOS-style short mode. If the path
23903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23904  # take no chances and rewrite it.
23905  # Note: m4 eats our [], so we need to use [ and ] instead.
23906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23907  if test "x$has_forbidden_chars" != x; then
23908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23910  fi
23911
23912    # Output is in $new_path
23913
23914  windows_path="$new_path"
23915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23916    unix_path=`$CYGPATH -u "$windows_path"`
23917    new_path="$unix_path"
23918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23920    new_path="$unix_path"
23921  fi
23922
23923    # remove trailing .exe if any
23924    new_path="${new_path/%.exe/}"
23925
23926    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23927    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23928  fi
23929
23930  else
23931    # We're on a posix platform. Hooray! :)
23932    # First separate the path from the arguments. This will split at the first
23933    # space.
23934    complete="$AS"
23935    path="${complete%% *}"
23936    tmp="$complete EOL"
23937    arguments="${tmp#* }"
23938
23939    new_path=`$WHICH $path 2> /dev/null`
23940    if test "x$new_path" = x; then
23941      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23942      if test "x$is_absolute_path" != x; then
23943        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23944$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23945        new_path="$path"
23946      else
23947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23948$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23949        has_space=`$ECHO "$complete" | $GREP " "`
23950        if test "x$has_space" != x; then
23951          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23953        fi
23954        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23955      fi
23956    fi
23957  fi
23958
23959  # Now join together the path and the arguments once again
23960  if test "x$arguments" != xEOL; then
23961      new_complete="$new_path ${arguments% *}"
23962  else
23963      new_complete="$new_path"
23964  fi
23965
23966  if test "x$complete" != "x$new_complete"; then
23967    AS="$new_complete"
23968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23969$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23970  fi
23971
23972else
23973    AS="$CC -c"
23974fi
23975
23976
23977if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23978    for ac_prog in gnm nm
23979do
23980  # Extract the first word of "$ac_prog", so it can be a program name with args.
23981set dummy $ac_prog; ac_word=$2
23982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23983$as_echo_n "checking for $ac_word... " >&6; }
23984if test "${ac_cv_path_NM+set}" = set; then :
23985  $as_echo_n "(cached) " >&6
23986else
23987  case $NM in
23988  [\\/]* | ?:[\\/]*)
23989  ac_cv_path_NM="$NM" # Let the user override the test with a path.
23990  ;;
23991  *)
23992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23993for as_dir in $PATH
23994do
23995  IFS=$as_save_IFS
23996  test -z "$as_dir" && as_dir=.
23997    for ac_exec_ext in '' $ac_executable_extensions; do
23998  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23999    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24001    break 2
24002  fi
24003done
24004  done
24005IFS=$as_save_IFS
24006
24007  ;;
24008esac
24009fi
24010NM=$ac_cv_path_NM
24011if test -n "$NM"; then
24012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24013$as_echo "$NM" >&6; }
24014else
24015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24016$as_echo "no" >&6; }
24017fi
24018
24019
24020  test -n "$NM" && break
24021done
24022
24023
24024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24025
24026  # First separate the path from the arguments. This will split at the first
24027  # space.
24028  complete="$NM"
24029  path="${complete%% *}"
24030  tmp="$complete EOL"
24031  arguments="${tmp#* }"
24032
24033  # Input might be given as Windows format, start by converting to
24034  # unix format.
24035  new_path=`$CYGPATH -u "$path"`
24036
24037  # Now try to locate executable using which
24038  new_path=`$WHICH "$new_path" 2> /dev/null`
24039  # bat and cmd files are not always considered executable in cygwin causing which
24040  # to not find them
24041  if test "x$new_path" = x \
24042           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24043           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24044    new_path=`$CYGPATH -u "$path"`
24045  fi
24046  if test "x$new_path" = x; then
24047    # Oops. Which didn't find the executable.
24048    # The splitting of arguments from the executable at a space might have been incorrect,
24049    # since paths with space are more likely in Windows. Give it another try with the whole
24050    # argument.
24051    path="$complete"
24052    arguments="EOL"
24053    new_path=`$CYGPATH -u "$path"`
24054    new_path=`$WHICH "$new_path" 2> /dev/null`
24055    # bat and cmd files are not always considered executable in cygwin causing which
24056    # to not find them
24057    if test "x$new_path" = x \
24058             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24059             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24060      new_path=`$CYGPATH -u "$path"`
24061    fi
24062    if test "x$new_path" = x; then
24063      # It's still not found. Now this is an unrecoverable error.
24064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24065$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24066      has_space=`$ECHO "$complete" | $GREP " "`
24067      if test "x$has_space" != x; then
24068        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24069$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24070      fi
24071      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24072    fi
24073  fi
24074
24075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24078  # "foo.exe" is OK but "foo" is an error.
24079  #
24080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24081  # It is also a way to make sure we got the proper file name for the real test later on.
24082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24083  if test "x$test_shortpath" = x; then
24084    # Short path failed, file does not exist as specified.
24085    # Try adding .exe or .cmd
24086    if test -f "${new_path}.exe"; then
24087       input_to_shortpath="${new_path}.exe"
24088    elif test -f "${new_path}.cmd"; then
24089       input_to_shortpath="${new_path}.cmd"
24090    else
24091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24092$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24093      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24094$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24095      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24096    fi
24097  else
24098    input_to_shortpath="$new_path"
24099  fi
24100
24101  # Call helper function which possibly converts this using DOS-style short mode.
24102  # If so, the updated path is stored in $new_path.
24103  new_path="$input_to_shortpath"
24104
24105  input_path="$input_to_shortpath"
24106  # Check if we need to convert this using DOS-style short mode. If the path
24107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24108  # take no chances and rewrite it.
24109  # Note: m4 eats our [], so we need to use [ and ] instead.
24110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24111  if test "x$has_forbidden_chars" != x; then
24112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24116      # Going to short mode and back again did indeed matter. Since short mode is
24117      # case insensitive, let's make it lowercase to improve readability.
24118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24119      # Now convert it back to Unix-stile (cygpath)
24120      input_path=`$CYGPATH -u "$shortmode_path"`
24121      new_path="$input_path"
24122    fi
24123  fi
24124
24125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24126  if test "x$test_cygdrive_prefix" = x; then
24127    # As a simple fix, exclude /usr/bin since it's not a real path.
24128    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24130      # a path prefixed by /cygdrive for fixpath to work.
24131      new_path="$CYGWIN_ROOT_PATH$input_path"
24132    fi
24133  fi
24134
24135  # remove trailing .exe if any
24136  new_path="${new_path/%.exe/}"
24137
24138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24139
24140  # First separate the path from the arguments. This will split at the first
24141  # space.
24142  complete="$NM"
24143  path="${complete%% *}"
24144  tmp="$complete EOL"
24145  arguments="${tmp#* }"
24146
24147  # Input might be given as Windows format, start by converting to
24148  # unix format.
24149  new_path="$path"
24150
24151  windows_path="$new_path"
24152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24153    unix_path=`$CYGPATH -u "$windows_path"`
24154    new_path="$unix_path"
24155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24157    new_path="$unix_path"
24158  fi
24159
24160
24161  # Now try to locate executable using which
24162  new_path=`$WHICH "$new_path" 2> /dev/null`
24163
24164  if test "x$new_path" = x; then
24165    # Oops. Which didn't find the executable.
24166    # The splitting of arguments from the executable at a space might have been incorrect,
24167    # since paths with space are more likely in Windows. Give it another try with the whole
24168    # argument.
24169    path="$complete"
24170    arguments="EOL"
24171    new_path="$path"
24172
24173  windows_path="$new_path"
24174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24175    unix_path=`$CYGPATH -u "$windows_path"`
24176    new_path="$unix_path"
24177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24179    new_path="$unix_path"
24180  fi
24181
24182
24183    new_path=`$WHICH "$new_path" 2> /dev/null`
24184
24185    if test "x$new_path" = x; then
24186      # It's still not found. Now this is an unrecoverable error.
24187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24188$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24189      has_space=`$ECHO "$complete" | $GREP " "`
24190      if test "x$has_space" != x; then
24191        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24192$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24193      fi
24194      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24195    fi
24196  fi
24197
24198  # Now new_path has a complete unix path to the binary
24199  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24200    # Keep paths in /bin as-is, but remove trailing .exe if any
24201    new_path="${new_path/%.exe/}"
24202    # Do not save /bin paths to all_fixpath_prefixes!
24203  else
24204    # Not in mixed or Windows style, start by that.
24205    new_path=`cmd //c echo $new_path`
24206
24207  input_path="$new_path"
24208  # Check if we need to convert this using DOS-style short mode. If the path
24209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24210  # take no chances and rewrite it.
24211  # Note: m4 eats our [], so we need to use [ and ] instead.
24212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24213  if test "x$has_forbidden_chars" != x; then
24214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24216  fi
24217
24218    # Output is in $new_path
24219
24220  windows_path="$new_path"
24221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24222    unix_path=`$CYGPATH -u "$windows_path"`
24223    new_path="$unix_path"
24224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24226    new_path="$unix_path"
24227  fi
24228
24229    # remove trailing .exe if any
24230    new_path="${new_path/%.exe/}"
24231
24232    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24233    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24234  fi
24235
24236  else
24237    # We're on a posix platform. Hooray! :)
24238    # First separate the path from the arguments. This will split at the first
24239    # space.
24240    complete="$NM"
24241    path="${complete%% *}"
24242    tmp="$complete EOL"
24243    arguments="${tmp#* }"
24244
24245    new_path=`$WHICH $path 2> /dev/null`
24246    if test "x$new_path" = x; then
24247      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24248      if test "x$is_absolute_path" != x; then
24249        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24250$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24251        new_path="$path"
24252      else
24253        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24254$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24255        has_space=`$ECHO "$complete" | $GREP " "`
24256        if test "x$has_space" != x; then
24257          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24258$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24259        fi
24260        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24261      fi
24262    fi
24263  fi
24264
24265  # Now join together the path and the arguments once again
24266  if test "x$arguments" != xEOL; then
24267      new_complete="$new_path ${arguments% *}"
24268  else
24269      new_complete="$new_path"
24270  fi
24271
24272  if test "x$complete" != "x$new_complete"; then
24273    NM="$new_complete"
24274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24275$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24276  fi
24277
24278    # Extract the first word of "strip", so it can be a program name with args.
24279set dummy strip; ac_word=$2
24280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24281$as_echo_n "checking for $ac_word... " >&6; }
24282if test "${ac_cv_path_STRIP+set}" = set; then :
24283  $as_echo_n "(cached) " >&6
24284else
24285  case $STRIP in
24286  [\\/]* | ?:[\\/]*)
24287  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24288  ;;
24289  *)
24290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24291for as_dir in $PATH
24292do
24293  IFS=$as_save_IFS
24294  test -z "$as_dir" && as_dir=.
24295    for ac_exec_ext in '' $ac_executable_extensions; do
24296  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24297    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24299    break 2
24300  fi
24301done
24302  done
24303IFS=$as_save_IFS
24304
24305  ;;
24306esac
24307fi
24308STRIP=$ac_cv_path_STRIP
24309if test -n "$STRIP"; then
24310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24311$as_echo "$STRIP" >&6; }
24312else
24313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24314$as_echo "no" >&6; }
24315fi
24316
24317
24318
24319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24320
24321  # First separate the path from the arguments. This will split at the first
24322  # space.
24323  complete="$STRIP"
24324  path="${complete%% *}"
24325  tmp="$complete EOL"
24326  arguments="${tmp#* }"
24327
24328  # Input might be given as Windows format, start by converting to
24329  # unix format.
24330  new_path=`$CYGPATH -u "$path"`
24331
24332  # Now try to locate executable using which
24333  new_path=`$WHICH "$new_path" 2> /dev/null`
24334  # bat and cmd files are not always considered executable in cygwin causing which
24335  # to not find them
24336  if test "x$new_path" = x \
24337           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24338           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24339    new_path=`$CYGPATH -u "$path"`
24340  fi
24341  if test "x$new_path" = x; then
24342    # Oops. Which didn't find the executable.
24343    # The splitting of arguments from the executable at a space might have been incorrect,
24344    # since paths with space are more likely in Windows. Give it another try with the whole
24345    # argument.
24346    path="$complete"
24347    arguments="EOL"
24348    new_path=`$CYGPATH -u "$path"`
24349    new_path=`$WHICH "$new_path" 2> /dev/null`
24350    # bat and cmd files are not always considered executable in cygwin causing which
24351    # to not find them
24352    if test "x$new_path" = x \
24353             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24354             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24355      new_path=`$CYGPATH -u "$path"`
24356    fi
24357    if test "x$new_path" = x; then
24358      # It's still not found. Now this is an unrecoverable error.
24359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24360$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24361      has_space=`$ECHO "$complete" | $GREP " "`
24362      if test "x$has_space" != x; then
24363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24365      fi
24366      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24367    fi
24368  fi
24369
24370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24373  # "foo.exe" is OK but "foo" is an error.
24374  #
24375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24376  # It is also a way to make sure we got the proper file name for the real test later on.
24377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24378  if test "x$test_shortpath" = x; then
24379    # Short path failed, file does not exist as specified.
24380    # Try adding .exe or .cmd
24381    if test -f "${new_path}.exe"; then
24382       input_to_shortpath="${new_path}.exe"
24383    elif test -f "${new_path}.cmd"; then
24384       input_to_shortpath="${new_path}.cmd"
24385    else
24386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24387$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24388      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24389$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24390      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24391    fi
24392  else
24393    input_to_shortpath="$new_path"
24394  fi
24395
24396  # Call helper function which possibly converts this using DOS-style short mode.
24397  # If so, the updated path is stored in $new_path.
24398  new_path="$input_to_shortpath"
24399
24400  input_path="$input_to_shortpath"
24401  # Check if we need to convert this using DOS-style short mode. If the path
24402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24403  # take no chances and rewrite it.
24404  # Note: m4 eats our [], so we need to use [ and ] instead.
24405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24406  if test "x$has_forbidden_chars" != x; then
24407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24411      # Going to short mode and back again did indeed matter. Since short mode is
24412      # case insensitive, let's make it lowercase to improve readability.
24413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24414      # Now convert it back to Unix-stile (cygpath)
24415      input_path=`$CYGPATH -u "$shortmode_path"`
24416      new_path="$input_path"
24417    fi
24418  fi
24419
24420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24421  if test "x$test_cygdrive_prefix" = x; then
24422    # As a simple fix, exclude /usr/bin since it's not a real path.
24423    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24425      # a path prefixed by /cygdrive for fixpath to work.
24426      new_path="$CYGWIN_ROOT_PATH$input_path"
24427    fi
24428  fi
24429
24430  # remove trailing .exe if any
24431  new_path="${new_path/%.exe/}"
24432
24433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24434
24435  # First separate the path from the arguments. This will split at the first
24436  # space.
24437  complete="$STRIP"
24438  path="${complete%% *}"
24439  tmp="$complete EOL"
24440  arguments="${tmp#* }"
24441
24442  # Input might be given as Windows format, start by converting to
24443  # unix format.
24444  new_path="$path"
24445
24446  windows_path="$new_path"
24447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24448    unix_path=`$CYGPATH -u "$windows_path"`
24449    new_path="$unix_path"
24450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24452    new_path="$unix_path"
24453  fi
24454
24455
24456  # Now try to locate executable using which
24457  new_path=`$WHICH "$new_path" 2> /dev/null`
24458
24459  if test "x$new_path" = x; then
24460    # Oops. Which didn't find the executable.
24461    # The splitting of arguments from the executable at a space might have been incorrect,
24462    # since paths with space are more likely in Windows. Give it another try with the whole
24463    # argument.
24464    path="$complete"
24465    arguments="EOL"
24466    new_path="$path"
24467
24468  windows_path="$new_path"
24469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24470    unix_path=`$CYGPATH -u "$windows_path"`
24471    new_path="$unix_path"
24472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24474    new_path="$unix_path"
24475  fi
24476
24477
24478    new_path=`$WHICH "$new_path" 2> /dev/null`
24479
24480    if test "x$new_path" = x; then
24481      # It's still not found. Now this is an unrecoverable error.
24482      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24483$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24484      has_space=`$ECHO "$complete" | $GREP " "`
24485      if test "x$has_space" != x; then
24486        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24487$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24488      fi
24489      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24490    fi
24491  fi
24492
24493  # Now new_path has a complete unix path to the binary
24494  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24495    # Keep paths in /bin as-is, but remove trailing .exe if any
24496    new_path="${new_path/%.exe/}"
24497    # Do not save /bin paths to all_fixpath_prefixes!
24498  else
24499    # Not in mixed or Windows style, start by that.
24500    new_path=`cmd //c echo $new_path`
24501
24502  input_path="$new_path"
24503  # Check if we need to convert this using DOS-style short mode. If the path
24504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24505  # take no chances and rewrite it.
24506  # Note: m4 eats our [], so we need to use [ and ] instead.
24507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24508  if test "x$has_forbidden_chars" != x; then
24509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24511  fi
24512
24513    # Output is in $new_path
24514
24515  windows_path="$new_path"
24516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24517    unix_path=`$CYGPATH -u "$windows_path"`
24518    new_path="$unix_path"
24519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24521    new_path="$unix_path"
24522  fi
24523
24524    # remove trailing .exe if any
24525    new_path="${new_path/%.exe/}"
24526
24527    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24528    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24529  fi
24530
24531  else
24532    # We're on a posix platform. Hooray! :)
24533    # First separate the path from the arguments. This will split at the first
24534    # space.
24535    complete="$STRIP"
24536    path="${complete%% *}"
24537    tmp="$complete EOL"
24538    arguments="${tmp#* }"
24539
24540    new_path=`$WHICH $path 2> /dev/null`
24541    if test "x$new_path" = x; then
24542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24543      if test "x$is_absolute_path" != x; then
24544        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24545$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24546        new_path="$path"
24547      else
24548        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24549$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24550        has_space=`$ECHO "$complete" | $GREP " "`
24551        if test "x$has_space" != x; then
24552          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24553$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24554        fi
24555        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24556      fi
24557    fi
24558  fi
24559
24560  # Now join together the path and the arguments once again
24561  if test "x$arguments" != xEOL; then
24562      new_complete="$new_path ${arguments% *}"
24563  else
24564      new_complete="$new_path"
24565  fi
24566
24567  if test "x$complete" != "x$new_complete"; then
24568    STRIP="$new_complete"
24569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24570$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24571  fi
24572
24573    # Extract the first word of "mcs", so it can be a program name with args.
24574set dummy mcs; ac_word=$2
24575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24576$as_echo_n "checking for $ac_word... " >&6; }
24577if test "${ac_cv_path_MCS+set}" = set; then :
24578  $as_echo_n "(cached) " >&6
24579else
24580  case $MCS in
24581  [\\/]* | ?:[\\/]*)
24582  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24583  ;;
24584  *)
24585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24586for as_dir in $PATH
24587do
24588  IFS=$as_save_IFS
24589  test -z "$as_dir" && as_dir=.
24590    for ac_exec_ext in '' $ac_executable_extensions; do
24591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24592    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24594    break 2
24595  fi
24596done
24597  done
24598IFS=$as_save_IFS
24599
24600  ;;
24601esac
24602fi
24603MCS=$ac_cv_path_MCS
24604if test -n "$MCS"; then
24605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24606$as_echo "$MCS" >&6; }
24607else
24608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24609$as_echo "no" >&6; }
24610fi
24611
24612
24613
24614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24615
24616  # First separate the path from the arguments. This will split at the first
24617  # space.
24618  complete="$MCS"
24619  path="${complete%% *}"
24620  tmp="$complete EOL"
24621  arguments="${tmp#* }"
24622
24623  # Input might be given as Windows format, start by converting to
24624  # unix format.
24625  new_path=`$CYGPATH -u "$path"`
24626
24627  # Now try to locate executable using which
24628  new_path=`$WHICH "$new_path" 2> /dev/null`
24629  # bat and cmd files are not always considered executable in cygwin causing which
24630  # to not find them
24631  if test "x$new_path" = x \
24632           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24633           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24634    new_path=`$CYGPATH -u "$path"`
24635  fi
24636  if test "x$new_path" = x; then
24637    # Oops. Which didn't find the executable.
24638    # The splitting of arguments from the executable at a space might have been incorrect,
24639    # since paths with space are more likely in Windows. Give it another try with the whole
24640    # argument.
24641    path="$complete"
24642    arguments="EOL"
24643    new_path=`$CYGPATH -u "$path"`
24644    new_path=`$WHICH "$new_path" 2> /dev/null`
24645    # bat and cmd files are not always considered executable in cygwin causing which
24646    # to not find them
24647    if test "x$new_path" = x \
24648             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24649             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24650      new_path=`$CYGPATH -u "$path"`
24651    fi
24652    if test "x$new_path" = x; then
24653      # It's still not found. Now this is an unrecoverable error.
24654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24655$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24656      has_space=`$ECHO "$complete" | $GREP " "`
24657      if test "x$has_space" != x; then
24658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24660      fi
24661      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24662    fi
24663  fi
24664
24665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24668  # "foo.exe" is OK but "foo" is an error.
24669  #
24670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24671  # It is also a way to make sure we got the proper file name for the real test later on.
24672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24673  if test "x$test_shortpath" = x; then
24674    # Short path failed, file does not exist as specified.
24675    # Try adding .exe or .cmd
24676    if test -f "${new_path}.exe"; then
24677       input_to_shortpath="${new_path}.exe"
24678    elif test -f "${new_path}.cmd"; then
24679       input_to_shortpath="${new_path}.cmd"
24680    else
24681      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24682$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24683      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24684$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24685      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24686    fi
24687  else
24688    input_to_shortpath="$new_path"
24689  fi
24690
24691  # Call helper function which possibly converts this using DOS-style short mode.
24692  # If so, the updated path is stored in $new_path.
24693  new_path="$input_to_shortpath"
24694
24695  input_path="$input_to_shortpath"
24696  # Check if we need to convert this using DOS-style short mode. If the path
24697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24698  # take no chances and rewrite it.
24699  # Note: m4 eats our [], so we need to use [ and ] instead.
24700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24701  if test "x$has_forbidden_chars" != x; then
24702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24706      # Going to short mode and back again did indeed matter. Since short mode is
24707      # case insensitive, let's make it lowercase to improve readability.
24708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24709      # Now convert it back to Unix-stile (cygpath)
24710      input_path=`$CYGPATH -u "$shortmode_path"`
24711      new_path="$input_path"
24712    fi
24713  fi
24714
24715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24716  if test "x$test_cygdrive_prefix" = x; then
24717    # As a simple fix, exclude /usr/bin since it's not a real path.
24718    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24720      # a path prefixed by /cygdrive for fixpath to work.
24721      new_path="$CYGWIN_ROOT_PATH$input_path"
24722    fi
24723  fi
24724
24725  # remove trailing .exe if any
24726  new_path="${new_path/%.exe/}"
24727
24728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24729
24730  # First separate the path from the arguments. This will split at the first
24731  # space.
24732  complete="$MCS"
24733  path="${complete%% *}"
24734  tmp="$complete EOL"
24735  arguments="${tmp#* }"
24736
24737  # Input might be given as Windows format, start by converting to
24738  # unix format.
24739  new_path="$path"
24740
24741  windows_path="$new_path"
24742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24743    unix_path=`$CYGPATH -u "$windows_path"`
24744    new_path="$unix_path"
24745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24747    new_path="$unix_path"
24748  fi
24749
24750
24751  # Now try to locate executable using which
24752  new_path=`$WHICH "$new_path" 2> /dev/null`
24753
24754  if test "x$new_path" = x; then
24755    # Oops. Which didn't find the executable.
24756    # The splitting of arguments from the executable at a space might have been incorrect,
24757    # since paths with space are more likely in Windows. Give it another try with the whole
24758    # argument.
24759    path="$complete"
24760    arguments="EOL"
24761    new_path="$path"
24762
24763  windows_path="$new_path"
24764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24765    unix_path=`$CYGPATH -u "$windows_path"`
24766    new_path="$unix_path"
24767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24769    new_path="$unix_path"
24770  fi
24771
24772
24773    new_path=`$WHICH "$new_path" 2> /dev/null`
24774
24775    if test "x$new_path" = x; then
24776      # It's still not found. Now this is an unrecoverable error.
24777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24778$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24779      has_space=`$ECHO "$complete" | $GREP " "`
24780      if test "x$has_space" != x; then
24781        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24782$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24783      fi
24784      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24785    fi
24786  fi
24787
24788  # Now new_path has a complete unix path to the binary
24789  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24790    # Keep paths in /bin as-is, but remove trailing .exe if any
24791    new_path="${new_path/%.exe/}"
24792    # Do not save /bin paths to all_fixpath_prefixes!
24793  else
24794    # Not in mixed or Windows style, start by that.
24795    new_path=`cmd //c echo $new_path`
24796
24797  input_path="$new_path"
24798  # Check if we need to convert this using DOS-style short mode. If the path
24799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24800  # take no chances and rewrite it.
24801  # Note: m4 eats our [], so we need to use [ and ] instead.
24802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24803  if test "x$has_forbidden_chars" != x; then
24804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24805    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24806  fi
24807
24808    # Output is in $new_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    # remove trailing .exe if any
24820    new_path="${new_path/%.exe/}"
24821
24822    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24823    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24824  fi
24825
24826  else
24827    # We're on a posix platform. Hooray! :)
24828    # First separate the path from the arguments. This will split at the first
24829    # space.
24830    complete="$MCS"
24831    path="${complete%% *}"
24832    tmp="$complete EOL"
24833    arguments="${tmp#* }"
24834
24835    new_path=`$WHICH $path 2> /dev/null`
24836    if test "x$new_path" = x; then
24837      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24838      if test "x$is_absolute_path" != x; then
24839        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24840$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24841        new_path="$path"
24842      else
24843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24844$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24845        has_space=`$ECHO "$complete" | $GREP " "`
24846        if test "x$has_space" != x; then
24847          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24848$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24849        fi
24850        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24851      fi
24852    fi
24853  fi
24854
24855  # Now join together the path and the arguments once again
24856  if test "x$arguments" != xEOL; then
24857      new_complete="$new_path ${arguments% *}"
24858  else
24859      new_complete="$new_path"
24860  fi
24861
24862  if test "x$complete" != "x$new_complete"; then
24863    MCS="$new_complete"
24864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24865$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24866  fi
24867
24868elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24869    if test -n "$ac_tool_prefix"; then
24870  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24871set dummy ${ac_tool_prefix}nm; ac_word=$2
24872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24873$as_echo_n "checking for $ac_word... " >&6; }
24874if test "${ac_cv_prog_NM+set}" = set; then :
24875  $as_echo_n "(cached) " >&6
24876else
24877  if test -n "$NM"; then
24878  ac_cv_prog_NM="$NM" # Let the user override the test.
24879else
24880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24881for as_dir in $PATH
24882do
24883  IFS=$as_save_IFS
24884  test -z "$as_dir" && as_dir=.
24885    for ac_exec_ext in '' $ac_executable_extensions; do
24886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24887    ac_cv_prog_NM="${ac_tool_prefix}nm"
24888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24889    break 2
24890  fi
24891done
24892  done
24893IFS=$as_save_IFS
24894
24895fi
24896fi
24897NM=$ac_cv_prog_NM
24898if test -n "$NM"; then
24899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24900$as_echo "$NM" >&6; }
24901else
24902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24903$as_echo "no" >&6; }
24904fi
24905
24906
24907fi
24908if test -z "$ac_cv_prog_NM"; then
24909  ac_ct_NM=$NM
24910  # Extract the first word of "nm", so it can be a program name with args.
24911set dummy nm; ac_word=$2
24912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24913$as_echo_n "checking for $ac_word... " >&6; }
24914if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24915  $as_echo_n "(cached) " >&6
24916else
24917  if test -n "$ac_ct_NM"; then
24918  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24919else
24920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24921for as_dir in $PATH
24922do
24923  IFS=$as_save_IFS
24924  test -z "$as_dir" && as_dir=.
24925    for ac_exec_ext in '' $ac_executable_extensions; do
24926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24927    ac_cv_prog_ac_ct_NM="nm"
24928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24929    break 2
24930  fi
24931done
24932  done
24933IFS=$as_save_IFS
24934
24935fi
24936fi
24937ac_ct_NM=$ac_cv_prog_ac_ct_NM
24938if test -n "$ac_ct_NM"; then
24939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24940$as_echo "$ac_ct_NM" >&6; }
24941else
24942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24943$as_echo "no" >&6; }
24944fi
24945
24946  if test "x$ac_ct_NM" = x; then
24947    NM=""
24948  else
24949    case $cross_compiling:$ac_tool_warned in
24950yes:)
24951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24953ac_tool_warned=yes ;;
24954esac
24955    NM=$ac_ct_NM
24956  fi
24957else
24958  NM="$ac_cv_prog_NM"
24959fi
24960
24961
24962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24963
24964  # First separate the path from the arguments. This will split at the first
24965  # space.
24966  complete="$NM"
24967  path="${complete%% *}"
24968  tmp="$complete EOL"
24969  arguments="${tmp#* }"
24970
24971  # Input might be given as Windows format, start by converting to
24972  # unix format.
24973  new_path=`$CYGPATH -u "$path"`
24974
24975  # Now try to locate executable using which
24976  new_path=`$WHICH "$new_path" 2> /dev/null`
24977  # bat and cmd files are not always considered executable in cygwin causing which
24978  # to not find them
24979  if test "x$new_path" = x \
24980           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24981           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24982    new_path=`$CYGPATH -u "$path"`
24983  fi
24984  if test "x$new_path" = x; then
24985    # Oops. Which didn't find the executable.
24986    # The splitting of arguments from the executable at a space might have been incorrect,
24987    # since paths with space are more likely in Windows. Give it another try with the whole
24988    # argument.
24989    path="$complete"
24990    arguments="EOL"
24991    new_path=`$CYGPATH -u "$path"`
24992    new_path=`$WHICH "$new_path" 2> /dev/null`
24993    # bat and cmd files are not always considered executable in cygwin causing which
24994    # to not find them
24995    if test "x$new_path" = x \
24996             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24997             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24998      new_path=`$CYGPATH -u "$path"`
24999    fi
25000    if test "x$new_path" = x; then
25001      # It's still not found. Now this is an unrecoverable error.
25002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25003$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25004      has_space=`$ECHO "$complete" | $GREP " "`
25005      if test "x$has_space" != x; then
25006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25008      fi
25009      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25010    fi
25011  fi
25012
25013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25016  # "foo.exe" is OK but "foo" is an error.
25017  #
25018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25019  # It is also a way to make sure we got the proper file name for the real test later on.
25020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25021  if test "x$test_shortpath" = x; then
25022    # Short path failed, file does not exist as specified.
25023    # Try adding .exe or .cmd
25024    if test -f "${new_path}.exe"; then
25025       input_to_shortpath="${new_path}.exe"
25026    elif test -f "${new_path}.cmd"; then
25027       input_to_shortpath="${new_path}.cmd"
25028    else
25029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25030$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25033      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25034    fi
25035  else
25036    input_to_shortpath="$new_path"
25037  fi
25038
25039  # Call helper function which possibly converts this using DOS-style short mode.
25040  # If so, the updated path is stored in $new_path.
25041  new_path="$input_to_shortpath"
25042
25043  input_path="$input_to_shortpath"
25044  # Check if we need to convert this using DOS-style short mode. If the path
25045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25046  # take no chances and rewrite it.
25047  # Note: m4 eats our [], so we need to use [ and ] instead.
25048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25049  if test "x$has_forbidden_chars" != x; then
25050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25054      # Going to short mode and back again did indeed matter. Since short mode is
25055      # case insensitive, let's make it lowercase to improve readability.
25056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25057      # Now convert it back to Unix-stile (cygpath)
25058      input_path=`$CYGPATH -u "$shortmode_path"`
25059      new_path="$input_path"
25060    fi
25061  fi
25062
25063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25064  if test "x$test_cygdrive_prefix" = x; then
25065    # As a simple fix, exclude /usr/bin since it's not a real path.
25066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25068      # a path prefixed by /cygdrive for fixpath to work.
25069      new_path="$CYGWIN_ROOT_PATH$input_path"
25070    fi
25071  fi
25072
25073  # remove trailing .exe if any
25074  new_path="${new_path/%.exe/}"
25075
25076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25077
25078  # First separate the path from the arguments. This will split at the first
25079  # space.
25080  complete="$NM"
25081  path="${complete%% *}"
25082  tmp="$complete EOL"
25083  arguments="${tmp#* }"
25084
25085  # Input might be given as Windows format, start by converting to
25086  # unix format.
25087  new_path="$path"
25088
25089  windows_path="$new_path"
25090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25091    unix_path=`$CYGPATH -u "$windows_path"`
25092    new_path="$unix_path"
25093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25095    new_path="$unix_path"
25096  fi
25097
25098
25099  # Now try to locate executable using which
25100  new_path=`$WHICH "$new_path" 2> /dev/null`
25101
25102  if test "x$new_path" = x; then
25103    # Oops. Which didn't find the executable.
25104    # The splitting of arguments from the executable at a space might have been incorrect,
25105    # since paths with space are more likely in Windows. Give it another try with the whole
25106    # argument.
25107    path="$complete"
25108    arguments="EOL"
25109    new_path="$path"
25110
25111  windows_path="$new_path"
25112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25113    unix_path=`$CYGPATH -u "$windows_path"`
25114    new_path="$unix_path"
25115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25117    new_path="$unix_path"
25118  fi
25119
25120
25121    new_path=`$WHICH "$new_path" 2> /dev/null`
25122
25123    if test "x$new_path" = x; then
25124      # It's still not found. Now this is an unrecoverable error.
25125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25126$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25127      has_space=`$ECHO "$complete" | $GREP " "`
25128      if test "x$has_space" != x; then
25129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25131      fi
25132      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25133    fi
25134  fi
25135
25136  # Now new_path has a complete unix path to the binary
25137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25138    # Keep paths in /bin as-is, but remove trailing .exe if any
25139    new_path="${new_path/%.exe/}"
25140    # Do not save /bin paths to all_fixpath_prefixes!
25141  else
25142    # Not in mixed or Windows style, start by that.
25143    new_path=`cmd //c echo $new_path`
25144
25145  input_path="$new_path"
25146  # Check if we need to convert this using DOS-style short mode. If the path
25147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25148  # take no chances and rewrite it.
25149  # Note: m4 eats our [], so we need to use [ and ] instead.
25150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25151  if test "x$has_forbidden_chars" != x; then
25152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25154  fi
25155
25156    # Output is in $new_path
25157
25158  windows_path="$new_path"
25159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25160    unix_path=`$CYGPATH -u "$windows_path"`
25161    new_path="$unix_path"
25162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25164    new_path="$unix_path"
25165  fi
25166
25167    # remove trailing .exe if any
25168    new_path="${new_path/%.exe/}"
25169
25170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25172  fi
25173
25174  else
25175    # We're on a posix platform. Hooray! :)
25176    # First separate the path from the arguments. This will split at the first
25177    # space.
25178    complete="$NM"
25179    path="${complete%% *}"
25180    tmp="$complete EOL"
25181    arguments="${tmp#* }"
25182
25183    new_path=`$WHICH $path 2> /dev/null`
25184    if test "x$new_path" = x; then
25185      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25186      if test "x$is_absolute_path" != x; then
25187        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25188$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25189        new_path="$path"
25190      else
25191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25192$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25193        has_space=`$ECHO "$complete" | $GREP " "`
25194        if test "x$has_space" != x; then
25195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25197        fi
25198        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25199      fi
25200    fi
25201  fi
25202
25203  # Now join together the path and the arguments once again
25204  if test "x$arguments" != xEOL; then
25205      new_complete="$new_path ${arguments% *}"
25206  else
25207      new_complete="$new_path"
25208  fi
25209
25210  if test "x$complete" != "x$new_complete"; then
25211    NM="$new_complete"
25212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25213$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25214  fi
25215
25216    if test -n "$ac_tool_prefix"; then
25217  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25218set dummy ${ac_tool_prefix}strip; ac_word=$2
25219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25220$as_echo_n "checking for $ac_word... " >&6; }
25221if test "${ac_cv_prog_STRIP+set}" = set; then :
25222  $as_echo_n "(cached) " >&6
25223else
25224  if test -n "$STRIP"; then
25225  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25226else
25227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25228for as_dir in $PATH
25229do
25230  IFS=$as_save_IFS
25231  test -z "$as_dir" && as_dir=.
25232    for ac_exec_ext in '' $ac_executable_extensions; do
25233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25234    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25236    break 2
25237  fi
25238done
25239  done
25240IFS=$as_save_IFS
25241
25242fi
25243fi
25244STRIP=$ac_cv_prog_STRIP
25245if test -n "$STRIP"; then
25246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25247$as_echo "$STRIP" >&6; }
25248else
25249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25250$as_echo "no" >&6; }
25251fi
25252
25253
25254fi
25255if test -z "$ac_cv_prog_STRIP"; then
25256  ac_ct_STRIP=$STRIP
25257  # Extract the first word of "strip", so it can be a program name with args.
25258set dummy strip; ac_word=$2
25259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25260$as_echo_n "checking for $ac_word... " >&6; }
25261if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25262  $as_echo_n "(cached) " >&6
25263else
25264  if test -n "$ac_ct_STRIP"; then
25265  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25266else
25267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25268for as_dir in $PATH
25269do
25270  IFS=$as_save_IFS
25271  test -z "$as_dir" && as_dir=.
25272    for ac_exec_ext in '' $ac_executable_extensions; do
25273  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25274    ac_cv_prog_ac_ct_STRIP="strip"
25275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25276    break 2
25277  fi
25278done
25279  done
25280IFS=$as_save_IFS
25281
25282fi
25283fi
25284ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25285if test -n "$ac_ct_STRIP"; then
25286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25287$as_echo "$ac_ct_STRIP" >&6; }
25288else
25289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25290$as_echo "no" >&6; }
25291fi
25292
25293  if test "x$ac_ct_STRIP" = x; then
25294    STRIP=""
25295  else
25296    case $cross_compiling:$ac_tool_warned in
25297yes:)
25298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25300ac_tool_warned=yes ;;
25301esac
25302    STRIP=$ac_ct_STRIP
25303  fi
25304else
25305  STRIP="$ac_cv_prog_STRIP"
25306fi
25307
25308
25309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25310
25311  # First separate the path from the arguments. This will split at the first
25312  # space.
25313  complete="$STRIP"
25314  path="${complete%% *}"
25315  tmp="$complete EOL"
25316  arguments="${tmp#* }"
25317
25318  # Input might be given as Windows format, start by converting to
25319  # unix format.
25320  new_path=`$CYGPATH -u "$path"`
25321
25322  # Now try to locate executable using which
25323  new_path=`$WHICH "$new_path" 2> /dev/null`
25324  # bat and cmd files are not always considered executable in cygwin causing which
25325  # to not find them
25326  if test "x$new_path" = x \
25327           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25328           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25329    new_path=`$CYGPATH -u "$path"`
25330  fi
25331  if test "x$new_path" = x; then
25332    # Oops. Which didn't find the executable.
25333    # The splitting of arguments from the executable at a space might have been incorrect,
25334    # since paths with space are more likely in Windows. Give it another try with the whole
25335    # argument.
25336    path="$complete"
25337    arguments="EOL"
25338    new_path=`$CYGPATH -u "$path"`
25339    new_path=`$WHICH "$new_path" 2> /dev/null`
25340    # bat and cmd files are not always considered executable in cygwin causing which
25341    # to not find them
25342    if test "x$new_path" = x \
25343             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25344             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25345      new_path=`$CYGPATH -u "$path"`
25346    fi
25347    if test "x$new_path" = x; then
25348      # It's still not found. Now this is an unrecoverable error.
25349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25350$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25351      has_space=`$ECHO "$complete" | $GREP " "`
25352      if test "x$has_space" != x; then
25353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25355      fi
25356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25357    fi
25358  fi
25359
25360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25363  # "foo.exe" is OK but "foo" is an error.
25364  #
25365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25366  # It is also a way to make sure we got the proper file name for the real test later on.
25367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25368  if test "x$test_shortpath" = x; then
25369    # Short path failed, file does not exist as specified.
25370    # Try adding .exe or .cmd
25371    if test -f "${new_path}.exe"; then
25372       input_to_shortpath="${new_path}.exe"
25373    elif test -f "${new_path}.cmd"; then
25374       input_to_shortpath="${new_path}.cmd"
25375    else
25376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25377$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25381    fi
25382  else
25383    input_to_shortpath="$new_path"
25384  fi
25385
25386  # Call helper function which possibly converts this using DOS-style short mode.
25387  # If so, the updated path is stored in $new_path.
25388  new_path="$input_to_shortpath"
25389
25390  input_path="$input_to_shortpath"
25391  # Check if we need to convert this using DOS-style short mode. If the path
25392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25393  # take no chances and rewrite it.
25394  # Note: m4 eats our [], so we need to use [ and ] instead.
25395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25396  if test "x$has_forbidden_chars" != x; then
25397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25401      # Going to short mode and back again did indeed matter. Since short mode is
25402      # case insensitive, let's make it lowercase to improve readability.
25403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25404      # Now convert it back to Unix-stile (cygpath)
25405      input_path=`$CYGPATH -u "$shortmode_path"`
25406      new_path="$input_path"
25407    fi
25408  fi
25409
25410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25411  if test "x$test_cygdrive_prefix" = x; then
25412    # As a simple fix, exclude /usr/bin since it's not a real path.
25413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25415      # a path prefixed by /cygdrive for fixpath to work.
25416      new_path="$CYGWIN_ROOT_PATH$input_path"
25417    fi
25418  fi
25419
25420  # remove trailing .exe if any
25421  new_path="${new_path/%.exe/}"
25422
25423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25424
25425  # First separate the path from the arguments. This will split at the first
25426  # space.
25427  complete="$STRIP"
25428  path="${complete%% *}"
25429  tmp="$complete EOL"
25430  arguments="${tmp#* }"
25431
25432  # Input might be given as Windows format, start by converting to
25433  # unix format.
25434  new_path="$path"
25435
25436  windows_path="$new_path"
25437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25438    unix_path=`$CYGPATH -u "$windows_path"`
25439    new_path="$unix_path"
25440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25442    new_path="$unix_path"
25443  fi
25444
25445
25446  # Now try to locate executable using which
25447  new_path=`$WHICH "$new_path" 2> /dev/null`
25448
25449  if test "x$new_path" = x; then
25450    # Oops. Which didn't find the executable.
25451    # The splitting of arguments from the executable at a space might have been incorrect,
25452    # since paths with space are more likely in Windows. Give it another try with the whole
25453    # argument.
25454    path="$complete"
25455    arguments="EOL"
25456    new_path="$path"
25457
25458  windows_path="$new_path"
25459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460    unix_path=`$CYGPATH -u "$windows_path"`
25461    new_path="$unix_path"
25462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25464    new_path="$unix_path"
25465  fi
25466
25467
25468    new_path=`$WHICH "$new_path" 2> /dev/null`
25469
25470    if test "x$new_path" = x; then
25471      # It's still not found. Now this is an unrecoverable error.
25472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25473$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25474      has_space=`$ECHO "$complete" | $GREP " "`
25475      if test "x$has_space" != x; then
25476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25478      fi
25479      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25480    fi
25481  fi
25482
25483  # Now new_path has a complete unix path to the binary
25484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25485    # Keep paths in /bin as-is, but remove trailing .exe if any
25486    new_path="${new_path/%.exe/}"
25487    # Do not save /bin paths to all_fixpath_prefixes!
25488  else
25489    # Not in mixed or Windows style, start by that.
25490    new_path=`cmd //c echo $new_path`
25491
25492  input_path="$new_path"
25493  # Check if we need to convert this using DOS-style short mode. If the path
25494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25495  # take no chances and rewrite it.
25496  # Note: m4 eats our [], so we need to use [ and ] instead.
25497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25498  if test "x$has_forbidden_chars" != x; then
25499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25501  fi
25502
25503    # Output is in $new_path
25504
25505  windows_path="$new_path"
25506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25507    unix_path=`$CYGPATH -u "$windows_path"`
25508    new_path="$unix_path"
25509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25511    new_path="$unix_path"
25512  fi
25513
25514    # remove trailing .exe if any
25515    new_path="${new_path/%.exe/}"
25516
25517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25519  fi
25520
25521  else
25522    # We're on a posix platform. Hooray! :)
25523    # First separate the path from the arguments. This will split at the first
25524    # space.
25525    complete="$STRIP"
25526    path="${complete%% *}"
25527    tmp="$complete EOL"
25528    arguments="${tmp#* }"
25529
25530    new_path=`$WHICH $path 2> /dev/null`
25531    if test "x$new_path" = x; then
25532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25533      if test "x$is_absolute_path" != x; then
25534        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25535$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25536        new_path="$path"
25537      else
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25539$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25540        has_space=`$ECHO "$complete" | $GREP " "`
25541        if test "x$has_space" != x; then
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25544        fi
25545        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25546      fi
25547    fi
25548  fi
25549
25550  # Now join together the path and the arguments once again
25551  if test "x$arguments" != xEOL; then
25552      new_complete="$new_path ${arguments% *}"
25553  else
25554      new_complete="$new_path"
25555  fi
25556
25557  if test "x$complete" != "x$new_complete"; then
25558    STRIP="$new_complete"
25559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25560$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25561  fi
25562
25563fi
25564
25565# objcopy is used for moving debug symbols to separate files when
25566# full debug symbols are enabled.
25567if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25568    if test -n "$ac_tool_prefix"; then
25569  for ac_prog in gobjcopy objcopy
25570  do
25571    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25572set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25574$as_echo_n "checking for $ac_word... " >&6; }
25575if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25576  $as_echo_n "(cached) " >&6
25577else
25578  if test -n "$OBJCOPY"; then
25579  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25580else
25581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25582for as_dir in $PATH
25583do
25584  IFS=$as_save_IFS
25585  test -z "$as_dir" && as_dir=.
25586    for ac_exec_ext in '' $ac_executable_extensions; do
25587  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25588    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25590    break 2
25591  fi
25592done
25593  done
25594IFS=$as_save_IFS
25595
25596fi
25597fi
25598OBJCOPY=$ac_cv_prog_OBJCOPY
25599if test -n "$OBJCOPY"; then
25600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25601$as_echo "$OBJCOPY" >&6; }
25602else
25603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25604$as_echo "no" >&6; }
25605fi
25606
25607
25608    test -n "$OBJCOPY" && break
25609  done
25610fi
25611if test -z "$OBJCOPY"; then
25612  ac_ct_OBJCOPY=$OBJCOPY
25613  for ac_prog in gobjcopy objcopy
25614do
25615  # Extract the first word of "$ac_prog", so it can be a program name with args.
25616set dummy $ac_prog; ac_word=$2
25617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25618$as_echo_n "checking for $ac_word... " >&6; }
25619if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25620  $as_echo_n "(cached) " >&6
25621else
25622  if test -n "$ac_ct_OBJCOPY"; then
25623  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25624else
25625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25626for as_dir in $PATH
25627do
25628  IFS=$as_save_IFS
25629  test -z "$as_dir" && as_dir=.
25630    for ac_exec_ext in '' $ac_executable_extensions; do
25631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25632    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25634    break 2
25635  fi
25636done
25637  done
25638IFS=$as_save_IFS
25639
25640fi
25641fi
25642ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25643if test -n "$ac_ct_OBJCOPY"; then
25644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25645$as_echo "$ac_ct_OBJCOPY" >&6; }
25646else
25647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25648$as_echo "no" >&6; }
25649fi
25650
25651
25652  test -n "$ac_ct_OBJCOPY" && break
25653done
25654
25655  if test "x$ac_ct_OBJCOPY" = x; then
25656    OBJCOPY=""
25657  else
25658    case $cross_compiling:$ac_tool_warned in
25659yes:)
25660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25662ac_tool_warned=yes ;;
25663esac
25664    OBJCOPY=$ac_ct_OBJCOPY
25665  fi
25666fi
25667
25668    # Only call fixup if objcopy was found.
25669    if test -n "$OBJCOPY"; then
25670
25671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25672
25673  # First separate the path from the arguments. This will split at the first
25674  # space.
25675  complete="$OBJCOPY"
25676  path="${complete%% *}"
25677  tmp="$complete EOL"
25678  arguments="${tmp#* }"
25679
25680  # Input might be given as Windows format, start by converting to
25681  # unix format.
25682  new_path=`$CYGPATH -u "$path"`
25683
25684  # Now try to locate executable using which
25685  new_path=`$WHICH "$new_path" 2> /dev/null`
25686  # bat and cmd files are not always considered executable in cygwin causing which
25687  # to not find them
25688  if test "x$new_path" = x \
25689           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25690           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25691    new_path=`$CYGPATH -u "$path"`
25692  fi
25693  if test "x$new_path" = x; then
25694    # Oops. Which didn't find the executable.
25695    # The splitting of arguments from the executable at a space might have been incorrect,
25696    # since paths with space are more likely in Windows. Give it another try with the whole
25697    # argument.
25698    path="$complete"
25699    arguments="EOL"
25700    new_path=`$CYGPATH -u "$path"`
25701    new_path=`$WHICH "$new_path" 2> /dev/null`
25702    # bat and cmd files are not always considered executable in cygwin causing which
25703    # to not find them
25704    if test "x$new_path" = x \
25705             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25706             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25707      new_path=`$CYGPATH -u "$path"`
25708    fi
25709    if test "x$new_path" = x; then
25710      # It's still not found. Now this is an unrecoverable error.
25711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25712$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25713      has_space=`$ECHO "$complete" | $GREP " "`
25714      if test "x$has_space" != x; then
25715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25717      fi
25718      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25719    fi
25720  fi
25721
25722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25725  # "foo.exe" is OK but "foo" is an error.
25726  #
25727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25728  # It is also a way to make sure we got the proper file name for the real test later on.
25729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25730  if test "x$test_shortpath" = x; then
25731    # Short path failed, file does not exist as specified.
25732    # Try adding .exe or .cmd
25733    if test -f "${new_path}.exe"; then
25734       input_to_shortpath="${new_path}.exe"
25735    elif test -f "${new_path}.cmd"; then
25736       input_to_shortpath="${new_path}.cmd"
25737    else
25738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25739$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25742      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25743    fi
25744  else
25745    input_to_shortpath="$new_path"
25746  fi
25747
25748  # Call helper function which possibly converts this using DOS-style short mode.
25749  # If so, the updated path is stored in $new_path.
25750  new_path="$input_to_shortpath"
25751
25752  input_path="$input_to_shortpath"
25753  # Check if we need to convert this using DOS-style short mode. If the path
25754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25755  # take no chances and rewrite it.
25756  # Note: m4 eats our [], so we need to use [ and ] instead.
25757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25758  if test "x$has_forbidden_chars" != x; then
25759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25763      # Going to short mode and back again did indeed matter. Since short mode is
25764      # case insensitive, let's make it lowercase to improve readability.
25765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25766      # Now convert it back to Unix-stile (cygpath)
25767      input_path=`$CYGPATH -u "$shortmode_path"`
25768      new_path="$input_path"
25769    fi
25770  fi
25771
25772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25773  if test "x$test_cygdrive_prefix" = x; then
25774    # As a simple fix, exclude /usr/bin since it's not a real path.
25775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25777      # a path prefixed by /cygdrive for fixpath to work.
25778      new_path="$CYGWIN_ROOT_PATH$input_path"
25779    fi
25780  fi
25781
25782  # remove trailing .exe if any
25783  new_path="${new_path/%.exe/}"
25784
25785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25786
25787  # First separate the path from the arguments. This will split at the first
25788  # space.
25789  complete="$OBJCOPY"
25790  path="${complete%% *}"
25791  tmp="$complete EOL"
25792  arguments="${tmp#* }"
25793
25794  # Input might be given as Windows format, start by converting to
25795  # unix format.
25796  new_path="$path"
25797
25798  windows_path="$new_path"
25799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25800    unix_path=`$CYGPATH -u "$windows_path"`
25801    new_path="$unix_path"
25802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25804    new_path="$unix_path"
25805  fi
25806
25807
25808  # Now try to locate executable using which
25809  new_path=`$WHICH "$new_path" 2> /dev/null`
25810
25811  if test "x$new_path" = x; then
25812    # Oops. Which didn't find the executable.
25813    # The splitting of arguments from the executable at a space might have been incorrect,
25814    # since paths with space are more likely in Windows. Give it another try with the whole
25815    # argument.
25816    path="$complete"
25817    arguments="EOL"
25818    new_path="$path"
25819
25820  windows_path="$new_path"
25821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25822    unix_path=`$CYGPATH -u "$windows_path"`
25823    new_path="$unix_path"
25824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25826    new_path="$unix_path"
25827  fi
25828
25829
25830    new_path=`$WHICH "$new_path" 2> /dev/null`
25831
25832    if test "x$new_path" = x; then
25833      # It's still not found. Now this is an unrecoverable error.
25834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25835$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25836      has_space=`$ECHO "$complete" | $GREP " "`
25837      if test "x$has_space" != x; then
25838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25840      fi
25841      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25842    fi
25843  fi
25844
25845  # Now new_path has a complete unix path to the binary
25846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25847    # Keep paths in /bin as-is, but remove trailing .exe if any
25848    new_path="${new_path/%.exe/}"
25849    # Do not save /bin paths to all_fixpath_prefixes!
25850  else
25851    # Not in mixed or Windows style, start by that.
25852    new_path=`cmd //c echo $new_path`
25853
25854  input_path="$new_path"
25855  # Check if we need to convert this using DOS-style short mode. If the path
25856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25857  # take no chances and rewrite it.
25858  # Note: m4 eats our [], so we need to use [ and ] instead.
25859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25860  if test "x$has_forbidden_chars" != x; then
25861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25863  fi
25864
25865    # Output is in $new_path
25866
25867  windows_path="$new_path"
25868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25869    unix_path=`$CYGPATH -u "$windows_path"`
25870    new_path="$unix_path"
25871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25873    new_path="$unix_path"
25874  fi
25875
25876    # remove trailing .exe if any
25877    new_path="${new_path/%.exe/}"
25878
25879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25881  fi
25882
25883  else
25884    # We're on a posix platform. Hooray! :)
25885    # First separate the path from the arguments. This will split at the first
25886    # space.
25887    complete="$OBJCOPY"
25888    path="${complete%% *}"
25889    tmp="$complete EOL"
25890    arguments="${tmp#* }"
25891
25892    new_path=`$WHICH $path 2> /dev/null`
25893    if test "x$new_path" = x; then
25894      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25895      if test "x$is_absolute_path" != x; then
25896        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25897$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25898        new_path="$path"
25899      else
25900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25901$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25902        has_space=`$ECHO "$complete" | $GREP " "`
25903        if test "x$has_space" != x; then
25904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25906        fi
25907        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25908      fi
25909    fi
25910  fi
25911
25912  # Now join together the path and the arguments once again
25913  if test "x$arguments" != xEOL; then
25914      new_complete="$new_path ${arguments% *}"
25915  else
25916      new_complete="$new_path"
25917  fi
25918
25919  if test "x$complete" != "x$new_complete"; then
25920    OBJCOPY="$new_complete"
25921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25922$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25923  fi
25924
25925    fi
25926fi
25927
25928if test -n "$ac_tool_prefix"; then
25929  for ac_prog in gobjdump objdump
25930  do
25931    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25932set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25934$as_echo_n "checking for $ac_word... " >&6; }
25935if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25936  $as_echo_n "(cached) " >&6
25937else
25938  if test -n "$OBJDUMP"; then
25939  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25940else
25941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25942for as_dir in $PATH
25943do
25944  IFS=$as_save_IFS
25945  test -z "$as_dir" && as_dir=.
25946    for ac_exec_ext in '' $ac_executable_extensions; do
25947  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25948    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25950    break 2
25951  fi
25952done
25953  done
25954IFS=$as_save_IFS
25955
25956fi
25957fi
25958OBJDUMP=$ac_cv_prog_OBJDUMP
25959if test -n "$OBJDUMP"; then
25960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25961$as_echo "$OBJDUMP" >&6; }
25962else
25963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25964$as_echo "no" >&6; }
25965fi
25966
25967
25968    test -n "$OBJDUMP" && break
25969  done
25970fi
25971if test -z "$OBJDUMP"; then
25972  ac_ct_OBJDUMP=$OBJDUMP
25973  for ac_prog in gobjdump objdump
25974do
25975  # Extract the first word of "$ac_prog", so it can be a program name with args.
25976set dummy $ac_prog; ac_word=$2
25977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25978$as_echo_n "checking for $ac_word... " >&6; }
25979if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
25980  $as_echo_n "(cached) " >&6
25981else
25982  if test -n "$ac_ct_OBJDUMP"; then
25983  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
25984else
25985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25986for as_dir in $PATH
25987do
25988  IFS=$as_save_IFS
25989  test -z "$as_dir" && as_dir=.
25990    for ac_exec_ext in '' $ac_executable_extensions; do
25991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25992    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
25993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25994    break 2
25995  fi
25996done
25997  done
25998IFS=$as_save_IFS
25999
26000fi
26001fi
26002ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26003if test -n "$ac_ct_OBJDUMP"; then
26004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26005$as_echo "$ac_ct_OBJDUMP" >&6; }
26006else
26007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26008$as_echo "no" >&6; }
26009fi
26010
26011
26012  test -n "$ac_ct_OBJDUMP" && break
26013done
26014
26015  if test "x$ac_ct_OBJDUMP" = x; then
26016    OBJDUMP=""
26017  else
26018    case $cross_compiling:$ac_tool_warned in
26019yes:)
26020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26022ac_tool_warned=yes ;;
26023esac
26024    OBJDUMP=$ac_ct_OBJDUMP
26025  fi
26026fi
26027
26028if test "x$OBJDUMP" != x; then
26029  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26030
26031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26032
26033  # First separate the path from the arguments. This will split at the first
26034  # space.
26035  complete="$OBJDUMP"
26036  path="${complete%% *}"
26037  tmp="$complete EOL"
26038  arguments="${tmp#* }"
26039
26040  # Input might be given as Windows format, start by converting to
26041  # unix format.
26042  new_path=`$CYGPATH -u "$path"`
26043
26044  # Now try to locate executable using which
26045  new_path=`$WHICH "$new_path" 2> /dev/null`
26046  # bat and cmd files are not always considered executable in cygwin causing which
26047  # to not find them
26048  if test "x$new_path" = x \
26049           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26051    new_path=`$CYGPATH -u "$path"`
26052  fi
26053  if test "x$new_path" = x; then
26054    # Oops. Which didn't find the executable.
26055    # The splitting of arguments from the executable at a space might have been incorrect,
26056    # since paths with space are more likely in Windows. Give it another try with the whole
26057    # argument.
26058    path="$complete"
26059    arguments="EOL"
26060    new_path=`$CYGPATH -u "$path"`
26061    new_path=`$WHICH "$new_path" 2> /dev/null`
26062    # bat and cmd files are not always considered executable in cygwin causing which
26063    # to not find them
26064    if test "x$new_path" = x \
26065             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26067      new_path=`$CYGPATH -u "$path"`
26068    fi
26069    if test "x$new_path" = x; then
26070      # It's still not found. Now this is an unrecoverable error.
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26072$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26073      has_space=`$ECHO "$complete" | $GREP " "`
26074      if test "x$has_space" != x; then
26075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26077      fi
26078      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26079    fi
26080  fi
26081
26082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26085  # "foo.exe" is OK but "foo" is an error.
26086  #
26087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26088  # It is also a way to make sure we got the proper file name for the real test later on.
26089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26090  if test "x$test_shortpath" = x; then
26091    # Short path failed, file does not exist as specified.
26092    # Try adding .exe or .cmd
26093    if test -f "${new_path}.exe"; then
26094       input_to_shortpath="${new_path}.exe"
26095    elif test -f "${new_path}.cmd"; then
26096       input_to_shortpath="${new_path}.cmd"
26097    else
26098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26099$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26102      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26103    fi
26104  else
26105    input_to_shortpath="$new_path"
26106  fi
26107
26108  # Call helper function which possibly converts this using DOS-style short mode.
26109  # If so, the updated path is stored in $new_path.
26110  new_path="$input_to_shortpath"
26111
26112  input_path="$input_to_shortpath"
26113  # Check if we need to convert this using DOS-style short mode. If the path
26114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26115  # take no chances and rewrite it.
26116  # Note: m4 eats our [], so we need to use [ and ] instead.
26117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26118  if test "x$has_forbidden_chars" != x; then
26119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26123      # Going to short mode and back again did indeed matter. Since short mode is
26124      # case insensitive, let's make it lowercase to improve readability.
26125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26126      # Now convert it back to Unix-stile (cygpath)
26127      input_path=`$CYGPATH -u "$shortmode_path"`
26128      new_path="$input_path"
26129    fi
26130  fi
26131
26132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26133  if test "x$test_cygdrive_prefix" = x; then
26134    # As a simple fix, exclude /usr/bin since it's not a real path.
26135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26137      # a path prefixed by /cygdrive for fixpath to work.
26138      new_path="$CYGWIN_ROOT_PATH$input_path"
26139    fi
26140  fi
26141
26142  # remove trailing .exe if any
26143  new_path="${new_path/%.exe/}"
26144
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146
26147  # First separate the path from the arguments. This will split at the first
26148  # space.
26149  complete="$OBJDUMP"
26150  path="${complete%% *}"
26151  tmp="$complete EOL"
26152  arguments="${tmp#* }"
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  new_path="$path"
26157
26158  windows_path="$new_path"
26159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26160    unix_path=`$CYGPATH -u "$windows_path"`
26161    new_path="$unix_path"
26162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26164    new_path="$unix_path"
26165  fi
26166
26167
26168  # Now try to locate executable using which
26169  new_path=`$WHICH "$new_path" 2> /dev/null`
26170
26171  if test "x$new_path" = x; then
26172    # Oops. Which didn't find the executable.
26173    # The splitting of arguments from the executable at a space might have been incorrect,
26174    # since paths with space are more likely in Windows. Give it another try with the whole
26175    # argument.
26176    path="$complete"
26177    arguments="EOL"
26178    new_path="$path"
26179
26180  windows_path="$new_path"
26181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26182    unix_path=`$CYGPATH -u "$windows_path"`
26183    new_path="$unix_path"
26184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26186    new_path="$unix_path"
26187  fi
26188
26189
26190    new_path=`$WHICH "$new_path" 2> /dev/null`
26191
26192    if test "x$new_path" = x; then
26193      # It's still not found. Now this is an unrecoverable error.
26194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26195$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26196      has_space=`$ECHO "$complete" | $GREP " "`
26197      if test "x$has_space" != x; then
26198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26200      fi
26201      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26202    fi
26203  fi
26204
26205  # Now new_path has a complete unix path to the binary
26206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26207    # Keep paths in /bin as-is, but remove trailing .exe if any
26208    new_path="${new_path/%.exe/}"
26209    # Do not save /bin paths to all_fixpath_prefixes!
26210  else
26211    # Not in mixed or Windows style, start by that.
26212    new_path=`cmd //c echo $new_path`
26213
26214  input_path="$new_path"
26215  # Check if we need to convert this using DOS-style short mode. If the path
26216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26217  # take no chances and rewrite it.
26218  # Note: m4 eats our [], so we need to use [ and ] instead.
26219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26220  if test "x$has_forbidden_chars" != x; then
26221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26223  fi
26224
26225    # Output is in $new_path
26226
26227  windows_path="$new_path"
26228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26229    unix_path=`$CYGPATH -u "$windows_path"`
26230    new_path="$unix_path"
26231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26233    new_path="$unix_path"
26234  fi
26235
26236    # remove trailing .exe if any
26237    new_path="${new_path/%.exe/}"
26238
26239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26241  fi
26242
26243  else
26244    # We're on a posix platform. Hooray! :)
26245    # First separate the path from the arguments. This will split at the first
26246    # space.
26247    complete="$OBJDUMP"
26248    path="${complete%% *}"
26249    tmp="$complete EOL"
26250    arguments="${tmp#* }"
26251
26252    new_path=`$WHICH $path 2> /dev/null`
26253    if test "x$new_path" = x; then
26254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26255      if test "x$is_absolute_path" != x; then
26256        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26257$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26258        new_path="$path"
26259      else
26260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26261$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26262        has_space=`$ECHO "$complete" | $GREP " "`
26263        if test "x$has_space" != x; then
26264          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26265$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26266        fi
26267        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26268      fi
26269    fi
26270  fi
26271
26272  # Now join together the path and the arguments once again
26273  if test "x$arguments" != xEOL; then
26274      new_complete="$new_path ${arguments% *}"
26275  else
26276      new_complete="$new_path"
26277  fi
26278
26279  if test "x$complete" != "x$new_complete"; then
26280    OBJDUMP="$new_complete"
26281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26282$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26283  fi
26284
26285fi
26286
26287if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26288   # Extract the first word of "lipo", so it can be a program name with args.
26289set dummy lipo; ac_word=$2
26290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26291$as_echo_n "checking for $ac_word... " >&6; }
26292if test "${ac_cv_path_LIPO+set}" = set; then :
26293  $as_echo_n "(cached) " >&6
26294else
26295  case $LIPO in
26296  [\\/]* | ?:[\\/]*)
26297  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26298  ;;
26299  *)
26300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26301for as_dir in $PATH
26302do
26303  IFS=$as_save_IFS
26304  test -z "$as_dir" && as_dir=.
26305    for ac_exec_ext in '' $ac_executable_extensions; do
26306  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26307    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26309    break 2
26310  fi
26311done
26312  done
26313IFS=$as_save_IFS
26314
26315  ;;
26316esac
26317fi
26318LIPO=$ac_cv_path_LIPO
26319if test -n "$LIPO"; then
26320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26321$as_echo "$LIPO" >&6; }
26322else
26323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26324$as_echo "no" >&6; }
26325fi
26326
26327
26328
26329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26330
26331  # First separate the path from the arguments. This will split at the first
26332  # space.
26333  complete="$LIPO"
26334  path="${complete%% *}"
26335  tmp="$complete EOL"
26336  arguments="${tmp#* }"
26337
26338  # Input might be given as Windows format, start by converting to
26339  # unix format.
26340  new_path=`$CYGPATH -u "$path"`
26341
26342  # Now try to locate executable using which
26343  new_path=`$WHICH "$new_path" 2> /dev/null`
26344  # bat and cmd files are not always considered executable in cygwin causing which
26345  # to not find them
26346  if test "x$new_path" = x \
26347           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26348           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26349    new_path=`$CYGPATH -u "$path"`
26350  fi
26351  if test "x$new_path" = x; then
26352    # Oops. Which didn't find the executable.
26353    # The splitting of arguments from the executable at a space might have been incorrect,
26354    # since paths with space are more likely in Windows. Give it another try with the whole
26355    # argument.
26356    path="$complete"
26357    arguments="EOL"
26358    new_path=`$CYGPATH -u "$path"`
26359    new_path=`$WHICH "$new_path" 2> /dev/null`
26360    # bat and cmd files are not always considered executable in cygwin causing which
26361    # to not find them
26362    if test "x$new_path" = x \
26363             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26364             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26365      new_path=`$CYGPATH -u "$path"`
26366    fi
26367    if test "x$new_path" = x; then
26368      # It's still not found. Now this is an unrecoverable error.
26369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26370$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26371      has_space=`$ECHO "$complete" | $GREP " "`
26372      if test "x$has_space" != x; then
26373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26375      fi
26376      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26377    fi
26378  fi
26379
26380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26383  # "foo.exe" is OK but "foo" is an error.
26384  #
26385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26386  # It is also a way to make sure we got the proper file name for the real test later on.
26387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26388  if test "x$test_shortpath" = x; then
26389    # Short path failed, file does not exist as specified.
26390    # Try adding .exe or .cmd
26391    if test -f "${new_path}.exe"; then
26392       input_to_shortpath="${new_path}.exe"
26393    elif test -f "${new_path}.cmd"; then
26394       input_to_shortpath="${new_path}.cmd"
26395    else
26396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26397$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26400      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26401    fi
26402  else
26403    input_to_shortpath="$new_path"
26404  fi
26405
26406  # Call helper function which possibly converts this using DOS-style short mode.
26407  # If so, the updated path is stored in $new_path.
26408  new_path="$input_to_shortpath"
26409
26410  input_path="$input_to_shortpath"
26411  # Check if we need to convert this using DOS-style short mode. If the path
26412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26413  # take no chances and rewrite it.
26414  # Note: m4 eats our [], so we need to use [ and ] instead.
26415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26416  if test "x$has_forbidden_chars" != x; then
26417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26421      # Going to short mode and back again did indeed matter. Since short mode is
26422      # case insensitive, let's make it lowercase to improve readability.
26423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26424      # Now convert it back to Unix-stile (cygpath)
26425      input_path=`$CYGPATH -u "$shortmode_path"`
26426      new_path="$input_path"
26427    fi
26428  fi
26429
26430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26431  if test "x$test_cygdrive_prefix" = x; then
26432    # As a simple fix, exclude /usr/bin since it's not a real path.
26433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26435      # a path prefixed by /cygdrive for fixpath to work.
26436      new_path="$CYGWIN_ROOT_PATH$input_path"
26437    fi
26438  fi
26439
26440  # remove trailing .exe if any
26441  new_path="${new_path/%.exe/}"
26442
26443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26444
26445  # First separate the path from the arguments. This will split at the first
26446  # space.
26447  complete="$LIPO"
26448  path="${complete%% *}"
26449  tmp="$complete EOL"
26450  arguments="${tmp#* }"
26451
26452  # Input might be given as Windows format, start by converting to
26453  # unix format.
26454  new_path="$path"
26455
26456  windows_path="$new_path"
26457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26458    unix_path=`$CYGPATH -u "$windows_path"`
26459    new_path="$unix_path"
26460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26462    new_path="$unix_path"
26463  fi
26464
26465
26466  # Now try to locate executable using which
26467  new_path=`$WHICH "$new_path" 2> /dev/null`
26468
26469  if test "x$new_path" = x; then
26470    # Oops. Which didn't find the executable.
26471    # The splitting of arguments from the executable at a space might have been incorrect,
26472    # since paths with space are more likely in Windows. Give it another try with the whole
26473    # argument.
26474    path="$complete"
26475    arguments="EOL"
26476    new_path="$path"
26477
26478  windows_path="$new_path"
26479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26480    unix_path=`$CYGPATH -u "$windows_path"`
26481    new_path="$unix_path"
26482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26484    new_path="$unix_path"
26485  fi
26486
26487
26488    new_path=`$WHICH "$new_path" 2> /dev/null`
26489
26490    if test "x$new_path" = x; then
26491      # It's still not found. Now this is an unrecoverable error.
26492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26493$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26494      has_space=`$ECHO "$complete" | $GREP " "`
26495      if test "x$has_space" != x; then
26496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26498      fi
26499      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26500    fi
26501  fi
26502
26503  # Now new_path has a complete unix path to the binary
26504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26505    # Keep paths in /bin as-is, but remove trailing .exe if any
26506    new_path="${new_path/%.exe/}"
26507    # Do not save /bin paths to all_fixpath_prefixes!
26508  else
26509    # Not in mixed or Windows style, start by that.
26510    new_path=`cmd //c echo $new_path`
26511
26512  input_path="$new_path"
26513  # Check if we need to convert this using DOS-style short mode. If the path
26514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26515  # take no chances and rewrite it.
26516  # Note: m4 eats our [], so we need to use [ and ] instead.
26517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26518  if test "x$has_forbidden_chars" != x; then
26519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26521  fi
26522
26523    # Output is in $new_path
26524
26525  windows_path="$new_path"
26526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26527    unix_path=`$CYGPATH -u "$windows_path"`
26528    new_path="$unix_path"
26529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26531    new_path="$unix_path"
26532  fi
26533
26534    # remove trailing .exe if any
26535    new_path="${new_path/%.exe/}"
26536
26537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26539  fi
26540
26541  else
26542    # We're on a posix platform. Hooray! :)
26543    # First separate the path from the arguments. This will split at the first
26544    # space.
26545    complete="$LIPO"
26546    path="${complete%% *}"
26547    tmp="$complete EOL"
26548    arguments="${tmp#* }"
26549
26550    new_path=`$WHICH $path 2> /dev/null`
26551    if test "x$new_path" = x; then
26552      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26553      if test "x$is_absolute_path" != x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26555$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26556        new_path="$path"
26557      else
26558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26559$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26560        has_space=`$ECHO "$complete" | $GREP " "`
26561        if test "x$has_space" != x; then
26562          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26564        fi
26565        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26566      fi
26567    fi
26568  fi
26569
26570  # Now join together the path and the arguments once again
26571  if test "x$arguments" != xEOL; then
26572      new_complete="$new_path ${arguments% *}"
26573  else
26574      new_complete="$new_path"
26575  fi
26576
26577  if test "x$complete" != "x$new_complete"; then
26578    LIPO="$new_complete"
26579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26580$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26581  fi
26582
26583fi
26584
26585# Restore old path without tools dir
26586PATH="$OLD_PATH"
26587
26588
26589# FIXME: Currently we must test this after paths but before flags. Fix!
26590
26591# And we can test some aspects on the target using configure macros.
26592
26593
26594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26595$as_echo_n "checking for ANSI C header files... " >&6; }
26596if test "${ac_cv_header_stdc+set}" = set; then :
26597  $as_echo_n "(cached) " >&6
26598else
26599  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26600/* end confdefs.h.  */
26601#include <stdlib.h>
26602#include <stdarg.h>
26603#include <string.h>
26604#include <float.h>
26605
26606int
26607main ()
26608{
26609
26610  ;
26611  return 0;
26612}
26613_ACEOF
26614if ac_fn_cxx_try_compile "$LINENO"; then :
26615  ac_cv_header_stdc=yes
26616else
26617  ac_cv_header_stdc=no
26618fi
26619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26620
26621if test $ac_cv_header_stdc = yes; then
26622  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26624/* end confdefs.h.  */
26625#include <string.h>
26626
26627_ACEOF
26628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26629  $EGREP "memchr" >/dev/null 2>&1; then :
26630
26631else
26632  ac_cv_header_stdc=no
26633fi
26634rm -f conftest*
26635
26636fi
26637
26638if test $ac_cv_header_stdc = yes; then
26639  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26640  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26641/* end confdefs.h.  */
26642#include <stdlib.h>
26643
26644_ACEOF
26645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26646  $EGREP "free" >/dev/null 2>&1; then :
26647
26648else
26649  ac_cv_header_stdc=no
26650fi
26651rm -f conftest*
26652
26653fi
26654
26655if test $ac_cv_header_stdc = yes; then
26656  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26657  if test "$cross_compiling" = yes; then :
26658  :
26659else
26660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26661/* end confdefs.h.  */
26662#include <ctype.h>
26663#include <stdlib.h>
26664#if ((' ' & 0x0FF) == 0x020)
26665# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26666# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26667#else
26668# define ISLOWER(c) \
26669		   (('a' <= (c) && (c) <= 'i') \
26670		     || ('j' <= (c) && (c) <= 'r') \
26671		     || ('s' <= (c) && (c) <= 'z'))
26672# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26673#endif
26674
26675#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26676int
26677main ()
26678{
26679  int i;
26680  for (i = 0; i < 256; i++)
26681    if (XOR (islower (i), ISLOWER (i))
26682	|| toupper (i) != TOUPPER (i))
26683      return 2;
26684  return 0;
26685}
26686_ACEOF
26687if ac_fn_cxx_try_run "$LINENO"; then :
26688
26689else
26690  ac_cv_header_stdc=no
26691fi
26692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26693  conftest.$ac_objext conftest.beam conftest.$ac_ext
26694fi
26695
26696fi
26697fi
26698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26699$as_echo "$ac_cv_header_stdc" >&6; }
26700if test $ac_cv_header_stdc = yes; then
26701
26702$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26703
26704fi
26705
26706# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26707for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26708		  inttypes.h stdint.h unistd.h
26709do :
26710  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26711ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26712"
26713if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26714  cat >>confdefs.h <<_ACEOF
26715#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26716_ACEOF
26717
26718fi
26719
26720done
26721
26722
26723
26724###############################################################################
26725#
26726# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26727# (The JVM can use 32 or 64 bit Java pointers but that decision
26728# is made at runtime.)
26729#
26730if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26731  # Always specify -m flags on Solaris
26732
26733  # keep track of c/cxx flags that we added outselves...
26734  #   to prevent emitting warning...
26735  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26736  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26737  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26738
26739  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26740  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26741  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26742
26743  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26744  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26745  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26746
26747elif test "x$COMPILE_TYPE" = xreduced; then
26748  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26749    # Specify -m if running reduced on other Posix platforms
26750
26751  # keep track of c/cxx flags that we added outselves...
26752  #   to prevent emitting warning...
26753  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26754  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26755  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26756
26757  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26758  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26759  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26760
26761  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26762  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26763  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26764
26765  fi
26766fi
26767
26768# Make compilation sanity check
26769for ac_header in stdio.h
26770do :
26771  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26772if test "x$ac_cv_header_stdio_h" = x""yes; then :
26773  cat >>confdefs.h <<_ACEOF
26774#define HAVE_STDIO_H 1
26775_ACEOF
26776
26777else
26778
26779  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26780$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26781  if test "x$COMPILE_TYPE" = xreduced; then
26782    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26783$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26784  elif test "x$COMPILE_TYPE" = xcross; then
26785    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26786$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26787  fi
26788  as_fn_error $? "Cannot continue." "$LINENO" 5
26789
26790fi
26791
26792done
26793
26794
26795# The cast to long int works around a bug in the HP C Compiler
26796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26798# This bug is HP SR number 8606223364.
26799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26800$as_echo_n "checking size of int *... " >&6; }
26801if test "${ac_cv_sizeof_int_p+set}" = set; then :
26802  $as_echo_n "(cached) " >&6
26803else
26804  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26805
26806else
26807  if test "$ac_cv_type_int_p" = yes; then
26808     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26810as_fn_error 77 "cannot compute sizeof (int *)
26811See \`config.log' for more details" "$LINENO" 5 ; }
26812   else
26813     ac_cv_sizeof_int_p=0
26814   fi
26815fi
26816
26817fi
26818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26819$as_echo "$ac_cv_sizeof_int_p" >&6; }
26820
26821
26822
26823cat >>confdefs.h <<_ACEOF
26824#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26825_ACEOF
26826
26827
26828
26829if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26830  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26831  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26832fi
26833
26834if test "x$SIZEOF_INT_P" = x; then
26835    # The test failed, lets stick to the assumed value.
26836    { $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
26837$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26838else
26839    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26840
26841    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26842        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
26843    fi
26844fi
26845
26846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26847$as_echo_n "checking for target address size... " >&6; }
26848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26849$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26850
26851
26852###############################################################################
26853#
26854# Is the target little of big endian?
26855#
26856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26857$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26858if test "${ac_cv_c_bigendian+set}" = set; then :
26859  $as_echo_n "(cached) " >&6
26860else
26861  ac_cv_c_bigendian=unknown
26862    # See if we're dealing with a universal compiler.
26863    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26864/* end confdefs.h.  */
26865#ifndef __APPLE_CC__
26866	       not a universal capable compiler
26867	     #endif
26868	     typedef int dummy;
26869
26870_ACEOF
26871if ac_fn_cxx_try_compile "$LINENO"; then :
26872
26873	# Check for potential -arch flags.  It is not universal unless
26874	# there are at least two -arch flags with different values.
26875	ac_arch=
26876	ac_prev=
26877	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26878	 if test -n "$ac_prev"; then
26879	   case $ac_word in
26880	     i?86 | x86_64 | ppc | ppc64)
26881	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26882		 ac_arch=$ac_word
26883	       else
26884		 ac_cv_c_bigendian=universal
26885		 break
26886	       fi
26887	       ;;
26888	   esac
26889	   ac_prev=
26890	 elif test "x$ac_word" = "x-arch"; then
26891	   ac_prev=arch
26892	 fi
26893       done
26894fi
26895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26896    if test $ac_cv_c_bigendian = unknown; then
26897      # See if sys/param.h defines the BYTE_ORDER macro.
26898      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26899/* end confdefs.h.  */
26900#include <sys/types.h>
26901	     #include <sys/param.h>
26902
26903int
26904main ()
26905{
26906#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26907		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26908		     && LITTLE_ENDIAN)
26909	      bogus endian macros
26910	     #endif
26911
26912  ;
26913  return 0;
26914}
26915_ACEOF
26916if ac_fn_cxx_try_compile "$LINENO"; then :
26917  # It does; now see whether it defined to BIG_ENDIAN or not.
26918	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26919/* end confdefs.h.  */
26920#include <sys/types.h>
26921		#include <sys/param.h>
26922
26923int
26924main ()
26925{
26926#if BYTE_ORDER != BIG_ENDIAN
26927		 not big endian
26928		#endif
26929
26930  ;
26931  return 0;
26932}
26933_ACEOF
26934if ac_fn_cxx_try_compile "$LINENO"; then :
26935  ac_cv_c_bigendian=yes
26936else
26937  ac_cv_c_bigendian=no
26938fi
26939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26940fi
26941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26942    fi
26943    if test $ac_cv_c_bigendian = unknown; then
26944      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26945      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26946/* end confdefs.h.  */
26947#include <limits.h>
26948
26949int
26950main ()
26951{
26952#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26953	      bogus endian macros
26954	     #endif
26955
26956  ;
26957  return 0;
26958}
26959_ACEOF
26960if ac_fn_cxx_try_compile "$LINENO"; then :
26961  # It does; now see whether it defined to _BIG_ENDIAN or not.
26962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26963/* end confdefs.h.  */
26964#include <limits.h>
26965
26966int
26967main ()
26968{
26969#ifndef _BIG_ENDIAN
26970		 not big endian
26971		#endif
26972
26973  ;
26974  return 0;
26975}
26976_ACEOF
26977if ac_fn_cxx_try_compile "$LINENO"; then :
26978  ac_cv_c_bigendian=yes
26979else
26980  ac_cv_c_bigendian=no
26981fi
26982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26983fi
26984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26985    fi
26986    if test $ac_cv_c_bigendian = unknown; then
26987      # Compile a test program.
26988      if test "$cross_compiling" = yes; then :
26989  # Try to guess by grepping values from an object file.
26990	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26991/* end confdefs.h.  */
26992short int ascii_mm[] =
26993		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
26994		short int ascii_ii[] =
26995		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
26996		int use_ascii (int i) {
26997		  return ascii_mm[i] + ascii_ii[i];
26998		}
26999		short int ebcdic_ii[] =
27000		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27001		short int ebcdic_mm[] =
27002		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27003		int use_ebcdic (int i) {
27004		  return ebcdic_mm[i] + ebcdic_ii[i];
27005		}
27006		extern int foo;
27007
27008int
27009main ()
27010{
27011return use_ascii (foo) == use_ebcdic (foo);
27012  ;
27013  return 0;
27014}
27015_ACEOF
27016if ac_fn_cxx_try_compile "$LINENO"; then :
27017  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27018	      ac_cv_c_bigendian=yes
27019	    fi
27020	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27021	      if test "$ac_cv_c_bigendian" = unknown; then
27022		ac_cv_c_bigendian=no
27023	      else
27024		# finding both strings is unlikely to happen, but who knows?
27025		ac_cv_c_bigendian=unknown
27026	      fi
27027	    fi
27028fi
27029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27030else
27031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27032/* end confdefs.h.  */
27033$ac_includes_default
27034int
27035main ()
27036{
27037
27038	     /* Are we little or big endian?  From Harbison&Steele.  */
27039	     union
27040	     {
27041	       long int l;
27042	       char c[sizeof (long int)];
27043	     } u;
27044	     u.l = 1;
27045	     return u.c[sizeof (long int) - 1] == 1;
27046
27047  ;
27048  return 0;
27049}
27050_ACEOF
27051if ac_fn_cxx_try_run "$LINENO"; then :
27052  ac_cv_c_bigendian=no
27053else
27054  ac_cv_c_bigendian=yes
27055fi
27056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27057  conftest.$ac_objext conftest.beam conftest.$ac_ext
27058fi
27059
27060    fi
27061fi
27062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27063$as_echo "$ac_cv_c_bigendian" >&6; }
27064 case $ac_cv_c_bigendian in #(
27065   yes)
27066     ENDIAN="big";; #(
27067   no)
27068     ENDIAN="little" ;; #(
27069   universal)
27070     ENDIAN="universal_endianness"
27071     ;; #(
27072   *)
27073     ENDIAN="unknown" ;;
27074 esac
27075
27076
27077if test "x$ENDIAN" = xuniversal_endianness; then
27078    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27079fi
27080if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27081    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
27082fi
27083
27084
27085# Configure flags for the tools
27086
27087
27088###############################################################################
27089#
27090# How to compile shared libraries.
27091#
27092
27093if test "x$GCC" = xyes; then
27094    COMPILER_NAME=gcc
27095    PICFLAG="-fPIC"
27096    LIBRARY_PREFIX=lib
27097    SHARED_LIBRARY='lib$1.so'
27098    STATIC_LIBRARY='lib$1.a'
27099    SHARED_LIBRARY_FLAGS="-shared"
27100    SHARED_LIBRARY_SUFFIX='.so'
27101    STATIC_LIBRARY_SUFFIX='.a'
27102    OBJ_SUFFIX='.o'
27103    EXE_SUFFIX=''
27104    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27105    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27106    C_FLAG_REORDER=''
27107    CXX_FLAG_REORDER=''
27108    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27109    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27110    LD="$CC"
27111    LDEXE="$CC"
27112    LDCXX="$CXX"
27113    LDEXECXX="$CXX"
27114    POST_STRIP_CMD="$STRIP -g"
27115
27116    # Linking is different on MacOSX
27117    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27118        # Might change in the future to clang.
27119        COMPILER_NAME=gcc
27120        SHARED_LIBRARY='lib$1.dylib'
27121        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27122        SHARED_LIBRARY_SUFFIX='.dylib'
27123        EXE_SUFFIX=''
27124        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27125        SET_SHARED_LIBRARY_MAPFILE=''
27126        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27127        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27128        POST_STRIP_CMD="$STRIP -S"
27129    fi
27130else
27131    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27132        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27133        COMPILER_NAME=ossc
27134        PICFLAG="-KPIC"
27135        LIBRARY_PREFIX=lib
27136        SHARED_LIBRARY='lib$1.so'
27137        STATIC_LIBRARY='lib$1.a'
27138        SHARED_LIBRARY_FLAGS="-G"
27139        SHARED_LIBRARY_SUFFIX='.so'
27140        STATIC_LIBRARY_SUFFIX='.a'
27141        OBJ_SUFFIX='.o'
27142        EXE_SUFFIX=''
27143        SET_SHARED_LIBRARY_NAME=''
27144        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27145	C_FLAG_REORDER='-xF'
27146	CXX_FLAG_REORDER='-xF'
27147        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27148        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27149        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27150        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27151        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27152        POST_STRIP_CMD="$STRIP -x"
27153        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27154    fi
27155    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27156        # If it is not gcc, then assume it is the MS Visual Studio compiler
27157        COMPILER_NAME=cl
27158        PICFLAG=""
27159        LIBRARY_PREFIX=
27160        SHARED_LIBRARY='$1.dll'
27161        STATIC_LIBRARY='$1.lib'
27162        SHARED_LIBRARY_FLAGS="-LD"
27163        SHARED_LIBRARY_SUFFIX='.dll'
27164        STATIC_LIBRARY_SUFFIX='.lib'
27165        OBJ_SUFFIX='.obj'
27166        EXE_SUFFIX='.exe'
27167        SET_SHARED_LIBRARY_NAME=''
27168        SET_SHARED_LIBRARY_MAPFILE=''
27169        SET_SHARED_LIBRARY_ORIGIN=''
27170        SET_EXECUTABLE_ORIGIN=''
27171    fi
27172fi
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191# The (cross) compiler is now configured, we can now test capabilities
27192# of the target platform.
27193
27194
27195
27196###############################################################################
27197#
27198# Setup the opt flags for different compilers
27199# and different operating systems.
27200#
27201
27202#
27203# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27204#
27205if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27206    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27207    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27208    CFLAGS="$CFLAGS -mstackrealign"
27209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27210$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27211    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27212/* end confdefs.h.  */
27213int main() { return 0; }
27214_ACEOF
27215if ac_fn_cxx_try_link "$LINENO"; then :
27216
27217		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27218$as_echo "yes" >&6; }
27219
27220else
27221
27222		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27223$as_echo "no" >&6; }
27224	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27225
27226fi
27227rm -f core conftest.err conftest.$ac_objext \
27228    conftest$ac_exeext conftest.$ac_ext
27229fi
27230
27231C_FLAG_DEPS="-MMD -MF"
27232CXX_FLAG_DEPS="-MMD -MF"
27233
27234case $COMPILER_TYPE in
27235  CC )
27236    D_FLAG="-g"
27237    case $COMPILER_NAME in
27238      gcc )
27239      	case $OPENJDK_TARGET_OS in
27240	  macosx )
27241	    # On MacOSX we optimize for size, something
27242	    # we should do for all platforms?
27243	    C_O_FLAG_HI="-Os"
27244	    C_O_FLAG_NORM="-Os"
27245	    C_O_FLAG_NONE=""
27246	    ;;
27247	  *)
27248	    C_O_FLAG_HI="-O3"
27249	    C_O_FLAG_NORM="-O2"
27250	    C_O_FLAG_NONE="-O0"
27251	    CFLAGS_DEBUG_SYMBOLS="-g"
27252	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27253	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27254	       CFLAGS_DEBUG_SYMBOLS="-g1"
27255	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27256	    fi
27257	    ;;
27258	esac
27259        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27260        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27261        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27262        ;;
27263      ossc )
27264        #
27265        # Forte has different names for this with their C++ compiler...
27266        #
27267        C_FLAG_DEPS="-xMMD -xMF"
27268        CXX_FLAG_DEPS="-xMMD -xMF"
27269
27270        # Extra options used with HIGHEST
27271        #
27272        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27273        #          done with care, there are some assumptions below that need to
27274        #          be understood about the use of pointers, and IEEE behavior.
27275        #
27276        # Use non-standard floating point mode (not IEEE 754)
27277        CC_HIGHEST="$CC_HIGHEST -fns"
27278        # Do some simplification of floating point arithmetic (not IEEE 754)
27279        CC_HIGHEST="$CC_HIGHEST -fsimple"
27280        # Use single precision floating point with 'float'
27281        CC_HIGHEST="$CC_HIGHEST -fsingle"
27282        # Assume memory references via basic pointer types do not alias
27283        #   (Source with excessing pointer casting and data access with mixed
27284        #    pointer types are not recommended)
27285        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27286        # Use intrinsic or inline versions for math/std functions
27287        #   (If you expect perfect errno behavior, do not use this)
27288        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27289        # Loop data dependency optimizations (need -xO3 or higher)
27290        CC_HIGHEST="$CC_HIGHEST -xdepend"
27291        # Pointer parameters to functions do not overlap
27292        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27293        #    If you pass in multiple pointers to the same data, do not use this)
27294        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27295        # Inline some library routines
27296        #   (If you expect perfect errno behavior, do not use this)
27297        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27298        # Use optimized math routines
27299        #   (If you expect perfect errno behavior, do not use this)
27300        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27301        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27302
27303        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27304          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27305          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27306        fi
27307
27308        case $OPENJDK_TARGET_CPU_ARCH in
27309          x86)
27310            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27311            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27312            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27313            C_O_FLAG_NONE="-xregs=no%frameptr"
27314            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27315            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27316            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27317            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27318            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27319               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27320               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27321            fi
27322            ;;
27323          sparc)
27324            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27325            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27326            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27327            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27328            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27329            C_O_FLAG_NONE=""
27330            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27331            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27332            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27333            CXX_O_FLAG_NONE=""
27334            ;;
27335        esac
27336
27337    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27338    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27339    esac
27340    ;;
27341  CL )
27342    D_FLAG=
27343    C_O_FLAG_HIGHEST="-O2"
27344    C_O_FLAG_HI="-O1"
27345    C_O_FLAG_NORM="-O1"
27346    C_O_FLAG_NONE="-Od"
27347    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27348    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27349    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27350    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27351    ;;
27352esac
27353
27354if test -z "$C_O_FLAG_HIGHEST"; then
27355   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27356fi
27357
27358if test -z "$CXX_O_FLAG_HIGHEST"; then
27359   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27360fi
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27377$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27378fi
27379
27380if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27381   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27382$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27383fi
27384
27385if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27386   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27387$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27388fi
27389
27390
27391# Check whether --with-extra-cflags was given.
27392if test "${with_extra_cflags+set}" = set; then :
27393  withval=$with_extra_cflags;
27394fi
27395
27396
27397
27398# Check whether --with-extra-cxxflags was given.
27399if test "${with_extra_cxxflags+set}" = set; then :
27400  withval=$with_extra_cxxflags;
27401fi
27402
27403
27404
27405# Check whether --with-extra-ldflags was given.
27406if test "${with_extra_ldflags+set}" = set; then :
27407  withval=$with_extra_ldflags;
27408fi
27409
27410
27411CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27412CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27413LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27414
27415# Hotspot needs these set in their legacy form
27416LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27417LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27418LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27419
27420
27421
27422
27423
27424###############################################################################
27425#
27426# Now setup the CFLAGS and LDFLAGS for the JDK build.
27427# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27428#
27429case $COMPILER_NAME in
27430      gcc )
27431      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27432                          -pipe \
27433                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27434	  case $OPENJDK_TARGET_CPU_ARCH in
27435	  arm )
27436            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27437	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27438	  ;;
27439	  ppc )
27440            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27441	  ;;
27442	  * )
27443	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27444	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27445          ;;
27446	  esac
27447          ;;
27448      ossc )
27449          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27450          case $OPENJDK_TARGET_CPU_ARCH in
27451          x86 )
27452            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27453       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27454          ;;
27455          esac
27456
27457      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27458      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27459
27460          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27461          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27462          ;;
27463      cl )
27464          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27465               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27466	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27467	       -DWIN32 -DIAL"
27468          case $OPENJDK_TARGET_CPU in
27469              x86 )
27470                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27471                  ;;
27472              x86_64 )
27473                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27474                  ;;
27475          esac
27476          ;;
27477esac
27478
27479###############################################################################
27480
27481CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27482
27483# The package path is used only on macosx?
27484PACKAGE_PATH=/opt/local
27485
27486
27487if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27488    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27489    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27490    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27491    #   Note: -Dmacro         is the same as    #define macro 1
27492    #         -Dmacro=	    is the same as    #define macro
27493    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27494        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27495    else
27496        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27497    fi
27498else
27499    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27500fi
27501if test "x$OPENJDK_TARGET_OS" = xlinux; then
27502    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27503fi
27504if test "x$OPENJDK_TARGET_OS" = xwindows; then
27505    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27506fi
27507if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27508    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27509fi
27510if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27511    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27512fi
27513if test "x$OPENJDK_TARGET_OS" = xbsd; then
27514    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27515fi
27516if test "x$DEBUG_LEVEL" = xrelease; then
27517    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27518    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27519        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27520    fi
27521else
27522    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27523fi
27524
27525CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27526CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27527
27528CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27529        -I${JDK_OUTPUTDIR}/include \
27530        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27531        -I${JDK_TOPDIR}/src/share/javavm/export \
27532        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27533        -I${JDK_TOPDIR}/src/share/native/common \
27534        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27535
27536# The shared libraries are compiled using the picflag.
27537CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27538CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27539
27540# Executable flags
27541CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27542CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27543
27544# Now this is odd. The JDK native libraries have to link against libjvm.so
27545# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27546# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27547# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27548# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27549# libraries will link to whatever is in memory. Yuck.
27550#
27551# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27552if test "x$COMPILER_NAME" = xcl; then
27553    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27554    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27555        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27556    fi
27557    # TODO: make -debug optional "--disable-full-debug-symbols"
27558    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27559    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27560    LDFLAGS_JDKLIB_SUFFIX=""
27561    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27562        LDFLAGS_STACK_SIZE=1048576
27563    else
27564        LDFLAGS_STACK_SIZE=327680
27565    fi
27566    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27567else
27568    if test "x$COMPILER_NAME" = xgcc; then
27569        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27570        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27571        if test -n "$HAS_GNU_HASH"; then
27572            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27573        fi
27574        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27575          # And since we now know that the linker is gnu, then add -z defs, to forbid
27576          # undefined symbols in object files.
27577          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27578          if test "x$DEBUG_LEVEL" = "xrelease"; then
27579              # When building release libraries, tell the linker optimize them.
27580              # Should this be supplied to the OSS linker as well?
27581              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27582          fi
27583        fi
27584    fi
27585    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27586                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27587
27588    # On some platforms (mac) the linker warns about non existing -L dirs.
27589    # Add server first if available. Linking aginst client does not always produce the same results.
27590    # Only add client dir if client is being built. Default to server for other variants.
27591    if test "x$JVM_VARIANT_SERVER" = xtrue; then
27592        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27593    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
27594        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
27595    else
27596        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27597    fi
27598
27599    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27600    if test "x$COMPILER_NAME" = xossc; then
27601        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27602    fi
27603
27604    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27605    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27606        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27607    fi
27608fi
27609
27610# Adjust flags according to debug level.
27611case $DEBUG_LEVEL in
27612      fastdebug )
27613              CFLAGS="$CFLAGS $D_FLAG"
27614              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27615              ;;
27616      slowdebug )
27617              CFLAGS="$CFLAGS $D_FLAG"
27618	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27619	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27620	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27621	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27622              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27623              ;;
27624esac
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640# Setup debug symbols (need objcopy from the toolchain for that)
27641
27642#
27643# ENABLE_DEBUG_SYMBOLS
27644# This must be done after the toolchain is setup, since we're looking at objcopy.
27645#
27646ENABLE_DEBUG_SYMBOLS=default
27647
27648# default on macosx is no...
27649if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27650   ENABLE_DEBUG_SYMBOLS=no
27651fi
27652
27653# Check whether --enable-debug-symbols was given.
27654if test "${enable_debug_symbols+set}" = set; then :
27655  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27656fi
27657
27658
27659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27660$as_echo_n "checking if we should generate debug symbols... " >&6; }
27661
27662if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27663   # explicit enabling of enable-debug-symbols and can't find objcopy
27664   #   this is an error
27665   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27666fi
27667
27668if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27669  # Default is on if objcopy is found, otherwise off
27670  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27671     ENABLE_DEBUG_SYMBOLS=yes
27672  else
27673     ENABLE_DEBUG_SYMBOLS=no
27674  fi
27675fi
27676
27677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27678$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27679
27680#
27681# ZIP_DEBUGINFO_FILES
27682#
27683ZIP_DEBUGINFO_FILES=yes
27684
27685# Check whether --enable-zip-debug-info was given.
27686if test "${enable_zip_debug_info+set}" = set; then :
27687  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27688fi
27689
27690
27691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27692$as_echo_n "checking if we should zip debug-info files... " >&6; }
27693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27694$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27695
27696# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27697#   use that...
27698if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27699   ZIP_DEBUGINFO_FILES=1
27700else
27701   ZIP_DEBUGINFO_FILES=0
27702fi
27703
27704
27705
27706
27707
27708
27709
27710###############################################################################
27711#
27712# Check dependencies for external and internal libraries.
27713#
27714###############################################################################
27715
27716
27717
27718###############################################################################
27719#
27720# OS specific settings that we never will need to probe.
27721#
27722if test "x$OPENJDK_TARGET_OS" = xlinux; then
27723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27724$as_echo_n "checking what is not needed on Linux?... " >&6; }
27725    PULSE_NOT_NEEDED=yes
27726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27727$as_echo "pulse" >&6; }
27728fi
27729
27730if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27732$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27733    ALSA_NOT_NEEDED=yes
27734    PULSE_NOT_NEEDED=yes
27735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27736$as_echo "alsa pulse" >&6; }
27737fi
27738
27739if test "x$OPENJDK_TARGET_OS" = xwindows; then
27740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27741$as_echo_n "checking what is not needed on Windows?... " >&6; }
27742    CUPS_NOT_NEEDED=yes
27743    ALSA_NOT_NEEDED=yes
27744    PULSE_NOT_NEEDED=yes
27745    X11_NOT_NEEDED=yes
27746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27747$as_echo "alsa cups pulse x11" >&6; }
27748fi
27749
27750if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27752$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27753    ALSA_NOT_NEEDED=yes
27754    PULSE_NOT_NEEDED=yes
27755    X11_NOT_NEEDED=yes
27756    FREETYPE2_NOT_NEEDED=yes
27757    # If the java runtime framework is disabled, then we need X11.
27758    # This will be adjusted below.
27759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27760$as_echo "alsa pulse x11" >&6; }
27761fi
27762
27763if test "x$OPENJDK_TARGET_OS" = xbsd; then
27764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27765$as_echo_n "checking what is not needed on bsd?... " >&6; }
27766    ALSA_NOT_NEEDED=yes
27767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27768$as_echo "alsa" >&6; }
27769fi
27770
27771if test "x$OPENJDK" = "xfalse"; then
27772    FREETYPE2_NOT_NEEDED=yes
27773fi
27774
27775if test "x$SUPPORT_HEADFUL" = xno; then
27776    X11_NOT_NEEDED=yes
27777fi
27778
27779###############################################################################
27780#
27781# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27782# that uses this API.
27783#
27784# Check whether --enable-macosx-runtime-support was given.
27785if test "${enable_macosx_runtime_support+set}" = set; then :
27786  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27787else
27788  MACOSX_RUNTIME_SUPPORT="no"
27789fi
27790
27791
27792USE_MACOSX_RUNTIME_SUPPORT=no
27793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27794$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27795if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27796    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27797        MACOSX_RUNTIME_SUPPORT=yes
27798        USE_MACOSX_RUNTIME_SUPPORT=yes
27799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27800$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27801    else
27802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27803$as_echo "yes, but explicitly disabled." >&6; }
27804    fi
27805else
27806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27807$as_echo "no" >&6; }
27808fi
27809
27810if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27812$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27813    X11_NOT_NEEDED=
27814    FREETYPE2_NOT_NEEDED=
27815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27816$as_echo "alsa pulse" >&6; }
27817fi
27818
27819
27820
27821
27822###############################################################################
27823#
27824# Check for X Windows
27825#
27826
27827# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27828# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27829# --x-libraries for the sysroot, if that seems to be correct.
27830if test "x$SYS_ROOT" != "x/"; then
27831  if test "x$x_includes" = xNONE; then
27832    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27833      x_includes="$SYS_ROOT/usr/X11R6/include"
27834    fi
27835  fi
27836  if test "x$x_libraries" = xNONE; then
27837    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27838      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27839    fi
27840  fi
27841fi
27842
27843# Now let autoconf do it's magic
27844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27845$as_echo_n "checking for X... " >&6; }
27846
27847
27848# Check whether --with-x was given.
27849if test "${with_x+set}" = set; then :
27850  withval=$with_x;
27851fi
27852
27853# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27854if test "x$with_x" = xno; then
27855  # The user explicitly disabled X.
27856  have_x=disabled
27857else
27858  case $x_includes,$x_libraries in #(
27859    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27860    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27861  $as_echo_n "(cached) " >&6
27862else
27863  # One or both of the vars are not set, and there is no cached value.
27864ac_x_includes=no ac_x_libraries=no
27865rm -f -r conftest.dir
27866if mkdir conftest.dir; then
27867  cd conftest.dir
27868  cat >Imakefile <<'_ACEOF'
27869incroot:
27870	@echo incroot='${INCROOT}'
27871usrlibdir:
27872	@echo usrlibdir='${USRLIBDIR}'
27873libdir:
27874	@echo libdir='${LIBDIR}'
27875_ACEOF
27876  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27877    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27878    for ac_var in incroot usrlibdir libdir; do
27879      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27880    done
27881    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27882    for ac_extension in a so sl dylib la dll; do
27883      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27884	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27885	ac_im_usrlibdir=$ac_im_libdir; break
27886      fi
27887    done
27888    # Screen out bogus values from the imake configuration.  They are
27889    # bogus both because they are the default anyway, and because
27890    # using them would break gcc on systems where it needs fixed includes.
27891    case $ac_im_incroot in
27892	/usr/include) ac_x_includes= ;;
27893	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27894    esac
27895    case $ac_im_usrlibdir in
27896	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27897	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27898    esac
27899  fi
27900  cd ..
27901  rm -f -r conftest.dir
27902fi
27903
27904# Standard set of common directories for X headers.
27905# Check X11 before X11Rn because it is often a symlink to the current release.
27906ac_x_header_dirs='
27907/usr/X11/include
27908/usr/X11R7/include
27909/usr/X11R6/include
27910/usr/X11R5/include
27911/usr/X11R4/include
27912
27913/usr/include/X11
27914/usr/include/X11R7
27915/usr/include/X11R6
27916/usr/include/X11R5
27917/usr/include/X11R4
27918
27919/usr/local/X11/include
27920/usr/local/X11R7/include
27921/usr/local/X11R6/include
27922/usr/local/X11R5/include
27923/usr/local/X11R4/include
27924
27925/usr/local/include/X11
27926/usr/local/include/X11R7
27927/usr/local/include/X11R6
27928/usr/local/include/X11R5
27929/usr/local/include/X11R4
27930
27931/usr/X386/include
27932/usr/x386/include
27933/usr/XFree86/include/X11
27934
27935/usr/include
27936/usr/local/include
27937/usr/unsupported/include
27938/usr/athena/include
27939/usr/local/x11r5/include
27940/usr/lpp/Xamples/include
27941
27942/usr/openwin/include
27943/usr/openwin/share/include'
27944
27945if test "$ac_x_includes" = no; then
27946  # Guess where to find include files, by looking for Xlib.h.
27947  # First, try using that file with no special directory specified.
27948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27949/* end confdefs.h.  */
27950#include <X11/Xlib.h>
27951_ACEOF
27952if ac_fn_cxx_try_cpp "$LINENO"; then :
27953  # We can compile using X headers with no special include directory.
27954ac_x_includes=
27955else
27956  for ac_dir in $ac_x_header_dirs; do
27957  if test -r "$ac_dir/X11/Xlib.h"; then
27958    ac_x_includes=$ac_dir
27959    break
27960  fi
27961done
27962fi
27963rm -f conftest.err conftest.i conftest.$ac_ext
27964fi # $ac_x_includes = no
27965
27966if test "$ac_x_libraries" = no; then
27967  # Check for the libraries.
27968  # See if we find them without any special options.
27969  # Don't add to $LIBS permanently.
27970  ac_save_LIBS=$LIBS
27971  LIBS="-lX11 $LIBS"
27972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27973/* end confdefs.h.  */
27974#include <X11/Xlib.h>
27975int
27976main ()
27977{
27978XrmInitialize ()
27979  ;
27980  return 0;
27981}
27982_ACEOF
27983if ac_fn_cxx_try_link "$LINENO"; then :
27984  LIBS=$ac_save_LIBS
27985# We can link X programs with no special library path.
27986ac_x_libraries=
27987else
27988  LIBS=$ac_save_LIBS
27989for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
27990do
27991  # Don't even attempt the hair of trying to link an X program!
27992  for ac_extension in a so sl dylib la dll; do
27993    if test -r "$ac_dir/libX11.$ac_extension"; then
27994      ac_x_libraries=$ac_dir
27995      break 2
27996    fi
27997  done
27998done
27999fi
28000rm -f core conftest.err conftest.$ac_objext \
28001    conftest$ac_exeext conftest.$ac_ext
28002fi # $ac_x_libraries = no
28003
28004case $ac_x_includes,$ac_x_libraries in #(
28005  no,* | *,no | *\'*)
28006    # Didn't find X, or a directory has "'" in its name.
28007    ac_cv_have_x="have_x=no";; #(
28008  *)
28009    # Record where we found X for the cache.
28010    ac_cv_have_x="have_x=yes\
28011	ac_x_includes='$ac_x_includes'\
28012	ac_x_libraries='$ac_x_libraries'"
28013esac
28014fi
28015;; #(
28016    *) have_x=yes;;
28017  esac
28018  eval "$ac_cv_have_x"
28019fi # $with_x != no
28020
28021if test "$have_x" != yes; then
28022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28023$as_echo "$have_x" >&6; }
28024  no_x=yes
28025else
28026  # If each of the values was on the command line, it overrides each guess.
28027  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28028  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28029  # Update the cache value to reflect the command line values.
28030  ac_cv_have_x="have_x=yes\
28031	ac_x_includes='$x_includes'\
28032	ac_x_libraries='$x_libraries'"
28033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28034$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28035fi
28036
28037if test "$no_x" = yes; then
28038  # Not all programs may use this symbol, but it does not hurt to define it.
28039
28040$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28041
28042  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28043else
28044  if test -n "$x_includes"; then
28045    X_CFLAGS="$X_CFLAGS -I$x_includes"
28046  fi
28047
28048  # It would also be nice to do this for all -L options, not just this one.
28049  if test -n "$x_libraries"; then
28050    X_LIBS="$X_LIBS -L$x_libraries"
28051    # For Solaris; some versions of Sun CC require a space after -R and
28052    # others require no space.  Words are not sufficient . . . .
28053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28054$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28055    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28056    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28057    ac_cxx_werror_flag=yes
28058    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28059/* end confdefs.h.  */
28060
28061int
28062main ()
28063{
28064
28065  ;
28066  return 0;
28067}
28068_ACEOF
28069if ac_fn_cxx_try_link "$LINENO"; then :
28070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28071$as_echo "no" >&6; }
28072       X_LIBS="$X_LIBS -R$x_libraries"
28073else
28074  LIBS="$ac_xsave_LIBS -R $x_libraries"
28075       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28076/* end confdefs.h.  */
28077
28078int
28079main ()
28080{
28081
28082  ;
28083  return 0;
28084}
28085_ACEOF
28086if ac_fn_cxx_try_link "$LINENO"; then :
28087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28088$as_echo "yes" >&6; }
28089	  X_LIBS="$X_LIBS -R $x_libraries"
28090else
28091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28092$as_echo "neither works" >&6; }
28093fi
28094rm -f core conftest.err conftest.$ac_objext \
28095    conftest$ac_exeext conftest.$ac_ext
28096fi
28097rm -f core conftest.err conftest.$ac_objext \
28098    conftest$ac_exeext conftest.$ac_ext
28099    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28100    LIBS=$ac_xsave_LIBS
28101  fi
28102
28103  # Check for system-dependent libraries X programs must link with.
28104  # Do this before checking for the system-independent R6 libraries
28105  # (-lICE), since we may need -lsocket or whatever for X linking.
28106
28107  if test "$ISC" = yes; then
28108    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28109  else
28110    # Martyn Johnson says this is needed for Ultrix, if the X
28111    # libraries were built with DECnet support.  And Karl Berry says
28112    # the Alpha needs dnet_stub (dnet does not exist).
28113    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28114    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28115/* end confdefs.h.  */
28116
28117/* Override any GCC internal prototype to avoid an error.
28118   Use char because int might match the return type of a GCC
28119   builtin and then its argument prototype would still apply.  */
28120#ifdef __cplusplus
28121extern "C"
28122#endif
28123char XOpenDisplay ();
28124int
28125main ()
28126{
28127return XOpenDisplay ();
28128  ;
28129  return 0;
28130}
28131_ACEOF
28132if ac_fn_cxx_try_link "$LINENO"; then :
28133
28134else
28135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28136$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28137if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28138  $as_echo_n "(cached) " >&6
28139else
28140  ac_check_lib_save_LIBS=$LIBS
28141LIBS="-ldnet  $LIBS"
28142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28143/* end confdefs.h.  */
28144
28145/* Override any GCC internal prototype to avoid an error.
28146   Use char because int might match the return type of a GCC
28147   builtin and then its argument prototype would still apply.  */
28148#ifdef __cplusplus
28149extern "C"
28150#endif
28151char dnet_ntoa ();
28152int
28153main ()
28154{
28155return dnet_ntoa ();
28156  ;
28157  return 0;
28158}
28159_ACEOF
28160if ac_fn_cxx_try_link "$LINENO"; then :
28161  ac_cv_lib_dnet_dnet_ntoa=yes
28162else
28163  ac_cv_lib_dnet_dnet_ntoa=no
28164fi
28165rm -f core conftest.err conftest.$ac_objext \
28166    conftest$ac_exeext conftest.$ac_ext
28167LIBS=$ac_check_lib_save_LIBS
28168fi
28169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28170$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28171if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28172  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28173fi
28174
28175    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28177$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28178if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28179  $as_echo_n "(cached) " >&6
28180else
28181  ac_check_lib_save_LIBS=$LIBS
28182LIBS="-ldnet_stub  $LIBS"
28183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28184/* end confdefs.h.  */
28185
28186/* Override any GCC internal prototype to avoid an error.
28187   Use char because int might match the return type of a GCC
28188   builtin and then its argument prototype would still apply.  */
28189#ifdef __cplusplus
28190extern "C"
28191#endif
28192char dnet_ntoa ();
28193int
28194main ()
28195{
28196return dnet_ntoa ();
28197  ;
28198  return 0;
28199}
28200_ACEOF
28201if ac_fn_cxx_try_link "$LINENO"; then :
28202  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28203else
28204  ac_cv_lib_dnet_stub_dnet_ntoa=no
28205fi
28206rm -f core conftest.err conftest.$ac_objext \
28207    conftest$ac_exeext conftest.$ac_ext
28208LIBS=$ac_check_lib_save_LIBS
28209fi
28210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28211$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28212if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28213  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28214fi
28215
28216    fi
28217fi
28218rm -f core conftest.err conftest.$ac_objext \
28219    conftest$ac_exeext conftest.$ac_ext
28220    LIBS="$ac_xsave_LIBS"
28221
28222    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28223    # to get the SysV transport functions.
28224    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28225    # needs -lnsl.
28226    # The nsl library prevents programs from opening the X display
28227    # on Irix 5.2, according to T.E. Dickey.
28228    # The functions gethostbyname, getservbyname, and inet_addr are
28229    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28230    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28231if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28232
28233fi
28234
28235    if test $ac_cv_func_gethostbyname = no; then
28236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28237$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28238if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28239  $as_echo_n "(cached) " >&6
28240else
28241  ac_check_lib_save_LIBS=$LIBS
28242LIBS="-lnsl  $LIBS"
28243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28244/* end confdefs.h.  */
28245
28246/* Override any GCC internal prototype to avoid an error.
28247   Use char because int might match the return type of a GCC
28248   builtin and then its argument prototype would still apply.  */
28249#ifdef __cplusplus
28250extern "C"
28251#endif
28252char gethostbyname ();
28253int
28254main ()
28255{
28256return gethostbyname ();
28257  ;
28258  return 0;
28259}
28260_ACEOF
28261if ac_fn_cxx_try_link "$LINENO"; then :
28262  ac_cv_lib_nsl_gethostbyname=yes
28263else
28264  ac_cv_lib_nsl_gethostbyname=no
28265fi
28266rm -f core conftest.err conftest.$ac_objext \
28267    conftest$ac_exeext conftest.$ac_ext
28268LIBS=$ac_check_lib_save_LIBS
28269fi
28270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28271$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28272if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28273  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28274fi
28275
28276      if test $ac_cv_lib_nsl_gethostbyname = no; then
28277	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28278$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28279if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28280  $as_echo_n "(cached) " >&6
28281else
28282  ac_check_lib_save_LIBS=$LIBS
28283LIBS="-lbsd  $LIBS"
28284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28285/* end confdefs.h.  */
28286
28287/* Override any GCC internal prototype to avoid an error.
28288   Use char because int might match the return type of a GCC
28289   builtin and then its argument prototype would still apply.  */
28290#ifdef __cplusplus
28291extern "C"
28292#endif
28293char gethostbyname ();
28294int
28295main ()
28296{
28297return gethostbyname ();
28298  ;
28299  return 0;
28300}
28301_ACEOF
28302if ac_fn_cxx_try_link "$LINENO"; then :
28303  ac_cv_lib_bsd_gethostbyname=yes
28304else
28305  ac_cv_lib_bsd_gethostbyname=no
28306fi
28307rm -f core conftest.err conftest.$ac_objext \
28308    conftest$ac_exeext conftest.$ac_ext
28309LIBS=$ac_check_lib_save_LIBS
28310fi
28311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28312$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28313if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28314  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28315fi
28316
28317      fi
28318    fi
28319
28320    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28321    # socket/setsockopt and other routines are undefined under SCO ODT
28322    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28323    # on later versions), says Simon Leinen: it contains gethostby*
28324    # variants that don't use the name server (or something).  -lsocket
28325    # must be given before -lnsl if both are needed.  We assume that
28326    # if connect needs -lnsl, so does gethostbyname.
28327    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28328if test "x$ac_cv_func_connect" = x""yes; then :
28329
28330fi
28331
28332    if test $ac_cv_func_connect = no; then
28333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28334$as_echo_n "checking for connect in -lsocket... " >&6; }
28335if test "${ac_cv_lib_socket_connect+set}" = set; then :
28336  $as_echo_n "(cached) " >&6
28337else
28338  ac_check_lib_save_LIBS=$LIBS
28339LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28341/* end confdefs.h.  */
28342
28343/* Override any GCC internal prototype to avoid an error.
28344   Use char because int might match the return type of a GCC
28345   builtin and then its argument prototype would still apply.  */
28346#ifdef __cplusplus
28347extern "C"
28348#endif
28349char connect ();
28350int
28351main ()
28352{
28353return connect ();
28354  ;
28355  return 0;
28356}
28357_ACEOF
28358if ac_fn_cxx_try_link "$LINENO"; then :
28359  ac_cv_lib_socket_connect=yes
28360else
28361  ac_cv_lib_socket_connect=no
28362fi
28363rm -f core conftest.err conftest.$ac_objext \
28364    conftest$ac_exeext conftest.$ac_ext
28365LIBS=$ac_check_lib_save_LIBS
28366fi
28367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28368$as_echo "$ac_cv_lib_socket_connect" >&6; }
28369if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28370  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28371fi
28372
28373    fi
28374
28375    # Guillermo Gomez says -lposix is necessary on A/UX.
28376    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28377if test "x$ac_cv_func_remove" = x""yes; then :
28378
28379fi
28380
28381    if test $ac_cv_func_remove = no; then
28382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28383$as_echo_n "checking for remove in -lposix... " >&6; }
28384if test "${ac_cv_lib_posix_remove+set}" = set; then :
28385  $as_echo_n "(cached) " >&6
28386else
28387  ac_check_lib_save_LIBS=$LIBS
28388LIBS="-lposix  $LIBS"
28389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28390/* end confdefs.h.  */
28391
28392/* Override any GCC internal prototype to avoid an error.
28393   Use char because int might match the return type of a GCC
28394   builtin and then its argument prototype would still apply.  */
28395#ifdef __cplusplus
28396extern "C"
28397#endif
28398char remove ();
28399int
28400main ()
28401{
28402return remove ();
28403  ;
28404  return 0;
28405}
28406_ACEOF
28407if ac_fn_cxx_try_link "$LINENO"; then :
28408  ac_cv_lib_posix_remove=yes
28409else
28410  ac_cv_lib_posix_remove=no
28411fi
28412rm -f core conftest.err conftest.$ac_objext \
28413    conftest$ac_exeext conftest.$ac_ext
28414LIBS=$ac_check_lib_save_LIBS
28415fi
28416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28417$as_echo "$ac_cv_lib_posix_remove" >&6; }
28418if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28419  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28420fi
28421
28422    fi
28423
28424    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28425    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28426if test "x$ac_cv_func_shmat" = x""yes; then :
28427
28428fi
28429
28430    if test $ac_cv_func_shmat = no; then
28431      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28432$as_echo_n "checking for shmat in -lipc... " >&6; }
28433if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28434  $as_echo_n "(cached) " >&6
28435else
28436  ac_check_lib_save_LIBS=$LIBS
28437LIBS="-lipc  $LIBS"
28438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28439/* end confdefs.h.  */
28440
28441/* Override any GCC internal prototype to avoid an error.
28442   Use char because int might match the return type of a GCC
28443   builtin and then its argument prototype would still apply.  */
28444#ifdef __cplusplus
28445extern "C"
28446#endif
28447char shmat ();
28448int
28449main ()
28450{
28451return shmat ();
28452  ;
28453  return 0;
28454}
28455_ACEOF
28456if ac_fn_cxx_try_link "$LINENO"; then :
28457  ac_cv_lib_ipc_shmat=yes
28458else
28459  ac_cv_lib_ipc_shmat=no
28460fi
28461rm -f core conftest.err conftest.$ac_objext \
28462    conftest$ac_exeext conftest.$ac_ext
28463LIBS=$ac_check_lib_save_LIBS
28464fi
28465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28466$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28467if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28468  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28469fi
28470
28471    fi
28472  fi
28473
28474  # Check for libraries that X11R6 Xt/Xaw programs need.
28475  ac_save_LDFLAGS=$LDFLAGS
28476  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28477  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28478  # check for ICE first), but we must link in the order -lSM -lICE or
28479  # we get undefined symbols.  So assume we have SM if we have ICE.
28480  # These have to be linked with before -lX11, unlike the other
28481  # libraries we check for below, so use a different variable.
28482  # John Interrante, Karl Berry
28483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28484$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28485if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28486  $as_echo_n "(cached) " >&6
28487else
28488  ac_check_lib_save_LIBS=$LIBS
28489LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28491/* end confdefs.h.  */
28492
28493/* Override any GCC internal prototype to avoid an error.
28494   Use char because int might match the return type of a GCC
28495   builtin and then its argument prototype would still apply.  */
28496#ifdef __cplusplus
28497extern "C"
28498#endif
28499char IceConnectionNumber ();
28500int
28501main ()
28502{
28503return IceConnectionNumber ();
28504  ;
28505  return 0;
28506}
28507_ACEOF
28508if ac_fn_cxx_try_link "$LINENO"; then :
28509  ac_cv_lib_ICE_IceConnectionNumber=yes
28510else
28511  ac_cv_lib_ICE_IceConnectionNumber=no
28512fi
28513rm -f core conftest.err conftest.$ac_objext \
28514    conftest$ac_exeext conftest.$ac_ext
28515LIBS=$ac_check_lib_save_LIBS
28516fi
28517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28518$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28519if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28520  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28521fi
28522
28523  LDFLAGS=$ac_save_LDFLAGS
28524
28525fi
28526
28527
28528if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28529
28530    # Print a helpful message on how to acquire the necessary build dependency.
28531    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28532    MISSING_DEPENDENCY=x11
28533    PKGHANDLER_COMMAND=
28534
28535    case $PKGHANDLER in
28536	apt-get)
28537                apt_help     $MISSING_DEPENDENCY ;;
28538    yum)
28539                yum_help     $MISSING_DEPENDENCY ;;
28540	port)
28541                port_help    $MISSING_DEPENDENCY ;;
28542	pkgutil)
28543                pkgutil_help $MISSING_DEPENDENCY ;;
28544	pkgadd)
28545                pkgadd_help  $MISSING_DEPENDENCY ;;
28546    * )
28547      break ;;
28548    esac
28549
28550    if test "x$PKGHANDLER_COMMAND" != x; then
28551        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28552    fi
28553
28554    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28555fi
28556
28557# Some of the old makefiles require a setting of OPENWIN_HOME
28558# Since the X11R6 directory has disappeared on later Linuxes,
28559# we need to probe for it.
28560if test "x$OPENJDK_TARGET_OS" = xlinux; then
28561    if test -d "$SYS_ROOT/usr/X11R6"; then
28562        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28563    fi
28564    if test -d "$SYS_ROOT/usr/include/X11"; then
28565        OPENWIN_HOME="$SYS_ROOT/usr"
28566    fi
28567fi
28568if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28569    OPENWIN_HOME="/usr/openwin"
28570fi
28571
28572
28573
28574#
28575# Weird Sol10 something check...TODO change to try compile
28576#
28577if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28578  if test "`uname -r`" = "5.10"; then
28579     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28580     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28581     fi
28582  fi
28583fi
28584
28585ac_ext=c
28586ac_cpp='$CPP $CPPFLAGS'
28587ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28588ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28589ac_compiler_gnu=$ac_cv_c_compiler_gnu
28590
28591OLD_CFLAGS="$CFLAGS"
28592CFLAGS="$CFLAGS $X_CFLAGS"
28593
28594# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28595for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28596do :
28597  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28598ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28599                   # include <X11/Xutil.h>
28600
28601"
28602if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28603  cat >>confdefs.h <<_ACEOF
28604#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28605_ACEOF
28606 X11_A_OK=yes
28607else
28608  X11_A_OK=no
28609fi
28610
28611done
28612
28613
28614CFLAGS="$OLD_CFLAGS"
28615ac_ext=cpp
28616ac_cpp='$CXXCPP $CPPFLAGS'
28617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28620
28621
28622if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28623
28624    # Print a helpful message on how to acquire the necessary build dependency.
28625    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28626    MISSING_DEPENDENCY=x11
28627    PKGHANDLER_COMMAND=
28628
28629    case $PKGHANDLER in
28630	apt-get)
28631                apt_help     $MISSING_DEPENDENCY ;;
28632    yum)
28633                yum_help     $MISSING_DEPENDENCY ;;
28634	port)
28635                port_help    $MISSING_DEPENDENCY ;;
28636	pkgutil)
28637                pkgutil_help $MISSING_DEPENDENCY ;;
28638	pkgadd)
28639                pkgadd_help  $MISSING_DEPENDENCY ;;
28640    * )
28641      break ;;
28642    esac
28643
28644    if test "x$PKGHANDLER_COMMAND" != x; then
28645        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28646    fi
28647
28648    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28649fi
28650
28651
28652
28653
28654
28655
28656###############################################################################
28657#
28658# The common unix printing system cups is used to print from java.
28659#
28660
28661# Check whether --with-cups was given.
28662if test "${with_cups+set}" = set; then :
28663  withval=$with_cups;
28664fi
28665
28666
28667# Check whether --with-cups-include was given.
28668if test "${with_cups_include+set}" = set; then :
28669  withval=$with_cups_include;
28670fi
28671
28672
28673if test "x$CUPS_NOT_NEEDED" = xyes; then
28674	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28675		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28676$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28677	fi
28678	CUPS_CFLAGS=
28679else
28680	CUPS_FOUND=no
28681
28682	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28683	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28684	fi
28685
28686	if test "x${with_cups}" != x; then
28687	    CUPS_CFLAGS="-I${with_cups}/include"
28688	    CUPS_FOUND=yes
28689	fi
28690	if test "x${with_cups_include}" != x; then
28691	    CUPS_CFLAGS="-I${with_cups_include}"
28692	    CUPS_FOUND=yes
28693	fi
28694	if test "x$CUPS_FOUND" = xno; then
28695
28696
28697    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28698        # Source the builddeps file again, to make sure it uses the latest variables!
28699        . $builddepsfile
28700        # Look for a target and build machine specific resource!
28701        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28702        if test "x$resource" = x; then
28703            # Ok, lets instead look for a target specific resource
28704            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28705        fi
28706        if test "x$resource" = x; then
28707            # Ok, lets instead look for a build specific resource
28708            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28709        fi
28710        if test "x$resource" = x; then
28711            # Ok, lets instead look for a generic resource
28712            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28713            resource=${builddep_cups}
28714        fi
28715        if test "x$resource" != x; then
28716            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28717$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28718	    # If the resource in the builddeps.conf file is an existing directory,
28719	    # for example /java/linux/cups
28720	    if test -d ${resource}; then
28721	       depdir=${resource}
28722	    else
28723
28724# cups is for example mymodule
28725# $resource is for example libs/general/libmymod_1_2_3.zip
28726# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28727# $with_builddeps_dir is for example /localhome/builddeps
28728# depdir is the name of the variable into which we store the depdir, eg MYMOD
28729# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28730# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28731    filename=`basename $resource`
28732    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28733    filebase=${filename%%.*}
28734    extension=${filename#*.}
28735    installdir=$with_builddeps_dir/$filebase
28736    if test ! -f $installdir/$filename.unpacked; then
28737        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28738$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28739        if test ! -d $installdir; then
28740            mkdir -p $installdir
28741        fi
28742        if test ! -d $installdir; then
28743            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28744        fi
28745        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28746        touch $tmpfile
28747        if test ! -f $tmpfile; then
28748            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28749        fi
28750
28751    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28752    # $tmpfile is the local file name for the downloaded file.
28753    VALID_TOOL=no
28754    if test "x$BDEPS_FTP" = xwget; then
28755       VALID_TOOL=yes
28756       wget -O $tmpfile $with_builddeps_server/$resource
28757    fi
28758    if test "x$BDEPS_FTP" = xlftp; then
28759       VALID_TOOL=yes
28760       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28761    fi
28762    if test "x$BDEPS_FTP" = xftp; then
28763        VALID_TOOL=yes
28764        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28765        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28766        FTPUSERPWD=${FTPSERVER%%@*}
28767        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28768            FTPUSER=${userpwd%%:*}
28769            FTPPWD=${userpwd#*@}
28770            FTPSERVER=${FTPSERVER#*@}
28771        else
28772            FTPUSER=ftp
28773            FTPPWD=ftp
28774        fi
28775        # the "pass" command does not work on some
28776        # ftp clients (read ftp.exe) but if it works,
28777        # passive mode is better!
28778        (\
28779            echo "user $FTPUSER $FTPPWD"        ;\
28780            echo "pass"                         ;\
28781            echo "bin"                          ;\
28782            echo "get $FTPPATH $tmpfile"              ;\
28783        ) | ftp -in $FTPSERVER
28784    fi
28785    if test "x$VALID_TOOL" != xyes; then
28786       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28787    fi
28788
28789        mv $tmpfile $installdir/$filename
28790        if test ! -s $installdir/$filename; then
28791            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28792        fi
28793        case "$extension" in
28794            zip)  echo "Unzipping $installdir/$filename..."
28795               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28796            ;;
28797            tar.gz) echo "Untaring $installdir/$filename..."
28798               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28799            ;;
28800            tgz) echo "Untaring $installdir/$filename..."
28801               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28802            ;;
28803            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28804            ;;
28805        esac
28806    fi
28807    if test -f $installdir/$filename.unpacked; then
28808        depdir=$installdir
28809    fi
28810
28811	    fi
28812            # Source the builddeps file again, because in the previous command, the depdir
28813            # was updated to point at the current build dependency install directory.
28814            . $builddepsfile
28815            # Now extract variables from the builddeps.conf files.
28816            theroot=${builddep_cups_ROOT}
28817            thecflags=${builddep_cups_CFLAGS}
28818            thelibs=${builddep_cups_LIBS}
28819            if test "x$depdir" = x; then
28820                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28821            fi
28822            CUPS=$depdir
28823            if test "x$theroot" != x; then
28824               CUPS="$theroot"
28825            fi
28826            if test "x$thecflags" != x; then
28827               CUPS_CFLAGS="$thecflags"
28828            fi
28829            if test "x$thelibs" != x; then
28830               CUPS_LIBS="$thelibs"
28831            fi
28832            CUPS_FOUND=yes
28833
28834        fi
28835
28836    fi
28837
28838	fi
28839	if test "x$CUPS_FOUND" = xno; then
28840	    # Are the cups headers installed in the default /usr/include location?
28841	    for ac_header in cups/cups.h cups/ppd.h
28842do :
28843  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28844ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28845if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28846  cat >>confdefs.h <<_ACEOF
28847#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28848_ACEOF
28849 CUPS_FOUND=yes
28850	                      CUPS_CFLAGS=
28851	                      DEFAULT_CUPS=yes
28852fi
28853
28854done
28855
28856	fi
28857	if test "x$CUPS_FOUND" = xno; then
28858	    # Getting nervous now? Lets poke around for standard Solaris third-party
28859	    # package installation locations.
28860	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28861$as_echo_n "checking for cups headers... " >&6; }
28862	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28863	       # An SFW package seems to be installed!
28864	       CUPS_FOUND=yes
28865	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28866	    elif test -s /opt/csw/include/cups/cups.h; then
28867	       # A CSW package seems to be installed!
28868	       CUPS_FOUND=yes
28869	       CUPS_CFLAGS="-I/opt/csw/include"
28870	    fi
28871	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28872$as_echo "$CUPS_FOUND" >&6; }
28873	fi
28874	if test "x$CUPS_FOUND" = xno; then
28875
28876    # Print a helpful message on how to acquire the necessary build dependency.
28877    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28878    MISSING_DEPENDENCY=cups
28879    PKGHANDLER_COMMAND=
28880
28881    case $PKGHANDLER in
28882	apt-get)
28883                apt_help     $MISSING_DEPENDENCY ;;
28884    yum)
28885                yum_help     $MISSING_DEPENDENCY ;;
28886	port)
28887                port_help    $MISSING_DEPENDENCY ;;
28888	pkgutil)
28889                pkgutil_help $MISSING_DEPENDENCY ;;
28890	pkgadd)
28891                pkgadd_help  $MISSING_DEPENDENCY ;;
28892    * )
28893      break ;;
28894    esac
28895
28896    if test "x$PKGHANDLER_COMMAND" != x; then
28897        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28898    fi
28899
28900	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28901	fi
28902fi
28903
28904
28905
28906
28907
28908
28909###############################################################################
28910#
28911# The ubiquitous freetype2 library is used to render fonts.
28912#
28913
28914# Check whether --with-freetype was given.
28915if test "${with_freetype+set}" = set; then :
28916  withval=$with_freetype;
28917fi
28918
28919
28920# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28921USING_SYSTEM_FT_LIB=false
28922
28923if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28924	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28925		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28926$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28927	fi
28928	FREETYPE2_CFLAGS=
28929	FREETYPE2_LIBS=
28930        FREETYPE2_LIB_PATH=
28931else
28932	FREETYPE2_FOUND=no
28933
28934	if test "x$with_freetype" != x; then
28935
28936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28937
28938  # Input might be given as Windows format, start by converting to
28939  # unix format.
28940  path="$with_freetype"
28941  new_path=`$CYGPATH -u "$path"`
28942
28943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28946  # "foo.exe" is OK but "foo" is an error.
28947  #
28948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28949  # It is also a way to make sure we got the proper file name for the real test later on.
28950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28951  if test "x$test_shortpath" = x; then
28952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28953$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28954    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28955  fi
28956
28957  # Call helper function which possibly converts this using DOS-style short mode.
28958  # If so, the updated path is stored in $new_path.
28959
28960  input_path="$new_path"
28961  # Check if we need to convert this using DOS-style short mode. If the path
28962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28963  # take no chances and rewrite it.
28964  # Note: m4 eats our [], so we need to use [ and ] instead.
28965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28966  if test "x$has_forbidden_chars" != x; then
28967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28971      # Going to short mode and back again did indeed matter. Since short mode is
28972      # case insensitive, let's make it lowercase to improve readability.
28973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28974      # Now convert it back to Unix-stile (cygpath)
28975      input_path=`$CYGPATH -u "$shortmode_path"`
28976      new_path="$input_path"
28977    fi
28978  fi
28979
28980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28981  if test "x$test_cygdrive_prefix" = x; then
28982    # As a simple fix, exclude /usr/bin since it's not a real path.
28983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28985      # a path prefixed by /cygdrive for fixpath to work.
28986      new_path="$CYGWIN_ROOT_PATH$input_path"
28987    fi
28988  fi
28989
28990
28991  if test "x$path" != "x$new_path"; then
28992    with_freetype="$new_path"
28993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
28994$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
28995  fi
28996
28997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28998
28999  path="$with_freetype"
29000  has_colon=`$ECHO $path | $GREP ^.:`
29001  new_path="$path"
29002  if test "x$has_colon" = x; then
29003    # Not in mixed or Windows style, start by that.
29004    new_path=`cmd //c echo $path`
29005  fi
29006
29007
29008  input_path="$new_path"
29009  # Check if we need to convert this using DOS-style short mode. If the path
29010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29011  # take no chances and rewrite it.
29012  # Note: m4 eats our [], so we need to use [ and ] instead.
29013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29014  if test "x$has_forbidden_chars" != x; then
29015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29017  fi
29018
29019
29020  windows_path="$new_path"
29021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29022    unix_path=`$CYGPATH -u "$windows_path"`
29023    new_path="$unix_path"
29024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29026    new_path="$unix_path"
29027  fi
29028
29029  if test "x$path" != "x$new_path"; then
29030    with_freetype="$new_path"
29031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29032$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29033  fi
29034
29035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29037
29038  else
29039    # We're on a posix platform. Hooray! :)
29040    path="$with_freetype"
29041
29042    if test ! -f "$path" && test ! -d "$path"; then
29043      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29044    fi
29045
29046    has_space=`$ECHO "$path" | $GREP " "`
29047    if test "x$has_space" != x; then
29048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29049$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29050      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29051    fi
29052  fi
29053
29054	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29055            FREETYPE2_LIB_PATH="$with_freetype/lib"
29056            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29057                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29058                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29059            fi
29060            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29061                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29062            fi
29063	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29064            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29065                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29066            fi
29067 	    FREETYPE2_FOUND=yes
29068   	    if test "x$FREETYPE2_FOUND" = xyes; then
29069	        # Verify that the directories exist
29070                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29071		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29072		fi
29073	        # List the contents of the lib.
29074		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29075                if test "x$FREETYPELIB" = x; then
29076		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29077		fi
29078	        # Check one h-file
29079                if ! test -s "$with_freetype/include/ft2build.h"; then
29080		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29081		fi
29082            fi
29083        fi
29084	if test "x$FREETYPE2_FOUND" = xno; then
29085
29086
29087    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29088        # Source the builddeps file again, to make sure it uses the latest variables!
29089        . $builddepsfile
29090        # Look for a target and build machine specific resource!
29091        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29092        if test "x$resource" = x; then
29093            # Ok, lets instead look for a target specific resource
29094            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29095        fi
29096        if test "x$resource" = x; then
29097            # Ok, lets instead look for a build specific resource
29098            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29099        fi
29100        if test "x$resource" = x; then
29101            # Ok, lets instead look for a generic resource
29102            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29103            resource=${builddep_freetype2}
29104        fi
29105        if test "x$resource" != x; then
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29107$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29108	    # If the resource in the builddeps.conf file is an existing directory,
29109	    # for example /java/linux/cups
29110	    if test -d ${resource}; then
29111	       depdir=${resource}
29112	    else
29113
29114# freetype2 is for example mymodule
29115# $resource is for example libs/general/libmymod_1_2_3.zip
29116# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29117# $with_builddeps_dir is for example /localhome/builddeps
29118# depdir is the name of the variable into which we store the depdir, eg MYMOD
29119# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29120# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29121    filename=`basename $resource`
29122    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29123    filebase=${filename%%.*}
29124    extension=${filename#*.}
29125    installdir=$with_builddeps_dir/$filebase
29126    if test ! -f $installdir/$filename.unpacked; then
29127        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29128$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29129        if test ! -d $installdir; then
29130            mkdir -p $installdir
29131        fi
29132        if test ! -d $installdir; then
29133            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29134        fi
29135        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29136        touch $tmpfile
29137        if test ! -f $tmpfile; then
29138            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29139        fi
29140
29141    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29142    # $tmpfile is the local file name for the downloaded file.
29143    VALID_TOOL=no
29144    if test "x$BDEPS_FTP" = xwget; then
29145       VALID_TOOL=yes
29146       wget -O $tmpfile $with_builddeps_server/$resource
29147    fi
29148    if test "x$BDEPS_FTP" = xlftp; then
29149       VALID_TOOL=yes
29150       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29151    fi
29152    if test "x$BDEPS_FTP" = xftp; then
29153        VALID_TOOL=yes
29154        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29155        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29156        FTPUSERPWD=${FTPSERVER%%@*}
29157        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29158            FTPUSER=${userpwd%%:*}
29159            FTPPWD=${userpwd#*@}
29160            FTPSERVER=${FTPSERVER#*@}
29161        else
29162            FTPUSER=ftp
29163            FTPPWD=ftp
29164        fi
29165        # the "pass" command does not work on some
29166        # ftp clients (read ftp.exe) but if it works,
29167        # passive mode is better!
29168        (\
29169            echo "user $FTPUSER $FTPPWD"        ;\
29170            echo "pass"                         ;\
29171            echo "bin"                          ;\
29172            echo "get $FTPPATH $tmpfile"              ;\
29173        ) | ftp -in $FTPSERVER
29174    fi
29175    if test "x$VALID_TOOL" != xyes; then
29176       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29177    fi
29178
29179        mv $tmpfile $installdir/$filename
29180        if test ! -s $installdir/$filename; then
29181            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29182        fi
29183        case "$extension" in
29184            zip)  echo "Unzipping $installdir/$filename..."
29185               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29186            ;;
29187            tar.gz) echo "Untaring $installdir/$filename..."
29188               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29189            ;;
29190            tgz) echo "Untaring $installdir/$filename..."
29191               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29192            ;;
29193            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29194            ;;
29195        esac
29196    fi
29197    if test -f $installdir/$filename.unpacked; then
29198        depdir=$installdir
29199    fi
29200
29201	    fi
29202            # Source the builddeps file again, because in the previous command, the depdir
29203            # was updated to point at the current build dependency install directory.
29204            . $builddepsfile
29205            # Now extract variables from the builddeps.conf files.
29206            theroot=${builddep_freetype2_ROOT}
29207            thecflags=${builddep_freetype2_CFLAGS}
29208            thelibs=${builddep_freetype2_LIBS}
29209            if test "x$depdir" = x; then
29210                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29211            fi
29212            FREETYPE2=$depdir
29213            if test "x$theroot" != x; then
29214               FREETYPE2="$theroot"
29215            fi
29216            if test "x$thecflags" != x; then
29217               FREETYPE2_CFLAGS="$thecflags"
29218            fi
29219            if test "x$thelibs" != x; then
29220               FREETYPE2_LIBS="$thelibs"
29221            fi
29222            FREETYPE2_FOUND=yes
29223            else FREETYPE2_FOUND=no
29224
29225        fi
29226        else FREETYPE2_FOUND=no
29227
29228    fi
29229
29230            USING_SYSTEM_FT_LIB=true
29231	fi
29232	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29233            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29234
29235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29236
29237  # Input might be given as Windows format, start by converting to
29238  # unix format.
29239  path="$FREETYPELOCATION"
29240  new_path=`$CYGPATH -u "$path"`
29241
29242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29245  # "foo.exe" is OK but "foo" is an error.
29246  #
29247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29248  # It is also a way to make sure we got the proper file name for the real test later on.
29249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29250  if test "x$test_shortpath" = x; then
29251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29252$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29253    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29254  fi
29255
29256  # Call helper function which possibly converts this using DOS-style short mode.
29257  # If so, the updated path is stored in $new_path.
29258
29259  input_path="$new_path"
29260  # Check if we need to convert this using DOS-style short mode. If the path
29261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29262  # take no chances and rewrite it.
29263  # Note: m4 eats our [], so we need to use [ and ] instead.
29264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29265  if test "x$has_forbidden_chars" != x; then
29266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29270      # Going to short mode and back again did indeed matter. Since short mode is
29271      # case insensitive, let's make it lowercase to improve readability.
29272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29273      # Now convert it back to Unix-stile (cygpath)
29274      input_path=`$CYGPATH -u "$shortmode_path"`
29275      new_path="$input_path"
29276    fi
29277  fi
29278
29279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29280  if test "x$test_cygdrive_prefix" = x; then
29281    # As a simple fix, exclude /usr/bin since it's not a real path.
29282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29284      # a path prefixed by /cygdrive for fixpath to work.
29285      new_path="$CYGWIN_ROOT_PATH$input_path"
29286    fi
29287  fi
29288
29289
29290  if test "x$path" != "x$new_path"; then
29291    FREETYPELOCATION="$new_path"
29292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29293$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29294  fi
29295
29296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29297
29298  path="$FREETYPELOCATION"
29299  has_colon=`$ECHO $path | $GREP ^.:`
29300  new_path="$path"
29301  if test "x$has_colon" = x; then
29302    # Not in mixed or Windows style, start by that.
29303    new_path=`cmd //c echo $path`
29304  fi
29305
29306
29307  input_path="$new_path"
29308  # Check if we need to convert this using DOS-style short mode. If the path
29309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29310  # take no chances and rewrite it.
29311  # Note: m4 eats our [], so we need to use [ and ] instead.
29312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29313  if test "x$has_forbidden_chars" != x; then
29314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29316  fi
29317
29318
29319  windows_path="$new_path"
29320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29321    unix_path=`$CYGPATH -u "$windows_path"`
29322    new_path="$unix_path"
29323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29325    new_path="$unix_path"
29326  fi
29327
29328  if test "x$path" != "x$new_path"; then
29329    FREETYPELOCATION="$new_path"
29330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29331$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29332  fi
29333
29334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29336
29337  else
29338    # We're on a posix platform. Hooray! :)
29339    path="$FREETYPELOCATION"
29340
29341    if test ! -f "$path" && test ! -d "$path"; then
29342      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29343    fi
29344
29345    has_space=`$ECHO "$path" | $GREP " "`
29346    if test "x$has_space" != x; then
29347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29348$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29349      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29350    fi
29351  fi
29352
29353	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29354$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29355	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29356	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29357	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29358 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29359                if ! test -s "$FREETYPE2_LIBS"; then
29360		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29361		fi
29362                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29363		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29364		fi
29365                USING_SYSTEM_FT_LIB=true
29366                FREETYPE2_FOUND=yes
29367	    fi
29368	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29369$as_echo "$FREETYPE2_FOUND" >&6; }
29370        fi
29371	if test "x$FREETYPE2_FOUND" = xno; then
29372
29373pkg_failed=no
29374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29375$as_echo_n "checking for FREETYPE2... " >&6; }
29376
29377if test -n "$FREETYPE2_CFLAGS"; then
29378    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29379 elif test -n "$PKG_CONFIG"; then
29380    if test -n "$PKG_CONFIG" && \
29381    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29382  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29383  ac_status=$?
29384  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29385  test $ac_status = 0; }; then
29386  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29387else
29388  pkg_failed=yes
29389fi
29390 else
29391    pkg_failed=untried
29392fi
29393if test -n "$FREETYPE2_LIBS"; then
29394    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29395 elif test -n "$PKG_CONFIG"; then
29396    if test -n "$PKG_CONFIG" && \
29397    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29398  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29399  ac_status=$?
29400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29401  test $ac_status = 0; }; then
29402  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29403else
29404  pkg_failed=yes
29405fi
29406 else
29407    pkg_failed=untried
29408fi
29409
29410
29411
29412if test $pkg_failed = yes; then
29413
29414if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29415        _pkg_short_errors_supported=yes
29416else
29417        _pkg_short_errors_supported=no
29418fi
29419        if test $_pkg_short_errors_supported = yes; then
29420	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29421        else
29422	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29423        fi
29424	# Put the nasty error message in config.log where it belongs
29425	echo "$FREETYPE2_PKG_ERRORS" >&5
29426
29427	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29428$as_echo "no" >&6; }
29429                FREETYPE2_FOUND=no
29430elif test $pkg_failed = untried; then
29431	FREETYPE2_FOUND=no
29432else
29433	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29434	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29435        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29436$as_echo "yes" >&6; }
29437	FREETYPE2_FOUND=yes
29438fi
29439            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29440            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29441            USING_SYSTEM_FT_LIB=true
29442            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29443            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29444              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29445            fi
29446	fi
29447	if test "x$FREETYPE2_FOUND" = xno; then
29448	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29449$as_echo_n "checking for freetype in some standard locations... " >&6; }
29450
29451	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29452	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29453	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29454	    fi
29455	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29456	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29457	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29458	    fi
29459
29460	    PREV_CXXCFLAGS="$CXXFLAGS"
29461	    PREV_LDFLAGS="$LDFLAGS"
29462	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29463	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29464	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29465/* end confdefs.h.  */
29466#include<ft2build.h>
29467	                    #include FT_FREETYPE_H
29468	                   int main() { return 0; }
29469
29470_ACEOF
29471if ac_fn_cxx_try_link "$LINENO"; then :
29472
29473	                      # Yes, the default cflags and libs did the trick.
29474	                      FREETYPE2_FOUND=yes
29475	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29476	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29477
29478else
29479
29480	                      FREETYPE2_FOUND=no
29481
29482fi
29483rm -f core conftest.err conftest.$ac_objext \
29484    conftest$ac_exeext conftest.$ac_ext
29485            CXXCFLAGS="$PREV_CXXFLAGS"
29486	    LDFLAGS="$PREV_LDFLAGS"
29487	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29488$as_echo "$FREETYPE2_FOUND" >&6; }
29489            USING_SYSTEM_FT_LIB=true
29490	fi
29491	if test "x$FREETYPE2_FOUND" = xno; then
29492
29493    # Print a helpful message on how to acquire the necessary build dependency.
29494    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29495    MISSING_DEPENDENCY=freetype2
29496    PKGHANDLER_COMMAND=
29497
29498    case $PKGHANDLER in
29499	apt-get)
29500                apt_help     $MISSING_DEPENDENCY ;;
29501    yum)
29502                yum_help     $MISSING_DEPENDENCY ;;
29503	port)
29504                port_help    $MISSING_DEPENDENCY ;;
29505	pkgutil)
29506                pkgutil_help $MISSING_DEPENDENCY ;;
29507	pkgadd)
29508                pkgadd_help  $MISSING_DEPENDENCY ;;
29509    * )
29510      break ;;
29511    esac
29512
29513    if test "x$PKGHANDLER_COMMAND" != x; then
29514        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29515    fi
29516
29517		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29518	fi
29519
29520        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29521            # AC_CHECK_LIB does not support use of cl.exe
29522            PREV_LDFLAGS="$LDFLAGS"
29523            LDFLAGS="$FREETYPE2_LIBS"
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29525$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29526if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29527  $as_echo_n "(cached) " >&6
29528else
29529  ac_check_lib_save_LIBS=$LIBS
29530LIBS="-lfreetype  $LIBS"
29531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29532/* end confdefs.h.  */
29533
29534/* Override any GCC internal prototype to avoid an error.
29535   Use char because int might match the return type of a GCC
29536   builtin and then its argument prototype would still apply.  */
29537#ifdef __cplusplus
29538extern "C"
29539#endif
29540char FT_Init_FreeType ();
29541int
29542main ()
29543{
29544return FT_Init_FreeType ();
29545  ;
29546  return 0;
29547}
29548_ACEOF
29549if ac_fn_cxx_try_link "$LINENO"; then :
29550  ac_cv_lib_freetype_FT_Init_FreeType=yes
29551else
29552  ac_cv_lib_freetype_FT_Init_FreeType=no
29553fi
29554rm -f core conftest.err conftest.$ac_objext \
29555    conftest$ac_exeext conftest.$ac_ext
29556LIBS=$ac_check_lib_save_LIBS
29557fi
29558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29559$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29560if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29561  FREETYPE2_FOUND=true
29562else
29563  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29564fi
29565
29566            LDFLAGS="$PREV_LDFLAGS"
29567        fi
29568fi
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578###############################################################################
29579#
29580# Check for alsa headers and libraries. Used on Linux/GNU systems.
29581#
29582
29583# Check whether --with-alsa was given.
29584if test "${with_alsa+set}" = set; then :
29585  withval=$with_alsa;
29586fi
29587
29588
29589# Check whether --with-alsa-include was given.
29590if test "${with_alsa_include+set}" = set; then :
29591  withval=$with_alsa_include;
29592fi
29593
29594
29595# Check whether --with-alsa-lib was given.
29596if test "${with_alsa_lib+set}" = set; then :
29597  withval=$with_alsa_lib;
29598fi
29599
29600
29601if test "x$ALSA_NOT_NEEDED" = xyes; then
29602	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29603		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29604$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29605	fi
29606	ALSA_CFLAGS=
29607	ALSA_LIBS=
29608else
29609	ALSA_FOUND=no
29610
29611	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29612	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29613	fi
29614
29615	if test "x${with_alsa}" != x; then
29616	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29617	    ALSA_CFLAGS="-I${with_alsa}/include"
29618	    ALSA_FOUND=yes
29619	fi
29620	if test "x${with_alsa_include}" != x; then
29621	    ALSA_CFLAGS="-I${with_alsa_include}"
29622	    ALSA_FOUND=yes
29623	fi
29624	if test "x${with_alsa_lib}" != x; then
29625	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29626	    ALSA_FOUND=yes
29627	fi
29628	if test "x$ALSA_FOUND" = xno; then
29629
29630
29631    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29632        # Source the builddeps file again, to make sure it uses the latest variables!
29633        . $builddepsfile
29634        # Look for a target and build machine specific resource!
29635        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29636        if test "x$resource" = x; then
29637            # Ok, lets instead look for a target specific resource
29638            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29639        fi
29640        if test "x$resource" = x; then
29641            # Ok, lets instead look for a build specific resource
29642            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29643        fi
29644        if test "x$resource" = x; then
29645            # Ok, lets instead look for a generic resource
29646            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29647            resource=${builddep_alsa}
29648        fi
29649        if test "x$resource" != x; then
29650            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29651$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29652	    # If the resource in the builddeps.conf file is an existing directory,
29653	    # for example /java/linux/cups
29654	    if test -d ${resource}; then
29655	       depdir=${resource}
29656	    else
29657
29658# alsa is for example mymodule
29659# $resource is for example libs/general/libmymod_1_2_3.zip
29660# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29661# $with_builddeps_dir is for example /localhome/builddeps
29662# depdir is the name of the variable into which we store the depdir, eg MYMOD
29663# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29664# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29665    filename=`basename $resource`
29666    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29667    filebase=${filename%%.*}
29668    extension=${filename#*.}
29669    installdir=$with_builddeps_dir/$filebase
29670    if test ! -f $installdir/$filename.unpacked; then
29671        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29672$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29673        if test ! -d $installdir; then
29674            mkdir -p $installdir
29675        fi
29676        if test ! -d $installdir; then
29677            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29678        fi
29679        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29680        touch $tmpfile
29681        if test ! -f $tmpfile; then
29682            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29683        fi
29684
29685    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29686    # $tmpfile is the local file name for the downloaded file.
29687    VALID_TOOL=no
29688    if test "x$BDEPS_FTP" = xwget; then
29689       VALID_TOOL=yes
29690       wget -O $tmpfile $with_builddeps_server/$resource
29691    fi
29692    if test "x$BDEPS_FTP" = xlftp; then
29693       VALID_TOOL=yes
29694       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29695    fi
29696    if test "x$BDEPS_FTP" = xftp; then
29697        VALID_TOOL=yes
29698        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29699        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29700        FTPUSERPWD=${FTPSERVER%%@*}
29701        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29702            FTPUSER=${userpwd%%:*}
29703            FTPPWD=${userpwd#*@}
29704            FTPSERVER=${FTPSERVER#*@}
29705        else
29706            FTPUSER=ftp
29707            FTPPWD=ftp
29708        fi
29709        # the "pass" command does not work on some
29710        # ftp clients (read ftp.exe) but if it works,
29711        # passive mode is better!
29712        (\
29713            echo "user $FTPUSER $FTPPWD"        ;\
29714            echo "pass"                         ;\
29715            echo "bin"                          ;\
29716            echo "get $FTPPATH $tmpfile"              ;\
29717        ) | ftp -in $FTPSERVER
29718    fi
29719    if test "x$VALID_TOOL" != xyes; then
29720       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29721    fi
29722
29723        mv $tmpfile $installdir/$filename
29724        if test ! -s $installdir/$filename; then
29725            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29726        fi
29727        case "$extension" in
29728            zip)  echo "Unzipping $installdir/$filename..."
29729               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29730            ;;
29731            tar.gz) echo "Untaring $installdir/$filename..."
29732               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29733            ;;
29734            tgz) echo "Untaring $installdir/$filename..."
29735               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29736            ;;
29737            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29738            ;;
29739        esac
29740    fi
29741    if test -f $installdir/$filename.unpacked; then
29742        depdir=$installdir
29743    fi
29744
29745	    fi
29746            # Source the builddeps file again, because in the previous command, the depdir
29747            # was updated to point at the current build dependency install directory.
29748            . $builddepsfile
29749            # Now extract variables from the builddeps.conf files.
29750            theroot=${builddep_alsa_ROOT}
29751            thecflags=${builddep_alsa_CFLAGS}
29752            thelibs=${builddep_alsa_LIBS}
29753            if test "x$depdir" = x; then
29754                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29755            fi
29756            ALSA=$depdir
29757            if test "x$theroot" != x; then
29758               ALSA="$theroot"
29759            fi
29760            if test "x$thecflags" != x; then
29761               ALSA_CFLAGS="$thecflags"
29762            fi
29763            if test "x$thelibs" != x; then
29764               ALSA_LIBS="$thelibs"
29765            fi
29766            ALSA_FOUND=yes
29767            else ALSA_FOUND=no
29768
29769        fi
29770        else ALSA_FOUND=no
29771
29772    fi
29773
29774	fi
29775	if test "x$ALSA_FOUND" = xno; then
29776
29777pkg_failed=no
29778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29779$as_echo_n "checking for ALSA... " >&6; }
29780
29781if test -n "$ALSA_CFLAGS"; then
29782    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29783 elif test -n "$PKG_CONFIG"; then
29784    if test -n "$PKG_CONFIG" && \
29785    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29786  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29787  ac_status=$?
29788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29789  test $ac_status = 0; }; then
29790  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29791else
29792  pkg_failed=yes
29793fi
29794 else
29795    pkg_failed=untried
29796fi
29797if test -n "$ALSA_LIBS"; then
29798    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29799 elif test -n "$PKG_CONFIG"; then
29800    if test -n "$PKG_CONFIG" && \
29801    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29802  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29803  ac_status=$?
29804  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29805  test $ac_status = 0; }; then
29806  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29807else
29808  pkg_failed=yes
29809fi
29810 else
29811    pkg_failed=untried
29812fi
29813
29814
29815
29816if test $pkg_failed = yes; then
29817
29818if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29819        _pkg_short_errors_supported=yes
29820else
29821        _pkg_short_errors_supported=no
29822fi
29823        if test $_pkg_short_errors_supported = yes; then
29824	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29825        else
29826	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29827        fi
29828	# Put the nasty error message in config.log where it belongs
29829	echo "$ALSA_PKG_ERRORS" >&5
29830
29831	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29832$as_echo "no" >&6; }
29833                ALSA_FOUND=no
29834elif test $pkg_failed = untried; then
29835	ALSA_FOUND=no
29836else
29837	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29838	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29840$as_echo "yes" >&6; }
29841	ALSA_FOUND=yes
29842fi
29843	fi
29844	if test "x$ALSA_FOUND" = xno; then
29845	    for ac_header in alsa/asoundlib.h
29846do :
29847  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29848if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29849  cat >>confdefs.h <<_ACEOF
29850#define HAVE_ALSA_ASOUNDLIB_H 1
29851_ACEOF
29852 ALSA_FOUND=yes
29853	                      ALSA_CFLAGS=-Iignoreme
29854	                      ALSA_LIBS=-lasound
29855	                      DEFAULT_ALSA=yes
29856else
29857  ALSA_FOUND=no
29858fi
29859
29860done
29861
29862	fi
29863	if test "x$ALSA_FOUND" = xno; then
29864
29865    # Print a helpful message on how to acquire the necessary build dependency.
29866    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29867    MISSING_DEPENDENCY=alsa
29868    PKGHANDLER_COMMAND=
29869
29870    case $PKGHANDLER in
29871	apt-get)
29872                apt_help     $MISSING_DEPENDENCY ;;
29873    yum)
29874                yum_help     $MISSING_DEPENDENCY ;;
29875	port)
29876                port_help    $MISSING_DEPENDENCY ;;
29877	pkgutil)
29878                pkgutil_help $MISSING_DEPENDENCY ;;
29879	pkgadd)
29880                pkgadd_help  $MISSING_DEPENDENCY ;;
29881    * )
29882      break ;;
29883    esac
29884
29885    if test "x$PKGHANDLER_COMMAND" != x; then
29886        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29887    fi
29888
29889	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29890	fi
29891fi
29892
29893
29894
29895
29896
29897
29898
29899###############################################################################
29900#
29901# Check for the jpeg library
29902#
29903
29904USE_EXTERNAL_LIBJPEG=true
29905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29906$as_echo_n "checking for main in -ljpeg... " >&6; }
29907if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29908  $as_echo_n "(cached) " >&6
29909else
29910  ac_check_lib_save_LIBS=$LIBS
29911LIBS="-ljpeg  $LIBS"
29912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29913/* end confdefs.h.  */
29914
29915
29916int
29917main ()
29918{
29919return main ();
29920  ;
29921  return 0;
29922}
29923_ACEOF
29924if ac_fn_cxx_try_link "$LINENO"; then :
29925  ac_cv_lib_jpeg_main=yes
29926else
29927  ac_cv_lib_jpeg_main=no
29928fi
29929rm -f core conftest.err conftest.$ac_objext \
29930    conftest$ac_exeext conftest.$ac_ext
29931LIBS=$ac_check_lib_save_LIBS
29932fi
29933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29934$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29935if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29936  cat >>confdefs.h <<_ACEOF
29937#define HAVE_LIBJPEG 1
29938_ACEOF
29939
29940  LIBS="-ljpeg $LIBS"
29941
29942else
29943   USE_EXTERNAL_LIBJPEG=false
29944               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29945$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29946
29947fi
29948
29949
29950
29951###############################################################################
29952#
29953# Check for the gif library
29954#
29955
29956USE_EXTERNAL_LIBJPEG=true
29957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29958$as_echo_n "checking for main in -lgif... " >&6; }
29959if test "${ac_cv_lib_gif_main+set}" = set; then :
29960  $as_echo_n "(cached) " >&6
29961else
29962  ac_check_lib_save_LIBS=$LIBS
29963LIBS="-lgif  $LIBS"
29964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29965/* end confdefs.h.  */
29966
29967
29968int
29969main ()
29970{
29971return main ();
29972  ;
29973  return 0;
29974}
29975_ACEOF
29976if ac_fn_cxx_try_link "$LINENO"; then :
29977  ac_cv_lib_gif_main=yes
29978else
29979  ac_cv_lib_gif_main=no
29980fi
29981rm -f core conftest.err conftest.$ac_objext \
29982    conftest$ac_exeext conftest.$ac_ext
29983LIBS=$ac_check_lib_save_LIBS
29984fi
29985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
29986$as_echo "$ac_cv_lib_gif_main" >&6; }
29987if test "x$ac_cv_lib_gif_main" = x""yes; then :
29988  cat >>confdefs.h <<_ACEOF
29989#define HAVE_LIBGIF 1
29990_ACEOF
29991
29992  LIBS="-lgif $LIBS"
29993
29994else
29995   USE_EXTERNAL_LIBGIF=false
29996               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
29997$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
29998
29999fi
30000
30001
30002
30003###############################################################################
30004#
30005# Check for the zlib library
30006#
30007
30008
30009# Check whether --with-zlib was given.
30010if test "${with_zlib+set}" = set; then :
30011  withval=$with_zlib;
30012fi
30013
30014
30015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30016$as_echo_n "checking for compress in -lz... " >&6; }
30017if test "${ac_cv_lib_z_compress+set}" = set; then :
30018  $as_echo_n "(cached) " >&6
30019else
30020  ac_check_lib_save_LIBS=$LIBS
30021LIBS="-lz  $LIBS"
30022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30023/* end confdefs.h.  */
30024
30025/* Override any GCC internal prototype to avoid an error.
30026   Use char because int might match the return type of a GCC
30027   builtin and then its argument prototype would still apply.  */
30028#ifdef __cplusplus
30029extern "C"
30030#endif
30031char compress ();
30032int
30033main ()
30034{
30035return compress ();
30036  ;
30037  return 0;
30038}
30039_ACEOF
30040if ac_fn_cxx_try_link "$LINENO"; then :
30041  ac_cv_lib_z_compress=yes
30042else
30043  ac_cv_lib_z_compress=no
30044fi
30045rm -f core conftest.err conftest.$ac_objext \
30046    conftest$ac_exeext conftest.$ac_ext
30047LIBS=$ac_check_lib_save_LIBS
30048fi
30049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30050$as_echo "$ac_cv_lib_z_compress" >&6; }
30051if test "x$ac_cv_lib_z_compress" = x""yes; then :
30052   ZLIB_FOUND=yes
30053else
30054   ZLIB_FOUND=no
30055fi
30056
30057
30058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30059$as_echo_n "checking for which zlib to use... " >&6; }
30060
30061DEFAULT_ZLIB=bundled
30062if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30063#
30064# On macosx default is system...on others default is
30065#
30066    DEFAULT_ZLIB=system
30067fi
30068
30069if test "x${ZLIB_FOUND}" != "xyes"; then
30070#
30071# If we don't find any system...set default to bundled
30072#
30073    DEFAULT_ZLIB=bundled
30074fi
30075
30076#
30077# If user didn't specify, use DEFAULT_ZLIB
30078#
30079if test "x${with_zlib}" = "x"; then
30080    with_zlib=${DEFAULT_ZLIB}
30081fi
30082
30083if test "x${with_zlib}" = "xbundled"; then
30084    USE_EXTERNAL_LIBZ=false
30085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30086$as_echo "bundled" >&6; }
30087elif test "x${with_zlib}" = "xsystem"; then
30088    if test "x${ZLIB_FOUND}" = "xyes"; then
30089        USE_EXTERNAL_LIBZ=true
30090        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30091$as_echo "system" >&6; }
30092    else
30093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30094$as_echo "system not found" >&6; }
30095        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30096    fi
30097else
30098    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30099fi
30100
30101
30102
30103###############################################################################
30104LIBZIP_CAN_USE_MMAP=true
30105
30106
30107
30108###############################################################################
30109#
30110# Check if altzone exists in time.h
30111#
30112
30113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30114/* end confdefs.h.  */
30115#include <time.h>
30116int
30117main ()
30118{
30119return (int)altzone;
30120  ;
30121  return 0;
30122}
30123_ACEOF
30124if ac_fn_cxx_try_link "$LINENO"; then :
30125  has_altzone=yes
30126else
30127  has_altzone=no
30128fi
30129rm -f core conftest.err conftest.$ac_objext \
30130    conftest$ac_exeext conftest.$ac_ext
30131if test "x$has_altzone" = xyes; then
30132
30133$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30134
30135fi
30136
30137###############################################################################
30138#
30139# Check the maths library
30140#
30141
30142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30143$as_echo_n "checking for cos in -lm... " >&6; }
30144if test "${ac_cv_lib_m_cos+set}" = set; then :
30145  $as_echo_n "(cached) " >&6
30146else
30147  ac_check_lib_save_LIBS=$LIBS
30148LIBS="-lm  $LIBS"
30149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30150/* end confdefs.h.  */
30151
30152/* Override any GCC internal prototype to avoid an error.
30153   Use char because int might match the return type of a GCC
30154   builtin and then its argument prototype would still apply.  */
30155#ifdef __cplusplus
30156extern "C"
30157#endif
30158char cos ();
30159int
30160main ()
30161{
30162return cos ();
30163  ;
30164  return 0;
30165}
30166_ACEOF
30167if ac_fn_cxx_try_link "$LINENO"; then :
30168  ac_cv_lib_m_cos=yes
30169else
30170  ac_cv_lib_m_cos=no
30171fi
30172rm -f core conftest.err conftest.$ac_objext \
30173    conftest$ac_exeext conftest.$ac_ext
30174LIBS=$ac_check_lib_save_LIBS
30175fi
30176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30177$as_echo "$ac_cv_lib_m_cos" >&6; }
30178if test "x$ac_cv_lib_m_cos" = x""yes; then :
30179  cat >>confdefs.h <<_ACEOF
30180#define HAVE_LIBM 1
30181_ACEOF
30182
30183  LIBS="-lm $LIBS"
30184
30185else
30186
30187                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30188$as_echo "$as_me: Maths library was not found" >&6;}
30189
30190fi
30191
30192
30193
30194###############################################################################
30195#
30196# Check for libdl.so
30197
30198save_LIBS="$LIBS"
30199LIBS=""
30200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30201$as_echo_n "checking for dlopen in -ldl... " >&6; }
30202if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30203  $as_echo_n "(cached) " >&6
30204else
30205  ac_check_lib_save_LIBS=$LIBS
30206LIBS="-ldl  $LIBS"
30207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30208/* end confdefs.h.  */
30209
30210/* Override any GCC internal prototype to avoid an error.
30211   Use char because int might match the return type of a GCC
30212   builtin and then its argument prototype would still apply.  */
30213#ifdef __cplusplus
30214extern "C"
30215#endif
30216char dlopen ();
30217int
30218main ()
30219{
30220return dlopen ();
30221  ;
30222  return 0;
30223}
30224_ACEOF
30225if ac_fn_cxx_try_link "$LINENO"; then :
30226  ac_cv_lib_dl_dlopen=yes
30227else
30228  ac_cv_lib_dl_dlopen=no
30229fi
30230rm -f core conftest.err conftest.$ac_objext \
30231    conftest$ac_exeext conftest.$ac_ext
30232LIBS=$ac_check_lib_save_LIBS
30233fi
30234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30235$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30236if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30237  cat >>confdefs.h <<_ACEOF
30238#define HAVE_LIBDL 1
30239_ACEOF
30240
30241  LIBS="-ldl $LIBS"
30242
30243fi
30244
30245LIBDL="$LIBS"
30246
30247LIBS="$save_LIBS"
30248
30249
30250
30251###############################################################################
30252#
30253# statically link libstdc++ before C++ ABI is stablized on Linux unless
30254# dynamic build is configured on command line.
30255#
30256
30257# Check whether --with-stdc++lib was given.
30258if test "${with_stdc__lib+set}" = set; then :
30259  withval=$with_stdc__lib;
30260    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30261        && test "x$with_stdc__lib" != xdefault; then
30262      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30263    fi
30264
30265else
30266  with_stdc__lib=default
30267
30268fi
30269
30270
30271if test "x$OPENJDK_TARGET_OS" = xlinux; then
30272    # Test if -lstdc++ works.
30273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30274$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30275    ac_ext=cpp
30276ac_cpp='$CXXCPP $CPPFLAGS'
30277ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30278ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30279ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30280
30281    OLD_CXXFLAGS="$CXXFLAGS"
30282    CXXFLAGS="$CXXFLAGS -lstdc++"
30283    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30284/* end confdefs.h.  */
30285
30286int
30287main ()
30288{
30289return 0;
30290  ;
30291  return 0;
30292}
30293_ACEOF
30294if ac_fn_cxx_try_link "$LINENO"; then :
30295  has_dynamic_libstdcxx=yes
30296else
30297  has_dynamic_libstdcxx=no
30298fi
30299rm -f core conftest.err conftest.$ac_objext \
30300    conftest$ac_exeext conftest.$ac_ext
30301    CXXFLAGS="$OLD_CXXFLAGS"
30302    ac_ext=cpp
30303ac_cpp='$CXXCPP $CPPFLAGS'
30304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30307
30308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30309$as_echo "$has_dynamic_libstdcxx" >&6; }
30310
30311    # Test if stdc++ can be linked statically.
30312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30313$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30314    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30315    ac_ext=cpp
30316ac_cpp='$CXXCPP $CPPFLAGS'
30317ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30318ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30319ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30320
30321    OLD_LIBS="$LIBS"
30322    OLD_CXX="$CXX"
30323    LIBS="$STATIC_STDCXX_FLAGS"
30324    CXX="$CC"
30325    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30326/* end confdefs.h.  */
30327
30328int
30329main ()
30330{
30331return 0;
30332  ;
30333  return 0;
30334}
30335_ACEOF
30336if ac_fn_cxx_try_link "$LINENO"; then :
30337  has_static_libstdcxx=yes
30338else
30339  has_static_libstdcxx=no
30340fi
30341rm -f core conftest.err conftest.$ac_objext \
30342    conftest$ac_exeext conftest.$ac_ext
30343    LIBS="$OLD_LIBS"
30344    CXX="$OLD_CXX"
30345    ac_ext=cpp
30346ac_cpp='$CXXCPP $CPPFLAGS'
30347ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30348ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30349ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30350
30351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30352$as_echo "$has_static_libstdcxx" >&6; }
30353
30354    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30355        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30356    fi
30357
30358    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30359        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30360    fi
30361
30362    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30363        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30364    fi
30365
30366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30367$as_echo_n "checking how to link with libstdc++... " >&6; }
30368    # If dynamic was requested, it's available since it would fail above otherwise.
30369    # If dynamic wasn't requested, go with static unless it isn't available.
30370    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30371        LIBCXX="$LIBCXX -lstdc++"
30372        LDCXX="$CXX"
30373        STATIC_CXX_SETTING="STATIC_CXX=false"
30374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30375$as_echo "dynamic" >&6; }
30376    else
30377        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30378        LDCXX="$CC"
30379        STATIC_CXX_SETTING="STATIC_CXX=true"
30380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30381$as_echo "static" >&6; }
30382    fi
30383fi
30384
30385
30386# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30387if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30388    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30389fi
30390
30391# TODO better (platform agnostic) test
30392if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30393    LIBCXX="-lstdc++"
30394fi
30395
30396
30397
30398
30399
30400# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30401
30402# When using cygwin or msys, we need a wrapper binary that renames
30403# /cygdrive/c/ arguments into c:/ arguments and peeks into
30404# @files and rewrites these too! This wrapper binary is
30405# called fixpath.
30406FIXPATH=
30407if test "x$OPENJDK_BUILD_OS" = xwindows; then
30408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30409$as_echo_n "checking if fixpath can be created... " >&6; }
30410    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30411    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30412    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30413      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30414      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30415      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30416      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30417    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30418      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30419      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30420
30421      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30422      # @ was chosen as separator to minimize risk of other tools messing around with it
30423      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30424      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30425
30426      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30427    fi
30428    rm -f $OUTPUT_ROOT/fixpath*
30429    cd $OUTPUT_ROOT
30430    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30431    cd $CURDIR
30432
30433    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30435$as_echo "no" >&6; }
30436        cat $OUTPUT_ROOT/fixpath1.log
30437        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30438    fi
30439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30440$as_echo "yes" >&6; }
30441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30442$as_echo_n "checking if fixpath.exe works... " >&6; }
30443    cd $OUTPUT_ROOT
30444    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30445    cd $CURDIR
30446    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30448$as_echo "no" >&6; }
30449        cat $OUTPUT_ROOT/fixpath2.log
30450        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30451    fi
30452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30453$as_echo "yes" >&6; }
30454    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30455fi
30456
30457
30458
30459
30460###############################################################################
30461#
30462# We need to do some final tweaking, when everything else is done.
30463#
30464###############################################################################
30465
30466
30467HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30468
30469
30470# The name of the Service Agent jar.
30471SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30472if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30473    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30474fi
30475
30476
30477
30478
30479###############################################################################
30480#
30481# Configure parts of the build that only affect the build performance,
30482# not the result.
30483#
30484###############################################################################
30485
30486
30487# How many cores do we have on this build system?
30488
30489# Check whether --with-num-cores was given.
30490if test "${with_num_cores+set}" = set; then :
30491  withval=$with_num_cores;
30492fi
30493
30494if test "x$with_num_cores" = x; then
30495    # The number of cores were not specified, try to probe them.
30496
30497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30498$as_echo_n "checking for number of cores... " >&6; }
30499    NUM_CORES=1
30500    FOUND_CORES=no
30501
30502    if test -f /proc/cpuinfo; then
30503        # Looks like a Linux (or cygwin) system
30504        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30505        FOUND_CORES=yes
30506    elif test -x /usr/sbin/psrinfo; then
30507        # Looks like a Solaris system
30508        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30509        FOUND_CORES=yes
30510    elif test -x /usr/sbin/system_profiler; then
30511        # Looks like a MacOSX system
30512        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30513        FOUND_CORES=yes
30514    elif test -n "$NUMBER_OF_PROCESSORS"; then
30515        # On windows, look in the env
30516        NUM_CORES=$NUMBER_OF_PROCESSORS
30517        FOUND_CORES=yes
30518    fi
30519
30520    # For c/c++ code we run twice as many concurrent build
30521    # jobs than we have cores, otherwise we will stall on io.
30522    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30523
30524    if test "x$FOUND_CORES" = xyes; then
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30526$as_echo "$NUM_CORES" >&6; }
30527    else
30528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30529$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30531$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30532    fi
30533
30534
30535else
30536    NUM_CORES=$with_num_cores
30537    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30538fi
30539
30540
30541
30542
30543# How much memory do we have on this build system?
30544
30545# Check whether --with-memory-size was given.
30546if test "${with_memory_size+set}" = set; then :
30547  withval=$with_memory_size;
30548fi
30549
30550if test "x$with_memory_size" = x; then
30551    # The memory size was not specified, try to probe it.
30552
30553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30554$as_echo_n "checking for memory size... " >&6; }
30555    # Default to 1024 MB
30556    MEMORY_SIZE=1024
30557    FOUND_MEM=no
30558
30559    if test -f /proc/meminfo; then
30560        # Looks like a Linux (or cygwin) system
30561        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30562        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30563        FOUND_MEM=yes
30564    elif test -x /usr/sbin/prtconf; then
30565        # Looks like a Solaris system
30566        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30567        FOUND_MEM=yes
30568    elif test -x /usr/sbin/system_profiler; then
30569        # Looks like a MacOSX system
30570        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30571        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30572        FOUND_MEM=yes
30573    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30574        # Windows, but without cygwin
30575        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30576        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30577        FOUND_MEM=yes
30578    fi
30579
30580    if test "x$FOUND_MEM" = xyes; then
30581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30582$as_echo "$MEMORY_SIZE MB" >&6; }
30583    else
30584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30585$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30587$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30588    fi
30589
30590else
30591    MEMORY_SIZE=$with_memory_size
30592fi
30593
30594
30595
30596# Setup smart javac (after cores and memory have been setup)
30597
30598
30599# Check whether --with-sjavac-server-java was given.
30600if test "${with_sjavac_server_java+set}" = set; then :
30601  withval=$with_sjavac_server_java;
30602fi
30603
30604
30605if test "x$with_sjavac_server_java" != x; then
30606    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30607    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30608    if test "x$FOUND_VERSION" = x; then
30609        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30610    fi
30611else
30612    SJAVAC_SERVER_JAVA=""
30613    # Hotspot specific options.
30614
30615    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30616    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30617    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30618    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30619    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30620        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30621    fi
30622
30623    # JRockit specific options.
30624
30625    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30626    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30627    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30628    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30629    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30630        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30631    fi
30632
30633    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30634fi
30635
30636
30637
30638# Check whether --with-sjavac-server-cores was given.
30639if test "${with_sjavac_server_cores+set}" = set; then :
30640  withval=$with_sjavac_server_cores;
30641fi
30642
30643if test "x$with_sjavac_server_cores" != x; then
30644    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30645else
30646    if test "$NUM_CORES" -gt 16; then
30647        # We set this arbitrary limit because we want to limit the heap
30648        # size of the javac server.
30649        # In the future we will make the javac compilers in the server
30650        # share more and more state, thus enabling us to use more and
30651        # more concurrent threads in the server.
30652        SJAVAC_SERVER_CORES="16"
30653    else
30654        SJAVAC_SERVER_CORES="$NUM_CORES"
30655    fi
30656
30657    if test "$MEMORY_SIZE" -gt "17000"; then
30658        MAX_HEAP_MEM=10000
30659
30660    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30661    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30662    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30663    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30664    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30665        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30666    fi
30667
30668
30669    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30670    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30671    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30672    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30673    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30674        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30675    fi
30676
30677    elif test "$MEMORY_SIZE" -gt "10000"; then
30678        MAX_HEAP_MEM=6000
30679
30680    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30681    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30682    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30683    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30684    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30685        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30686    fi
30687
30688
30689    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30690    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30691    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30692    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30693    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30694        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30695    fi
30696
30697    elif test "$MEMORY_SIZE" -gt "5000"; then
30698        MAX_HEAP_MEM=3000
30699
30700    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30701    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30702    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30703    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30704    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30705        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30706    fi
30707
30708
30709    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30710    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30711    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30712    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30713    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30714        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30715    fi
30716
30717    elif test "$MEMORY_SIZE" -gt "3800"; then
30718        MAX_HEAP_MEM=2500
30719
30720    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30721    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30722    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30723    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30724    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30725        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30726    fi
30727
30728    elif test "$MEMORY_SIZE" -gt "1900"; then
30729        MAX_HEAP_MEM=1200
30730
30731    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30732    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30733    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30734    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30735    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30736        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30737    fi
30738
30739    elif test "$MEMORY_SIZE" -gt "1000"; then
30740        MAX_HEAP_MEM=900
30741
30742    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30743    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30744    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30745    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30746    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30747        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30748    fi
30749
30750    else
30751        MAX_HEAP_MEM=512
30752
30753    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30754    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30755    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30756    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30757    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30758        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30759    fi
30760
30761    fi
30762
30763
30764    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30765    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30766    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30767    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30768    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30769        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30770    fi
30771
30772
30773    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30774    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30775    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30776    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30777    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30778        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30779    fi
30780
30781
30782    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30783    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30784    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30785    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30786    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30787        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30788    fi
30789
30790
30791    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30792    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30794$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30795        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30797$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30798    fi
30799fi
30800
30801
30802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30803$as_echo_n "checking whether to use sjavac... " >&6; }
30804# Check whether --enable-sjavac was given.
30805if test "${enable_sjavac+set}" = set; then :
30806  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30807else
30808  ENABLE_SJAVAC='no'
30809fi
30810
30811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30812$as_echo "$ENABLE_SJAVAC" >&6; }
30813
30814
30815if test "x$ENABLE_SJAVAC" = xyes; then
30816    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30817else
30818    SJAVAC_SERVER_DIR=
30819fi
30820
30821
30822
30823
30824# Can the C/C++ compiler use precompiled headers?
30825
30826
30827###############################################################################
30828#
30829# Can the C/C++ compiler use precompiled headers?
30830#
30831# Check whether --enable-precompiled-headers was given.
30832if test "${enable_precompiled_headers+set}" = set; then :
30833  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
30834else
30835  ENABLE_PRECOMPH=yes
30836fi
30837
30838
30839USE_PRECOMPILED_HEADER=1
30840if test "x$ENABLE_PRECOMPH" = xno; then
30841    USE_PRECOMPILED_HEADER=0
30842fi
30843
30844if test "x$ENABLE_PRECOMPH" = xyes; then
30845    # Check that the compiler actually supports precomp headers.
30846    if test "x$GCC" = xyes; then
30847         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30848$as_echo_n "checking that precompiled headers work... " >&6; }
30849         echo "int alfa();" > conftest.h
30850         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
30851         if test ! -f conftest.hpp.gch; then
30852             USE_PRECOMPILED_HEADER=0
30853             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30854$as_echo "no" >&6; }
30855         else
30856             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30857$as_echo "yes" >&6; }
30858         fi
30859         rm -f conftest.h conftest.hpp.gch
30860    fi
30861fi
30862
30863
30864
30865
30866# Setup use of ccache, if available
30867
30868    # Check whether --enable-ccache was given.
30869if test "${enable_ccache+set}" = set; then :
30870  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30871else
30872  ENABLE_CCACHE=yes
30873fi
30874
30875    if test "x$ENABLE_CCACHE" = xyes; then
30876        # Extract the first word of "ccache", so it can be a program name with args.
30877set dummy ccache; ac_word=$2
30878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30879$as_echo_n "checking for $ac_word... " >&6; }
30880if test "${ac_cv_path_CCACHE+set}" = set; then :
30881  $as_echo_n "(cached) " >&6
30882else
30883  case $CCACHE in
30884  [\\/]* | ?:[\\/]*)
30885  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30886  ;;
30887  *)
30888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30889for as_dir in $PATH
30890do
30891  IFS=$as_save_IFS
30892  test -z "$as_dir" && as_dir=.
30893    for ac_exec_ext in '' $ac_executable_extensions; do
30894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30895    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30897    break 2
30898  fi
30899done
30900  done
30901IFS=$as_save_IFS
30902
30903  ;;
30904esac
30905fi
30906CCACHE=$ac_cv_path_CCACHE
30907if test -n "$CCACHE"; then
30908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30909$as_echo "$CCACHE" >&6; }
30910else
30911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30912$as_echo "no" >&6; }
30913fi
30914
30915
30916    else
30917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30918$as_echo_n "checking for ccache... " >&6; }
30919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30920$as_echo "explicitly disabled" >&6; }
30921        CCACHE=
30922    fi
30923
30924
30925
30926# Check whether --with-ccache-dir was given.
30927if test "${with_ccache_dir+set}" = set; then :
30928  withval=$with_ccache_dir;
30929fi
30930
30931
30932    if test "x$with_ccache_dir" != x; then
30933        # When using a non home ccache directory, assume the use is to share ccache files
30934        # with other users. Thus change the umask.
30935        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30936    fi
30937    CCACHE_FOUND=""
30938    if test "x$CCACHE" != x; then
30939
30940    if test "x$CCACHE" != x; then
30941        CCACHE_FOUND="true"
30942        # Only use ccache if it is 3.1.4 or later, which supports
30943        # precompiled headers.
30944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30945$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30946        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30947        if test "x$HAS_GOOD_CCACHE" = x; then
30948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30949$as_echo "no, disabling ccache" >&6; }
30950            CCACHE=
30951        else
30952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30953$as_echo "yes" >&6; }
30954            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30955$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30956            PUSHED_FLAGS="$CXXFLAGS"
30957            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30958            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30959/* end confdefs.h.  */
30960
30961int
30962main ()
30963{
30964
30965  ;
30966  return 0;
30967}
30968_ACEOF
30969if ac_fn_cxx_try_compile "$LINENO"; then :
30970  CC_KNOWS_CCACHE_TRICK=yes
30971else
30972  CC_KNOWS_CCACHE_TRICK=no
30973fi
30974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30975            CXXFLAGS="$PUSHED_FLAGS"
30976            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
30977                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30978$as_echo "yes" >&6; }
30979            else
30980                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
30981$as_echo "no, disabling ccaching of precompiled headers" >&6; }
30982                CCACHE=
30983            fi
30984        fi
30985    fi
30986
30987    if test "x$CCACHE" != x; then
30988        CCACHE_SLOPPINESS=time_macros
30989        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
30990        CCACHE_FLAGS=-fpch-preprocess
30991
30992        if test "x$SET_CCACHE_DIR" != x; then
30993            mkdir -p $CCACHE_DIR > /dev/null 2>&1
30994	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
30995        fi
30996    fi
30997
30998    fi
30999
31000
31001###############################################################################
31002#
31003# And now the finish...
31004#
31005###############################################################################
31006
31007# Check for some common pitfalls
31008
31009
31010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31011$as_echo_n "checking if build directory is on local disk... " >&6; }
31012
31013	# df -l lists only local disks; if the given directory is not found then
31014	# a non-zero exit code is given
31015  if test "x$DF" = x; then
31016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31017      # msys does not have df; use Windows "net use" instead.
31018      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31019      if test "x$IS_NETWORK_DISK" = x; then
31020        OUTPUT_DIR_IS_LOCAL="yes"
31021      else
31022        OUTPUT_DIR_IS_LOCAL="no"
31023      fi
31024    else
31025      # No df here, say it's local
31026      OUTPUT_DIR_IS_LOCAL="yes"
31027    fi
31028  else
31029    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31030      OUTPUT_DIR_IS_LOCAL="yes"
31031    else
31032      OUTPUT_DIR_IS_LOCAL="no"
31033    fi
31034  fi
31035
31036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31037$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31038
31039# Check if the user has any old-style ALT_ variables set.
31040FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31041
31042# Before generating output files, test if they exist. If they do, this is a reconfigure.
31043# Since we can't properly handle the dependencies for this, warn the user about the situation
31044if test -e $OUTPUT_ROOT/spec.gmk; then
31045  IS_RECONFIGURE=yes
31046else
31047  IS_RECONFIGURE=no
31048fi
31049
31050if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31051  HIDE_PERFORMANCE_HINTS=yes
31052else
31053  HIDE_PERFORMANCE_HINTS=no
31054  # Hide it the next time around...
31055  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31056fi
31057
31058
31059
31060# At the end, call the custom hook. (Dummy macro if no custom sources available)
31061
31062
31063# We're messing a bit with internal autoconf variables to put the config.status
31064# in the output directory instead of the current directory.
31065CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31066# Create the actual output files. Now the main work of configure is done.
31067cat >confcache <<\_ACEOF
31068# This file is a shell script that caches the results of configure
31069# tests run on this system so they can be shared between configure
31070# scripts and configure runs, see configure's option --config-cache.
31071# It is not useful on other systems.  If it contains results you don't
31072# want to keep, you may remove or edit it.
31073#
31074# config.status only pays attention to the cache file if you give it
31075# the --recheck option to rerun configure.
31076#
31077# `ac_cv_env_foo' variables (set or unset) will be overridden when
31078# loading this file, other *unset* `ac_cv_foo' will be assigned the
31079# following values.
31080
31081_ACEOF
31082
31083# The following way of writing the cache mishandles newlines in values,
31084# but we know of no workaround that is simple, portable, and efficient.
31085# So, we kill variables containing newlines.
31086# Ultrix sh set writes to stderr and can't be redirected directly,
31087# and sets the high bit in the cache file unless we assign to the vars.
31088(
31089  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31090    eval ac_val=\$$ac_var
31091    case $ac_val in #(
31092    *${as_nl}*)
31093      case $ac_var in #(
31094      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31095$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31096      esac
31097      case $ac_var in #(
31098      _ | IFS | as_nl) ;; #(
31099      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31100      *) { eval $ac_var=; unset $ac_var;} ;;
31101      esac ;;
31102    esac
31103  done
31104
31105  (set) 2>&1 |
31106    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31107    *${as_nl}ac_space=\ *)
31108      # `set' does not quote correctly, so add quotes: double-quote
31109      # substitution turns \\\\ into \\, and sed turns \\ into \.
31110      sed -n \
31111	"s/'/'\\\\''/g;
31112	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31113      ;; #(
31114    *)
31115      # `set' quotes correctly as required by POSIX, so do not add quotes.
31116      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31117      ;;
31118    esac |
31119    sort
31120) |
31121  sed '
31122     /^ac_cv_env_/b end
31123     t clear
31124     :clear
31125     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31126     t end
31127     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31128     :end' >>confcache
31129if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31130  if test -w "$cache_file"; then
31131    test "x$cache_file" != "x/dev/null" &&
31132      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31133$as_echo "$as_me: updating cache $cache_file" >&6;}
31134    cat confcache >$cache_file
31135  else
31136    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31137$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31138  fi
31139fi
31140rm -f confcache
31141
31142test "x$prefix" = xNONE && prefix=$ac_default_prefix
31143# Let make expand exec_prefix.
31144test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31145
31146DEFS=-DHAVE_CONFIG_H
31147
31148ac_libobjs=
31149ac_ltlibobjs=
31150U=
31151for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31152  # 1. Remove the extension, and $U if already installed.
31153  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31154  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31155  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31156  #    will be set to the directory where LIBOBJS objects are built.
31157  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31158  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31159done
31160LIBOBJS=$ac_libobjs
31161
31162LTLIBOBJS=$ac_ltlibobjs
31163
31164
31165
31166: ${CONFIG_STATUS=./config.status}
31167ac_write_fail=0
31168ac_clean_files_save=$ac_clean_files
31169ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31170{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31171$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31172as_write_fail=0
31173cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31174#! $SHELL
31175# Generated by $as_me.
31176# Run this file to recreate the current configuration.
31177# Compiler output produced by configure, useful for debugging
31178# configure, is in config.log if it exists.
31179
31180debug=false
31181ac_cs_recheck=false
31182ac_cs_silent=false
31183
31184SHELL=\${CONFIG_SHELL-$SHELL}
31185export SHELL
31186_ASEOF
31187cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31188## -------------------- ##
31189## M4sh Initialization. ##
31190## -------------------- ##
31191
31192# Be more Bourne compatible
31193DUALCASE=1; export DUALCASE # for MKS sh
31194if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31195  emulate sh
31196  NULLCMD=:
31197  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31198  # is contrary to our usage.  Disable this feature.
31199  alias -g '${1+"$@"}'='"$@"'
31200  setopt NO_GLOB_SUBST
31201else
31202  case `(set -o) 2>/dev/null` in #(
31203  *posix*) :
31204    set -o posix ;; #(
31205  *) :
31206     ;;
31207esac
31208fi
31209
31210
31211as_nl='
31212'
31213export as_nl
31214# Printing a long string crashes Solaris 7 /usr/bin/printf.
31215as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31216as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31217as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31218# Prefer a ksh shell builtin over an external printf program on Solaris,
31219# but without wasting forks for bash or zsh.
31220if test -z "$BASH_VERSION$ZSH_VERSION" \
31221    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31222  as_echo='print -r --'
31223  as_echo_n='print -rn --'
31224elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31225  as_echo='printf %s\n'
31226  as_echo_n='printf %s'
31227else
31228  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31229    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31230    as_echo_n='/usr/ucb/echo -n'
31231  else
31232    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31233    as_echo_n_body='eval
31234      arg=$1;
31235      case $arg in #(
31236      *"$as_nl"*)
31237	expr "X$arg" : "X\\(.*\\)$as_nl";
31238	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31239      esac;
31240      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31241    '
31242    export as_echo_n_body
31243    as_echo_n='sh -c $as_echo_n_body as_echo'
31244  fi
31245  export as_echo_body
31246  as_echo='sh -c $as_echo_body as_echo'
31247fi
31248
31249# The user is always right.
31250if test "${PATH_SEPARATOR+set}" != set; then
31251  PATH_SEPARATOR=:
31252  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31253    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31254      PATH_SEPARATOR=';'
31255  }
31256fi
31257
31258
31259# IFS
31260# We need space, tab and new line, in precisely that order.  Quoting is
31261# there to prevent editors from complaining about space-tab.
31262# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31263# splitting by setting IFS to empty value.)
31264IFS=" ""	$as_nl"
31265
31266# Find who we are.  Look in the path if we contain no directory separator.
31267case $0 in #((
31268  *[\\/]* ) as_myself=$0 ;;
31269  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31270for as_dir in $PATH
31271do
31272  IFS=$as_save_IFS
31273  test -z "$as_dir" && as_dir=.
31274    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31275  done
31276IFS=$as_save_IFS
31277
31278     ;;
31279esac
31280# We did not find ourselves, most probably we were run as `sh COMMAND'
31281# in which case we are not to be found in the path.
31282if test "x$as_myself" = x; then
31283  as_myself=$0
31284fi
31285if test ! -f "$as_myself"; then
31286  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31287  exit 1
31288fi
31289
31290# Unset variables that we do not need and which cause bugs (e.g. in
31291# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31292# suppresses any "Segmentation fault" message there.  '((' could
31293# trigger a bug in pdksh 5.2.14.
31294for as_var in BASH_ENV ENV MAIL MAILPATH
31295do eval test x\${$as_var+set} = xset \
31296  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31297done
31298PS1='$ '
31299PS2='> '
31300PS4='+ '
31301
31302# NLS nuisances.
31303LC_ALL=C
31304export LC_ALL
31305LANGUAGE=C
31306export LANGUAGE
31307
31308# CDPATH.
31309(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31310
31311
31312# as_fn_error STATUS ERROR [LINENO LOG_FD]
31313# ----------------------------------------
31314# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31315# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31316# script with STATUS, using 1 if that was 0.
31317as_fn_error ()
31318{
31319  as_status=$1; test $as_status -eq 0 && as_status=1
31320  if test "$4"; then
31321    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31322    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31323  fi
31324  $as_echo "$as_me: error: $2" >&2
31325  as_fn_exit $as_status
31326} # as_fn_error
31327
31328
31329# as_fn_set_status STATUS
31330# -----------------------
31331# Set $? to STATUS, without forking.
31332as_fn_set_status ()
31333{
31334  return $1
31335} # as_fn_set_status
31336
31337# as_fn_exit STATUS
31338# -----------------
31339# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31340as_fn_exit ()
31341{
31342  set +e
31343  as_fn_set_status $1
31344  exit $1
31345} # as_fn_exit
31346
31347# as_fn_unset VAR
31348# ---------------
31349# Portably unset VAR.
31350as_fn_unset ()
31351{
31352  { eval $1=; unset $1;}
31353}
31354as_unset=as_fn_unset
31355# as_fn_append VAR VALUE
31356# ----------------------
31357# Append the text in VALUE to the end of the definition contained in VAR. Take
31358# advantage of any shell optimizations that allow amortized linear growth over
31359# repeated appends, instead of the typical quadratic growth present in naive
31360# implementations.
31361if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31362  eval 'as_fn_append ()
31363  {
31364    eval $1+=\$2
31365  }'
31366else
31367  as_fn_append ()
31368  {
31369    eval $1=\$$1\$2
31370  }
31371fi # as_fn_append
31372
31373# as_fn_arith ARG...
31374# ------------------
31375# Perform arithmetic evaluation on the ARGs, and store the result in the
31376# global $as_val. Take advantage of shells that can avoid forks. The arguments
31377# must be portable across $(()) and expr.
31378if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31379  eval 'as_fn_arith ()
31380  {
31381    as_val=$(( $* ))
31382  }'
31383else
31384  as_fn_arith ()
31385  {
31386    as_val=`expr "$@" || test $? -eq 1`
31387  }
31388fi # as_fn_arith
31389
31390
31391if expr a : '\(a\)' >/dev/null 2>&1 &&
31392   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31393  as_expr=expr
31394else
31395  as_expr=false
31396fi
31397
31398if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31399  as_basename=basename
31400else
31401  as_basename=false
31402fi
31403
31404if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31405  as_dirname=dirname
31406else
31407  as_dirname=false
31408fi
31409
31410as_me=`$as_basename -- "$0" ||
31411$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31412	 X"$0" : 'X\(//\)$' \| \
31413	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31414$as_echo X/"$0" |
31415    sed '/^.*\/\([^/][^/]*\)\/*$/{
31416	    s//\1/
31417	    q
31418	  }
31419	  /^X\/\(\/\/\)$/{
31420	    s//\1/
31421	    q
31422	  }
31423	  /^X\/\(\/\).*/{
31424	    s//\1/
31425	    q
31426	  }
31427	  s/.*/./; q'`
31428
31429# Avoid depending upon Character Ranges.
31430as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31431as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31432as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31433as_cr_digits='0123456789'
31434as_cr_alnum=$as_cr_Letters$as_cr_digits
31435
31436ECHO_C= ECHO_N= ECHO_T=
31437case `echo -n x` in #(((((
31438-n*)
31439  case `echo 'xy\c'` in
31440  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31441  xy)  ECHO_C='\c';;
31442  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31443       ECHO_T='	';;
31444  esac;;
31445*)
31446  ECHO_N='-n';;
31447esac
31448
31449rm -f conf$$ conf$$.exe conf$$.file
31450if test -d conf$$.dir; then
31451  rm -f conf$$.dir/conf$$.file
31452else
31453  rm -f conf$$.dir
31454  mkdir conf$$.dir 2>/dev/null
31455fi
31456if (echo >conf$$.file) 2>/dev/null; then
31457  if ln -s conf$$.file conf$$ 2>/dev/null; then
31458    as_ln_s='ln -s'
31459    # ... but there are two gotchas:
31460    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31461    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31462    # In both cases, we have to default to `cp -p'.
31463    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31464      as_ln_s='cp -p'
31465  elif ln conf$$.file conf$$ 2>/dev/null; then
31466    as_ln_s=ln
31467  else
31468    as_ln_s='cp -p'
31469  fi
31470else
31471  as_ln_s='cp -p'
31472fi
31473rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31474rmdir conf$$.dir 2>/dev/null
31475
31476
31477# as_fn_mkdir_p
31478# -------------
31479# Create "$as_dir" as a directory, including parents if necessary.
31480as_fn_mkdir_p ()
31481{
31482
31483  case $as_dir in #(
31484  -*) as_dir=./$as_dir;;
31485  esac
31486  test -d "$as_dir" || eval $as_mkdir_p || {
31487    as_dirs=
31488    while :; do
31489      case $as_dir in #(
31490      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31491      *) as_qdir=$as_dir;;
31492      esac
31493      as_dirs="'$as_qdir' $as_dirs"
31494      as_dir=`$as_dirname -- "$as_dir" ||
31495$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31496	 X"$as_dir" : 'X\(//\)[^/]' \| \
31497	 X"$as_dir" : 'X\(//\)$' \| \
31498	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31499$as_echo X"$as_dir" |
31500    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31501	    s//\1/
31502	    q
31503	  }
31504	  /^X\(\/\/\)[^/].*/{
31505	    s//\1/
31506	    q
31507	  }
31508	  /^X\(\/\/\)$/{
31509	    s//\1/
31510	    q
31511	  }
31512	  /^X\(\/\).*/{
31513	    s//\1/
31514	    q
31515	  }
31516	  s/.*/./; q'`
31517      test -d "$as_dir" && break
31518    done
31519    test -z "$as_dirs" || eval "mkdir $as_dirs"
31520  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31521
31522
31523} # as_fn_mkdir_p
31524if mkdir -p . 2>/dev/null; then
31525  as_mkdir_p='mkdir -p "$as_dir"'
31526else
31527  test -d ./-p && rmdir ./-p
31528  as_mkdir_p=false
31529fi
31530
31531if test -x / >/dev/null 2>&1; then
31532  as_test_x='test -x'
31533else
31534  if ls -dL / >/dev/null 2>&1; then
31535    as_ls_L_option=L
31536  else
31537    as_ls_L_option=
31538  fi
31539  as_test_x='
31540    eval sh -c '\''
31541      if test -d "$1"; then
31542	test -d "$1/.";
31543      else
31544	case $1 in #(
31545	-*)set "./$1";;
31546	esac;
31547	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31548	???[sx]*):;;*)false;;esac;fi
31549    '\'' sh
31550  '
31551fi
31552as_executable_p=$as_test_x
31553
31554# Sed expression to map a string onto a valid CPP name.
31555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31556
31557# Sed expression to map a string onto a valid variable name.
31558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31559
31560
31561exec 6>&1
31562## ----------------------------------- ##
31563## Main body of $CONFIG_STATUS script. ##
31564## ----------------------------------- ##
31565_ASEOF
31566test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31567
31568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31569# Save the log message, to keep $0 and so on meaningful, and to
31570# report actual input values of CONFIG_FILES etc. instead of their
31571# values after options handling.
31572ac_log="
31573This file was extended by OpenJDK $as_me jdk8, which was
31574generated by GNU Autoconf 2.67.  Invocation command line was
31575
31576  CONFIG_FILES    = $CONFIG_FILES
31577  CONFIG_HEADERS  = $CONFIG_HEADERS
31578  CONFIG_LINKS    = $CONFIG_LINKS
31579  CONFIG_COMMANDS = $CONFIG_COMMANDS
31580  $ $0 $@
31581
31582on `(hostname || uname -n) 2>/dev/null | sed 1q`
31583"
31584
31585_ACEOF
31586
31587case $ac_config_files in *"
31588"*) set x $ac_config_files; shift; ac_config_files=$*;;
31589esac
31590
31591case $ac_config_headers in *"
31592"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31593esac
31594
31595
31596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31597# Files that config.status was made for.
31598config_files="$ac_config_files"
31599config_headers="$ac_config_headers"
31600
31601_ACEOF
31602
31603cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31604ac_cs_usage="\
31605\`$as_me' instantiates files and other configuration actions
31606from templates according to the current configuration.  Unless the files
31607and actions are specified as TAGs, all are instantiated by default.
31608
31609Usage: $0 [OPTION]... [TAG]...
31610
31611  -h, --help       print this help, then exit
31612  -V, --version    print version number and configuration settings, then exit
31613      --config     print configuration, then exit
31614  -q, --quiet, --silent
31615                   do not print progress messages
31616  -d, --debug      don't remove temporary files
31617      --recheck    update $as_me by reconfiguring in the same conditions
31618      --file=FILE[:TEMPLATE]
31619                   instantiate the configuration file FILE
31620      --header=FILE[:TEMPLATE]
31621                   instantiate the configuration header FILE
31622
31623Configuration files:
31624$config_files
31625
31626Configuration headers:
31627$config_headers
31628
31629Report bugs to <build-dev@openjdk.java.net>.
31630OpenJDK home page: <http://openjdk.java.net>."
31631
31632_ACEOF
31633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31634ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31635ac_cs_version="\\
31636OpenJDK config.status jdk8
31637configured by $0, generated by GNU Autoconf 2.67,
31638  with options \\"\$ac_cs_config\\"
31639
31640Copyright (C) 2010 Free Software Foundation, Inc.
31641This config.status script is free software; the Free Software Foundation
31642gives unlimited permission to copy, distribute and modify it."
31643
31644ac_pwd='$ac_pwd'
31645srcdir='$srcdir'
31646AWK='$AWK'
31647test -n "\$AWK" || AWK=awk
31648_ACEOF
31649
31650cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31651# The default lists apply if the user does not specify any file.
31652ac_need_defaults=:
31653while test $# != 0
31654do
31655  case $1 in
31656  --*=?*)
31657    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31658    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31659    ac_shift=:
31660    ;;
31661  --*=)
31662    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31663    ac_optarg=
31664    ac_shift=:
31665    ;;
31666  *)
31667    ac_option=$1
31668    ac_optarg=$2
31669    ac_shift=shift
31670    ;;
31671  esac
31672
31673  case $ac_option in
31674  # Handling of the options.
31675  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31676    ac_cs_recheck=: ;;
31677  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31678    $as_echo "$ac_cs_version"; exit ;;
31679  --config | --confi | --conf | --con | --co | --c )
31680    $as_echo "$ac_cs_config"; exit ;;
31681  --debug | --debu | --deb | --de | --d | -d )
31682    debug=: ;;
31683  --file | --fil | --fi | --f )
31684    $ac_shift
31685    case $ac_optarg in
31686    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31687    '') as_fn_error $? "missing file argument" ;;
31688    esac
31689    as_fn_append CONFIG_FILES " '$ac_optarg'"
31690    ac_need_defaults=false;;
31691  --header | --heade | --head | --hea )
31692    $ac_shift
31693    case $ac_optarg in
31694    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31695    esac
31696    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31697    ac_need_defaults=false;;
31698  --he | --h)
31699    # Conflict between --help and --header
31700    as_fn_error $? "ambiguous option: \`$1'
31701Try \`$0 --help' for more information.";;
31702  --help | --hel | -h )
31703    $as_echo "$ac_cs_usage"; exit ;;
31704  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31705  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31706    ac_cs_silent=: ;;
31707
31708  # This is an error.
31709  -*) as_fn_error $? "unrecognized option: \`$1'
31710Try \`$0 --help' for more information." ;;
31711
31712  *) as_fn_append ac_config_targets " $1"
31713     ac_need_defaults=false ;;
31714
31715  esac
31716  shift
31717done
31718
31719ac_configure_extra_args=
31720
31721if $ac_cs_silent; then
31722  exec 6>/dev/null
31723  ac_configure_extra_args="$ac_configure_extra_args --silent"
31724fi
31725
31726_ACEOF
31727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31728if \$ac_cs_recheck; then
31729  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31730  shift
31731  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31732  CONFIG_SHELL='$SHELL'
31733  export CONFIG_SHELL
31734  exec "\$@"
31735fi
31736
31737_ACEOF
31738cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31739exec 5>>config.log
31740{
31741  echo
31742  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31743## Running $as_me. ##
31744_ASBOX
31745  $as_echo "$ac_log"
31746} >&5
31747
31748_ACEOF
31749cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31750_ACEOF
31751
31752cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31753
31754# Handling of arguments.
31755for ac_config_target in $ac_config_targets
31756do
31757  case $ac_config_target in
31758    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31759    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31760    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31761    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31762    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31763    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31764    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31765
31766  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31767  esac
31768done
31769
31770
31771# If the user did not use the arguments to specify the items to instantiate,
31772# then the envvar interface is used.  Set only those that are not.
31773# We use the long form for the default assignment because of an extremely
31774# bizarre bug on SunOS 4.1.3.
31775if $ac_need_defaults; then
31776  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31777  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31778fi
31779
31780# Have a temporary directory for convenience.  Make it in the build tree
31781# simply because there is no reason against having it here, and in addition,
31782# creating and moving files from /tmp can sometimes cause problems.
31783# Hook for its removal unless debugging.
31784# Note that there is a small window in which the directory will not be cleaned:
31785# after its creation but before its name has been assigned to `$tmp'.
31786$debug ||
31787{
31788  tmp=
31789  trap 'exit_status=$?
31790  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31791' 0
31792  trap 'as_fn_exit 1' 1 2 13 15
31793}
31794# Create a (secure) tmp directory for tmp files.
31795
31796{
31797  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31798  test -n "$tmp" && test -d "$tmp"
31799}  ||
31800{
31801  tmp=./conf$$-$RANDOM
31802  (umask 077 && mkdir "$tmp")
31803} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31804
31805# Set up the scripts for CONFIG_FILES section.
31806# No need to generate them if there are no CONFIG_FILES.
31807# This happens for instance with `./config.status config.h'.
31808if test -n "$CONFIG_FILES"; then
31809
31810
31811ac_cr=`echo X | tr X '\015'`
31812# On cygwin, bash can eat \r inside `` if the user requested igncr.
31813# But we know of no other shell where ac_cr would be empty at this
31814# point, so we can use a bashism as a fallback.
31815if test "x$ac_cr" = x; then
31816  eval ac_cr=\$\'\\r\'
31817fi
31818ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31819if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31820  ac_cs_awk_cr='\\r'
31821else
31822  ac_cs_awk_cr=$ac_cr
31823fi
31824
31825echo 'BEGIN {' >"$tmp/subs1.awk" &&
31826_ACEOF
31827
31828
31829{
31830  echo "cat >conf$$subs.awk <<_ACEOF" &&
31831  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31832  echo "_ACEOF"
31833} >conf$$subs.sh ||
31834  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31835ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31836ac_delim='%!_!# '
31837for ac_last_try in false false false false false :; do
31838  . ./conf$$subs.sh ||
31839    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31840
31841  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31842  if test $ac_delim_n = $ac_delim_num; then
31843    break
31844  elif $ac_last_try; then
31845    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31846  else
31847    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31848  fi
31849done
31850rm -f conf$$subs.sh
31851
31852cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31853cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31854_ACEOF
31855sed -n '
31856h
31857s/^/S["/; s/!.*/"]=/
31858p
31859g
31860s/^[^!]*!//
31861:repl
31862t repl
31863s/'"$ac_delim"'$//
31864t delim
31865:nl
31866h
31867s/\(.\{148\}\)..*/\1/
31868t more1
31869s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31870p
31871n
31872b repl
31873:more1
31874s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31875p
31876g
31877s/.\{148\}//
31878t nl
31879:delim
31880h
31881s/\(.\{148\}\)..*/\1/
31882t more2
31883s/["\\]/\\&/g; s/^/"/; s/$/"/
31884p
31885b
31886:more2
31887s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31888p
31889g
31890s/.\{148\}//
31891t delim
31892' <conf$$subs.awk | sed '
31893/^[^""]/{
31894  N
31895  s/\n//
31896}
31897' >>$CONFIG_STATUS || ac_write_fail=1
31898rm -f conf$$subs.awk
31899cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31900_ACAWK
31901cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31902  for (key in S) S_is_set[key] = 1
31903  FS = ""
31904
31905}
31906{
31907  line = $ 0
31908  nfields = split(line, field, "@")
31909  substed = 0
31910  len = length(field[1])
31911  for (i = 2; i < nfields; i++) {
31912    key = field[i]
31913    keylen = length(key)
31914    if (S_is_set[key]) {
31915      value = S[key]
31916      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31917      len += length(value) + length(field[++i])
31918      substed = 1
31919    } else
31920      len += 1 + keylen
31921  }
31922
31923  print line
31924}
31925
31926_ACAWK
31927_ACEOF
31928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31929if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31930  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31931else
31932  cat
31933fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31934  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31935_ACEOF
31936
31937# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31938# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31939# trailing colons and then remove the whole line if VPATH becomes empty
31940# (actually we leave an empty line to preserve line numbers).
31941if test "x$srcdir" = x.; then
31942  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31943h
31944s///
31945s/^/:/
31946s/[	 ]*$/:/
31947s/:\$(srcdir):/:/g
31948s/:\${srcdir}:/:/g
31949s/:@srcdir@:/:/g
31950s/^:*//
31951s/:*$//
31952x
31953s/\(=[	 ]*\).*/\1/
31954G
31955s/\n//
31956s/^[^=]*=[	 ]*$//
31957}'
31958fi
31959
31960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31961fi # test -n "$CONFIG_FILES"
31962
31963# Set up the scripts for CONFIG_HEADERS section.
31964# No need to generate them if there are no CONFIG_HEADERS.
31965# This happens for instance with `./config.status Makefile'.
31966if test -n "$CONFIG_HEADERS"; then
31967cat >"$tmp/defines.awk" <<\_ACAWK ||
31968BEGIN {
31969_ACEOF
31970
31971# Transform confdefs.h into an awk script `defines.awk', embedded as
31972# here-document in config.status, that substitutes the proper values into
31973# config.h.in to produce config.h.
31974
31975# Create a delimiter string that does not exist in confdefs.h, to ease
31976# handling of long lines.
31977ac_delim='%!_!# '
31978for ac_last_try in false false :; do
31979  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
31980  if test -z "$ac_t"; then
31981    break
31982  elif $ac_last_try; then
31983    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31984  else
31985    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31986  fi
31987done
31988
31989# For the awk script, D is an array of macro values keyed by name,
31990# likewise P contains macro parameters if any.  Preserve backslash
31991# newline sequences.
31992
31993ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31994sed -n '
31995s/.\{148\}/&'"$ac_delim"'/g
31996t rset
31997:rset
31998s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
31999t def
32000d
32001:def
32002s/\\$//
32003t bsnl
32004s/["\\]/\\&/g
32005s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32006D["\1"]=" \3"/p
32007s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32008d
32009:bsnl
32010s/["\\]/\\&/g
32011s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32012D["\1"]=" \3\\\\\\n"\\/p
32013t cont
32014s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32015t cont
32016d
32017:cont
32018n
32019s/.\{148\}/&'"$ac_delim"'/g
32020t clear
32021:clear
32022s/\\$//
32023t bsnlc
32024s/["\\]/\\&/g; s/^/"/; s/$/"/p
32025d
32026:bsnlc
32027s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32028b cont
32029' <confdefs.h | sed '
32030s/'"$ac_delim"'/"\\\
32031"/g' >>$CONFIG_STATUS || ac_write_fail=1
32032
32033cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32034  for (key in D) D_is_set[key] = 1
32035  FS = ""
32036}
32037/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32038  line = \$ 0
32039  split(line, arg, " ")
32040  if (arg[1] == "#") {
32041    defundef = arg[2]
32042    mac1 = arg[3]
32043  } else {
32044    defundef = substr(arg[1], 2)
32045    mac1 = arg[2]
32046  }
32047  split(mac1, mac2, "(") #)
32048  macro = mac2[1]
32049  prefix = substr(line, 1, index(line, defundef) - 1)
32050  if (D_is_set[macro]) {
32051    # Preserve the white space surrounding the "#".
32052    print prefix "define", macro P[macro] D[macro]
32053    next
32054  } else {
32055    # Replace #undef with comments.  This is necessary, for example,
32056    # in the case of _POSIX_SOURCE, which is predefined and required
32057    # on some systems where configure will not decide to define it.
32058    if (defundef == "undef") {
32059      print "/*", prefix defundef, macro, "*/"
32060      next
32061    }
32062  }
32063}
32064{ print }
32065_ACAWK
32066_ACEOF
32067cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32068  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32069fi # test -n "$CONFIG_HEADERS"
32070
32071
32072eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32073shift
32074for ac_tag
32075do
32076  case $ac_tag in
32077  :[FHLC]) ac_mode=$ac_tag; continue;;
32078  esac
32079  case $ac_mode$ac_tag in
32080  :[FHL]*:*);;
32081  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32082  :[FH]-) ac_tag=-:-;;
32083  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32084  esac
32085  ac_save_IFS=$IFS
32086  IFS=:
32087  set x $ac_tag
32088  IFS=$ac_save_IFS
32089  shift
32090  ac_file=$1
32091  shift
32092
32093  case $ac_mode in
32094  :L) ac_source=$1;;
32095  :[FH])
32096    ac_file_inputs=
32097    for ac_f
32098    do
32099      case $ac_f in
32100      -) ac_f="$tmp/stdin";;
32101      *) # Look for the file first in the build tree, then in the source tree
32102	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32103	 # because $ac_f cannot contain `:'.
32104	 test -f "$ac_f" ||
32105	   case $ac_f in
32106	   [\\/$]*) false;;
32107	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32108	   esac ||
32109	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32110      esac
32111      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32112      as_fn_append ac_file_inputs " '$ac_f'"
32113    done
32114
32115    # Let's still pretend it is `configure' which instantiates (i.e., don't
32116    # use $as_me), people would be surprised to read:
32117    #    /* config.h.  Generated by config.status.  */
32118    configure_input='Generated from '`
32119	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32120	`' by configure.'
32121    if test x"$ac_file" != x-; then
32122      configure_input="$ac_file.  $configure_input"
32123      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32124$as_echo "$as_me: creating $ac_file" >&6;}
32125    fi
32126    # Neutralize special characters interpreted by sed in replacement strings.
32127    case $configure_input in #(
32128    *\&* | *\|* | *\\* )
32129       ac_sed_conf_input=`$as_echo "$configure_input" |
32130       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32131    *) ac_sed_conf_input=$configure_input;;
32132    esac
32133
32134    case $ac_tag in
32135    *:-:* | *:-) cat >"$tmp/stdin" \
32136      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32137    esac
32138    ;;
32139  esac
32140
32141  ac_dir=`$as_dirname -- "$ac_file" ||
32142$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32143	 X"$ac_file" : 'X\(//\)[^/]' \| \
32144	 X"$ac_file" : 'X\(//\)$' \| \
32145	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32146$as_echo X"$ac_file" |
32147    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32148	    s//\1/
32149	    q
32150	  }
32151	  /^X\(\/\/\)[^/].*/{
32152	    s//\1/
32153	    q
32154	  }
32155	  /^X\(\/\/\)$/{
32156	    s//\1/
32157	    q
32158	  }
32159	  /^X\(\/\).*/{
32160	    s//\1/
32161	    q
32162	  }
32163	  s/.*/./; q'`
32164  as_dir="$ac_dir"; as_fn_mkdir_p
32165  ac_builddir=.
32166
32167case "$ac_dir" in
32168.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32169*)
32170  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32171  # A ".." for each directory in $ac_dir_suffix.
32172  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32173  case $ac_top_builddir_sub in
32174  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32175  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32176  esac ;;
32177esac
32178ac_abs_top_builddir=$ac_pwd
32179ac_abs_builddir=$ac_pwd$ac_dir_suffix
32180# for backward compatibility:
32181ac_top_builddir=$ac_top_build_prefix
32182
32183case $srcdir in
32184  .)  # We are building in place.
32185    ac_srcdir=.
32186    ac_top_srcdir=$ac_top_builddir_sub
32187    ac_abs_top_srcdir=$ac_pwd ;;
32188  [\\/]* | ?:[\\/]* )  # Absolute name.
32189    ac_srcdir=$srcdir$ac_dir_suffix;
32190    ac_top_srcdir=$srcdir
32191    ac_abs_top_srcdir=$srcdir ;;
32192  *) # Relative name.
32193    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32194    ac_top_srcdir=$ac_top_build_prefix$srcdir
32195    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32196esac
32197ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32198
32199
32200  case $ac_mode in
32201  :F)
32202  #
32203  # CONFIG_FILE
32204  #
32205
32206_ACEOF
32207
32208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32209# If the template does not know about datarootdir, expand it.
32210# FIXME: This hack should be removed a few years after 2.60.
32211ac_datarootdir_hack=; ac_datarootdir_seen=
32212ac_sed_dataroot='
32213/datarootdir/ {
32214  p
32215  q
32216}
32217/@datadir@/p
32218/@docdir@/p
32219/@infodir@/p
32220/@localedir@/p
32221/@mandir@/p'
32222case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32223*datarootdir*) ac_datarootdir_seen=yes;;
32224*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32225  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32226$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32227_ACEOF
32228cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32229  ac_datarootdir_hack='
32230  s&@datadir@&$datadir&g
32231  s&@docdir@&$docdir&g
32232  s&@infodir@&$infodir&g
32233  s&@localedir@&$localedir&g
32234  s&@mandir@&$mandir&g
32235  s&\\\${datarootdir}&$datarootdir&g' ;;
32236esac
32237_ACEOF
32238
32239# Neutralize VPATH when `$srcdir' = `.'.
32240# Shell code in configure.ac might set extrasub.
32241# FIXME: do we really want to maintain this feature?
32242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32243ac_sed_extra="$ac_vpsub
32244$extrasub
32245_ACEOF
32246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32247:t
32248/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32249s|@configure_input@|$ac_sed_conf_input|;t t
32250s&@top_builddir@&$ac_top_builddir_sub&;t t
32251s&@top_build_prefix@&$ac_top_build_prefix&;t t
32252s&@srcdir@&$ac_srcdir&;t t
32253s&@abs_srcdir@&$ac_abs_srcdir&;t t
32254s&@top_srcdir@&$ac_top_srcdir&;t t
32255s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32256s&@builddir@&$ac_builddir&;t t
32257s&@abs_builddir@&$ac_abs_builddir&;t t
32258s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32259$ac_datarootdir_hack
32260"
32261eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32262  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32263
32264test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32265  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32266  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32267  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32268which seems to be undefined.  Please make sure it is defined" >&5
32269$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32270which seems to be undefined.  Please make sure it is defined" >&2;}
32271
32272  rm -f "$tmp/stdin"
32273  case $ac_file in
32274  -) cat "$tmp/out" && rm -f "$tmp/out";;
32275  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32276  esac \
32277  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32278 ;;
32279  :H)
32280  #
32281  # CONFIG_HEADER
32282  #
32283  if test x"$ac_file" != x-; then
32284    {
32285      $as_echo "/* $configure_input  */" \
32286      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32287    } >"$tmp/config.h" \
32288      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32289    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32290      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32291$as_echo "$as_me: $ac_file is unchanged" >&6;}
32292    else
32293      rm -f "$ac_file"
32294      mv "$tmp/config.h" "$ac_file" \
32295	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32296    fi
32297  else
32298    $as_echo "/* $configure_input  */" \
32299      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32300      || as_fn_error $? "could not create -" "$LINENO" 5
32301  fi
32302 ;;
32303
32304
32305  esac
32306
32307done # for ac_tag
32308
32309
32310as_fn_exit 0
32311_ACEOF
32312ac_clean_files=$ac_clean_files_save
32313
32314test $ac_write_fail = 0 ||
32315  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32316
32317
32318# configure is writing to config.log, and then calls config.status.
32319# config.status does its own redirection, appending to config.log.
32320# Unfortunately, on DOS this fails, as config.log is still kept open
32321# by configure, so config.status won't be able to write to it; its
32322# output is simply discarded.  So we exec the FD to /dev/null,
32323# effectively closing config.log, so it can be properly (re)opened and
32324# appended to by config.status.  When coming back to configure, we
32325# need to make the FD available again.
32326if test "$no_create" != yes; then
32327  ac_cs_success=:
32328  ac_config_status_args=
32329  test "$silent" = yes &&
32330    ac_config_status_args="$ac_config_status_args --quiet"
32331  exec 5>/dev/null
32332  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32333  exec 5>>config.log
32334  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32335  # would make configure fail if this is the last instruction.
32336  $ac_cs_success || as_fn_exit 1
32337fi
32338if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32339  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32340$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32341fi
32342
32343
32344# Make the compare script executable
32345$CHMOD +x $OUTPUT_ROOT/compare.sh
32346
32347# Finally output some useful information to the user
32348
32349# Finally output some useful information to the user
32350
32351if test "x$CCACHE_FOUND" != x; then
32352	if  test "x$HAS_GOOD_CCACHE" = x; then
32353		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32354		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32355	else
32356		CCACHE_STATUS="installed and in use"
32357	fi
32358else
32359	if test "x$GCC" = xyes; then
32360		CCACHE_STATUS="not installed (consider installing)"
32361		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32362	else
32363		CCACHE_STATUS="not available for your system"
32364	fi
32365fi
32366
32367printf "\n"
32368printf "====================================================\n"
32369printf "A new configuration has been successfully created in\n"
32370printf "$OUTPUT_ROOT\n"
32371if test "x$CONFIGURE_COMMAND_LINE" != x; then
32372	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32373else
32374	printf "using default settings.\n"
32375fi
32376
32377printf "\n"
32378printf "Configuration summary:\n"
32379printf "* Debug level:    $DEBUG_LEVEL\n"
32380printf "* JDK variant:    $JDK_VARIANT\n"
32381printf "* JVM variants:   $with_jvm_variants\n"
32382printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32383
32384printf "\n"
32385printf "Tools summary:\n"
32386if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32387  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32388fi
32389printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32390printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32391printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32392
32393printf "\n"
32394printf "Build performance summary:\n"
32395printf "* Cores to use:   $NUM_CORES\n"
32396printf "* Memory limit:   $MEMORY_SIZE MB\n"
32397printf "* ccache status:  $CCACHE_STATUS\n"
32398printf "\n"
32399
32400if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32401	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32402	printf "$CCACHE_HELP_MSG\n"
32403
32404    # Print a helpful message on how to acquire the necessary build dependency.
32405    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32406    MISSING_DEPENDENCY=ccache
32407    PKGHANDLER_COMMAND=
32408
32409    case $PKGHANDLER in
32410	apt-get)
32411                apt_help     $MISSING_DEPENDENCY ;;
32412    yum)
32413                yum_help     $MISSING_DEPENDENCY ;;
32414	port)
32415                port_help    $MISSING_DEPENDENCY ;;
32416	pkgutil)
32417                pkgutil_help $MISSING_DEPENDENCY ;;
32418	pkgadd)
32419                pkgadd_help  $MISSING_DEPENDENCY ;;
32420    * )
32421      break ;;
32422    esac
32423
32424    if test "x$PKGHANDLER_COMMAND" != x; then
32425        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32426    fi
32427
32428	printf "$HELP_MSG\n"
32429	printf "\n"
32430fi
32431
32432if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32433	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32434	printf "will result in longer build times.\n"
32435	printf "\n"
32436fi
32437
32438if test "x$FOUND_ALT_VARIABLES" != "x"; then
32439	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32440	printf "These are not respected, and will be ignored. It is recommended\n"
32441	printf "that you clean your environment. The following variables are set:\n"
32442	printf "$FOUND_ALT_VARIABLES\n"
32443	printf "\n"
32444fi
32445
32446if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32447	printf "WARNING: Your build output directory is not on a local disk.\n"
32448	printf "This will severely degrade build performance!\n"
32449	printf "It is recommended that you create an output directory on a local disk,\n"
32450	printf "and run the configure script again from that directory.\n"
32451	printf "\n"
32452fi
32453
32454if test "x$IS_RECONFIGURE" = "xyes"; then
32455	printf "WARNING: The result of this configuration has overridden an older\n"
32456	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32457	printf "proper build. Failure to do so might result in strange build problems.\n"
32458	printf "\n"
32459fi
32460
32461